-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Editor: Prevent wrapping text when showing icon labels in header #66038
Editor: Prevent wrapping text when showing icon labels in header #66038
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: +8 B (0%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
On #65491 (comment) I pinged the @WordPress/gutenberg-components to ask why the |
Opened #66049 to discuss it |
I'd be fine to ship this as a temporary fix while debating the best way forward for handling this more broadly in |
Makes sense. If we do add the style directly to |
Thanks for the discussion here.
I'm not sure I agree 100%. If we were starting from a clean slate, it makes perfect sense. My concern is adding On that note, it appears that we have consensus to land this fix for 6.7 and follow-up more holistically via #66049 Once this PR gets a formal approval, I'll get it merged. |
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'm not sure I agree 100%. If we were starting from a clean slate, it makes perfect sense. My concern is adding nowrap to default buttons after the fact might be a breaking change for some consumers. That's partly why I erred towards the smaller scope of this quick fix.
I like the idea of handling this at the leaf level, as it were, especially since this is a fix for 6.7. This is testing well for me, I notice that Zoom Out hasn't been translated yet in a lot of languages, so testing in Spanish didn't yield results different to English for this button, but overall this LGTM!
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.
Given this was more of a visual bug and there is a desire to see it land in 6.7 as a bug fix. I've corrected the labels on this PR and added |
) Co-authored-by: aaronrobertshaw <aaronrobertshaw@git.wordpress.org> Co-authored-by: andrewserong <andrewserong@git.wordpress.org> Co-authored-by: ramonjd <ramonopoly@git.wordpress.org> Co-authored-by: afercia <afercia@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org> Co-authored-by: tyxla <tyxla@git.wordpress.org> Co-authored-by: getdave <get_dave@git.wordpress.org>
I just cherry-picked this PR to the wp/6.7 branch to get it included in the next release: 39b217e |
It's a valid concern, and I think we're in a bit of a gray area. This change could also be interpreted as a bug fix, where the default variant was (mistakenly) left behind when setting the text wrapping styles in the component. In any case, the change to the default variant is proposed in #66049 and therefore I encourage everyone to help identify pros/cons of the approach (and unwanted side-effects) in that PR 🙏 |
) Co-authored-by: aaronrobertshaw <aaronrobertshaw@git.wordpress.org> Co-authored-by: andrewserong <andrewserong@git.wordpress.org> Co-authored-by: ramonjd <ramonopoly@git.wordpress.org> Co-authored-by: afercia <afercia@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org> Co-authored-by: tyxla <tyxla@git.wordpress.org> Co-authored-by: getdave <get_dave@git.wordpress.org>
…dPress#66038) Co-authored-by: aaronrobertshaw <aaronrobertshaw@git.wordpress.org> Co-authored-by: andrewserong <andrewserong@git.wordpress.org> Co-authored-by: ramonjd <ramonopoly@git.wordpress.org> Co-authored-by: afercia <afercia@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org> Co-authored-by: tyxla <tyxla@git.wordpress.org> Co-authored-by: getdave <get_dave@git.wordpress.org>
Fixes: #65491
What?
Prevents wrapping text for editor header buttons when
showIconLabels
is set totrue
.Why?
Preventing wrapping keeps these buttons in line with others within the header and arguably more readable.
See #65491 for more details.
How?
Adds
white-space: nowrap
for buttons within the editor's header while the show icon labels preference is enabled.Testing Instructions
Test snippet to add pinned plugin
Paste the following into dev tools:
Screenshots or screencast
Before:
After: