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

report: prevent breaking words in opportunity text #14329

Merged
merged 3 commits into from
Aug 31, 2022

Conversation

adamraine
Copy link
Member

Fixes #14326

@adamraine adamraine requested a review from a team as a code owner August 29, 2022 20:35
@adamraine adamraine requested review from connorjclark and removed request for a team August 29, 2022 20:35
@paulirish
Copy link
Member

weirdest thing. i also made a branch for this today.

slightly diff impl:
image

will review later…

@brendankenny
Copy link
Member

Separate from the formatting: do we prefer s over sec? sec seems kind of weird to me as an abbreviation, honestly

@brendankenny
Copy link
Member

brendankenny commented Aug 29, 2022

Separate from the formatting: do we prefer s over sec? sec seems kind of weird to me as an abbreviation, honestly

we can switch from unitDisplay: 'short' to unitDisplay: 'narrow' to get 's' here, but then 0.150 s becomes 0.15s (no space, breaking or otherwise, before 's'). Kind of annoying but fine?

@@ -873,7 +873,6 @@

.lh-audit--load-opportunity .lh-audit__display-text {
text-align: right;
flex: 0 0 calc(3 * var(--report-font-size));
Copy link
Member

@alexnj alexnj Aug 29, 2022

Choose a reason for hiding this comment

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

This one potentially has the side effect of the right end of spark lines being misaligned between opportunities (without a fixed and reserved space for each) vs. bumping to 4 *?

Copy link
Member

Choose a reason for hiding this comment

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

image

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah good point, that's probably why this line was here in the first place. Bumping to 4 * is probably best and then paul's suggestion just so a potential break doesn't happen in the middle of the word.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

report: line breaks in the middle of the 'sec' unit in opportunities
6 participants