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(ui): ensure all dashboard cards render the same size #17612

Merged
merged 4 commits into from
Apr 6, 2020

Conversation

alexpaxton
Copy link
Contributor

@alexpaxton alexpaxton commented Apr 3, 2020

Closes #16966

Screen Shot 2020-04-03 at 12 54 02 PM
All cards are the same height regardless of contents or position

Screen Shot 2020-04-03 at 1 19 29 PM
Cards with a long name don't change width and truncate the name

  • CHANGELOG.md updated with a link to the PR (not the Issue)
  • Well-formatted commit messages
  • Rebased/mergeable
  • Tests pass
  • http/swagger.yml updated (if modified Go structs or API)
  • Documentation updated or issue created (provide link to issue/pr)
  • Signed CLA (if not already signed)

@alexpaxton alexpaxton requested review from a team and drdelambre and removed request for a team April 3, 2020 20:28
}
}

@media screen and (min-width: $cf-grid--breakpoint-md) {
.dashboards-card-grid {
grid-template-columns: 1fr 1fr 1fr;
grid-template-columns: minmax(33.3333%, 1fr) minmax(33.3333%, 1fr) minmax(33.3333%, 1fr);
Copy link
Contributor

Choose a reason for hiding this comment

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

minmax is like the CSS version of the interrobang

Also, fr???

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a CSS Grid thing. Stands for "fractional unit" and in this context controls how big the columns are. So 1fr 1fr 1fr means divide up into 3 even columns.

Using minmax() ensures that the columns don't exceed that size

Copy link
Contributor

@drdelambre drdelambre left a comment

Choose a reason for hiding this comment

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

omg thank you for this.. i've had like 4 false starts already

@alexpaxton
Copy link
Contributor Author

Fixed the failing e2e test and filed this issue in the process: influxdata/clockface#478

@alexpaxton alexpaxton merged commit 58c5cf6 into master Apr 6, 2020
@alexpaxton alexpaxton deleted the fix/oversize-dashboard-cards branch April 6, 2020 20:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make dashboards even again
3 participants