Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug where overview alerts can abut one another #2363

Merged
merged 1 commit into from
Aug 16, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions frontend/public/components/overview/_project-overview.scss
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,14 @@
}
}

.project-overview__status .co-icon-and-text {
margin-right: 12px;

.project-overview__builds & {
margin-right: 4px;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation :)

Copy link
Member Author

@rhamilto rhamilto Aug 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Fixed. That's what happens when I put up a PR while trying to simultaneously rush out the door.

}
}

@media (min-width: $screen-md-min) {
// Metrics are hidden when the sidebar is open. Adjust list row styles.
.overview--sidebar-shown .project-overview {
Expand Down
4 changes: 2 additions & 2 deletions frontend/public/components/overview/project-overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ const AlertTooltip = ({alerts, severity, noSeverityLabel=false}) => {
// Disable the tooltip on mobile since a touch also opens the sidebar, which
// immediately covers the tooltip content.
return <Tooltip content={content} styles={overviewTooltipStyles} disableOnMobile>
<TooltipStatus status={severity} title={noSeverityLabel ? String(count) : pluralize(count, label)} />
<span className="project-overview__status"><TooltipStatus status={severity} title={noSeverityLabel ? String(count) : pluralize(count, label)} /></span>
</Tooltip>;
};

Expand All @@ -173,7 +173,7 @@ const Alerts: React.SFC<AlertsProps> = ({item}) => {
{error && <AlertTooltip severity="Error" alerts={error} />}
{warning && <AlertTooltip severity="Warning" alerts={warning} />}
{info && <AlertTooltip severity="Info" alerts={info} />}
{(buildNew || buildPending || buildRunning || buildFailed || buildError) && <div>
{(buildNew || buildPending || buildRunning || buildFailed || buildError) && <div className="project-overview__builds">
Builds {buildNew && <AlertTooltip severity="New" alerts={buildNew} noSeverityLabel />} {buildPending && <AlertTooltip severity="Pending" alerts={buildPending} noSeverityLabel />} {buildRunning && <AlertTooltip severity="Running" alerts={buildRunning} noSeverityLabel />} {buildFailed && <AlertTooltip severity="Failed" alerts={buildFailed} noSeverityLabel />} {buildError && <AlertTooltip severity="Error" alerts={buildError} noSeverityLabel />}
</div>}
</div>;
Expand Down