-
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
Template inspector: Small visual adjustments. #62537
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: +151 B (+0.01%) Total Size: 1.76 MB
ℹ️ View Unchanged
|
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 think this is a great improvement.
Whether the text wraps will depend on the locale, but I was particularly bothered by the narrow label width in Japanese. Since it's impractical to prevent all text wrapping in all locales, I think 38% is a reasonable value.
Before | After |
---|---|
If a template has a purple icon denoting synced/used in multiple places, now the text is also purple.
This PR also changes the text color of synced patterns and template parts, but that's to be expected, right?
Co-authored-by: Aki Hamano <[email protected]>
Yes, this is at least my take on it. We're being a bit inconsistent about it at the moment, showing all-purple in some places: There's just something more scannable when the title plus icon is the same color, than if it's only the icon. But if you prefer, I'm happy to extract that change to a separate PR, so we can land the other improvements? Speaking of 38%—is that wrapping actually better for japanese? Or would 40% be better? Is there a sweet-spot balance here? We want to be careful with the balance because in most cases, the content in the right column is the content that needs space. But if 40% is better than 38, happy to try it. |
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.
Speaking of 38%—is that wrapping actually better for japanese? Or would 40% be better?
In CJK languages, there are no spaces between words like in Latin languages. And there is no mechanism in CSS yet to distinguish between words in CJK languages and wrap them appropriately (I think that's why text-wrap:pretty
doesn't work in CJK languages).
To be precise, there is text-wrap: auto-phrase, but it is experimental and not supported by Firefox or Safari.
Therefore, I believe that wrapping text mid-word is common and acceptable in CJK languages.
If we want to completely prevent text wrapping in Japanese , we need a larger width.
Post: Requires 46%
width
Blog home template: Requires 48%
width
These widths will feel very wide in other languages, so I think it's fine to leave them at 38%
.
So I'm happy to give this PR a green check.
Thank you for the check. I'll merge when they pass, but then also be here for any followups re: purple text or not. |
* Template inspector: Small visual adjustments. * Update packages/editor/src/components/post-card-panel/style.scss Co-authored-by: Aki Hamano <[email protected]> --------- Co-authored-by: jasmussen <[email protected]> Co-authored-by: t-hamano <[email protected]>
What?
A small amount of spacing changes to the post/page/template inspector summary panel.
Why?
The added spacing avoids some wrapping and improves legibility.
How?
Page inspector before and after:
Template inspector ebefore and after:
Testing Instructions
Test the main document inspector in post, page, site editors, across pages and templates, and posts for good measure.