Unverified Commit 9b073e5d authored by Tamika Tannis's avatar Tamika Tannis Committed by GitHub

Resolve unintended style descrepancies (#471)

parent 65defde5
...@@ -58,68 +58,67 @@ export class TableIssues extends React.Component<TableIssueProps> { ...@@ -58,68 +58,67 @@ export class TableIssues extends React.Component<TableIssueProps> {
); );
} }
renderMoreIssuesMessage = (count: number, url: string) => { renderIssueTitle = () => {
return ( return (
<span className="table-more-issues" key="more-issue-link"> <div className="section-title title-3">
<a id="more-issues-link" className="table-issue-more-issues" target="_blank" href={url} onClick={logClick}> Issues
View all {count} issues </div>
</a>
|
{ this.renderReportIssueLink() }
</span>
); );
} }
renderReportIssueLink = () => { renderIssueContent = () => {
return ( if (this.props.issues.length === 0) {
<div className="table-report-new-issue"> return (
<div className="issue-banner">
{ NO_DATA_ISSUES_TEXT }
</div>
)
};
return this.props.issues.map(this.renderIssue);
}
renderIssueFooter = () => {
const hasIssues = this.props.issues.length !== 0;
const reportIssueLink = (
<div className={`table-report-new-issue ${hasIssues ? 'ml-1' : ''}`}>
<ReportTableIssue tableKey={ this.props.tableKey } tableName={ this.props.tableName }/> <ReportTableIssue tableKey={ this.props.tableKey } tableName={ this.props.tableName }/>
</div> </div>
); );
}
renderIssueTitle = () => { if (!hasIssues) {
return reportIssueLink;
}
return ( return (
<div className="section-title title-3"> <span className="table-more-issues" key="more-issue-link">
Issues <a id="more-issues-link" className="table-issue-more-issues" target="_blank" href={this.props.allIssuesUrl} onClick={logClick}>
</div> View all { this.props.total } issues
</a>
|
{ reportIssueLink }
</span>
); );
} }
render() { render() {
if (this.props.isLoading) { if (this.props.isLoading) {
return ( return (
<div> <>
{this.renderIssueTitle()} {this.renderIssueTitle()}
<div className="table-issues"> <div className="table-issues">
<LoadingSpinner /> <LoadingSpinner />
</div> </div>
</div> </>
) )
} }
if (this.props.issues.length === 0) {
return (
<div>
{this.renderIssueTitle()}
<div className="table-issues">
<div className="issue-banner">
{NO_DATA_ISSUES_TEXT}
</div>
</div>
{ this.renderReportIssueLink()}
</div>
);
}
return ( return (
<div> <>
{this.renderIssueTitle()} {this.renderIssueTitle()}
<div className="table-issues"> <div className="table-issues">
{ this.props.issues.map(this.renderIssue)} {this.renderIssueContent()}
</div> </div>
{ this.renderMoreIssuesMessage(this.props.total, this.props.allIssuesUrl)} {this.renderIssueFooter()}
</div> </>
); );
} }
} }
......
...@@ -10,13 +10,14 @@ ...@@ -10,13 +10,14 @@
flex-direction: row; flex-direction: row;
border-top: 1px solid $stroke-light; border-top: 1px solid $stroke-light;
color: $text-secondary; color: $text-secondary;
line-height: 24px;
&:last-child { &:last-child {
border-bottom: 1px solid $stroke-light; border-bottom: 1px solid $stroke-light;
} }
> :not(.table-issue-priority) { .table-issue-priority {
line-height: 24px; line-height: 20px;
} }
} }
.table-issue-link { .table-issue-link {
...@@ -75,5 +76,8 @@ ...@@ -75,5 +76,8 @@
} }
.table-report-new-issue { .table-report-new-issue {
margin-bottom: $spacer-1; margin-bottom: $spacer-1;
margin-left: $spacer-1;
&.ml-1 {
margin-left: $spacer-1;
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment