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
Focused Launch: Fix domain picker item flex spacing #49883
Conversation
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -232,8 +232,7 @@ $accent-blue: #117ac9; | |||
} | |||
|
|||
.domain-picker__suggestion-item-name { | |||
flex-grow: 1; | |||
flex-basis: 2px; | |||
width: max-content; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Internet Explorer doesn't provide support for max-content
(see MDN Docs). Should we consider this an issue?
@@ -232,8 +232,7 @@ $accent-blue: #117ac9; | |||
} | |||
|
|||
.domain-picker__suggestion-item-name { | |||
flex-grow: 1; | |||
flex-basis: 2px; | |||
width: max-content; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"For text content this means that the content will not wrap at all even if it causes overflows" - .
The max-content
property will prevent content from wrapping and will eventually cause overflows (see MDN Docs). In our case, this happens when the URL is (extremely) long (see screenshot). Do you think we need to address and fix this?
As @StefanNieuwenhuis mentioned, cross-browser and cross-device testing is welcome for any CSS change and not only. Another point is about a regression on Since the change is in a shared component, let's make sure to include other use cases in the Testing instructions as well. |
6f964a3
to
78b00b2
Compare
9377fc5
to
bbc2031
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took it for another spin and the changes LGTM sine I don't see any premature breaking of domain picker items anymore! 🚢
Changes proposed in this Pull Request
Why is it hard?
In each domain item, there two competing columns. The domain name column, and the price column. We prefer the domain picker to stay in one line, but not too rigid to make the phrase "Included in paid plans" narrow enough to render one word per line. We need the domain picker to stay in one line as long as it doesn't squeeze the price too much.
The current solution is to split the columns by 50:50 and remove the competition between the two columns entirely. This tells the domain name to stay in one line as long as it's shorter than 50% of the item. Easy and clean enough.
In free domains though, 50% is way too much for the price column, because they don't have the phrase "Included in paid plans". This PR adds a special case for free domains to have a narrower price column. As for the paid domains, I think the 50:50 makes the most sense.
Testing instructions
/start
flow.apps/editing-toolkit
runyarn dev --sync
.Regression testing
Fixes #49817