-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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 Interface: Remove small header from global styles/plugin sidebar #64474
Conversation
### smallScreenTitle | ||
|
||
In small screens, the complementary area may take up the entire screen. | ||
`smallScreenTitle` allows displaying a title above the complementary area, so the user is more aware of what the area refers to. | ||
|
||
- Type: `String` | ||
- Required: No |
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 wondering if we should simply remove this prop, or show a deprecation message.
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 like simply removing it but wouldn’t say I know best.
Size Change: -386 B (-0.02%) Total Size: 1.81 MB
ℹ️ View Unchanged
|
b461c36
to
ac9b9a2
Compare
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. |
Thank you, this is all working as advertised for me. |
Thanks so much for working on this, this is an important one! 🙏 |
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.
This makes for a nice cleanup in UI and code and I spotted nothing out of place in either. Nicely done.
I'm sure you may wish to wait for a second opinion—at the least about the decision to remove smallScreenTitle
without deprecation.
### smallScreenTitle | ||
|
||
In small screens, the complementary area may take up the entire screen. | ||
`smallScreenTitle` allows displaying a title above the complementary area, so the user is more aware of what the area refers to. | ||
|
||
- Type: `String` | ||
- Required: No |
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 like simply removing it but wouldn’t say I know best.
@stokesman Thanks for the feedback! After thinking about it, I realized that developers who use the What do you think? |
Perhaps. The caution is good and may be the side to err on. Still, I don’t think I can see utility in the Another consideration that may factor in is that a plugin consuming the interface package has to bundle it and so cannot be directly broken by new releases of the package. Maybe that permits moving forward with the removed prop. If so, a dev note seems a good idea along with a changelog entry. Totally separate but I wonder what’s up with the excessive line-height as seen in your screenshot (at "Add your own CSS…of your site…"): I’m curious as it looks okay to me on Chrome/MacOS. |
I didn't know this! The If that's the case, adding a changelog and writing a dev note would be enough.
The problem turned out to be caused by the link having a top margin. The issue wasn't apparent on the desktop view, but the PR rexposes additional CSS for mobile, so it's causing an issue: I solved it by adding the |
I’d forgotten it until I tested the MailPoet plugin on this branch then noticed the changes don’t affect it and had to remember why.
It‘s true that a WordPress update will have the latest Nice that you fixed the little issue making the line-height look off. Makes sense. This LGTM again. You may wish to have another member give it a sanity check though. |
aec761b
to
d010b1a
Compare
Flaky tests detected in d010b1a. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11456987547
|
Closed #62067 manually. GitHub only recognizes the first issue after the unique keyword. If you want to link multiple issues to a single PR, use the keyword for each one. Example:
|
…ar (WordPress#64474) Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: stokesman <presstoke@git.wordpress.org> Co-authored-by: jameskoster <jameskoster@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org> Co-authored-by: afercia <afercia@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Fixes #64095, #62067
What?
This PR removes the small screen header from theComplementaryAreaHeader
component. This means that thesmallScreenTitle
prop on theComplementaryArea
component will be removed.This PR removes the small screen header from the global styles sidebar and plugin sidebar.
Why?
As mentioned in #62067, it seems that a header for small screens was necessary up until WP6.3:
However, now that the default header has exactly the same functionality, it seems that a header for small screens is no longer necessary.
How?
This PR also exposes some header buttons (revisions, more menu) that were intentionally hidden on smaller screens.
This makes the following features available on smaller screens:
I initially thought about removing the
smallScreenTitle
prop from theComplementaryArea
component, but it seems that there are plugins that use theComplementaryArea
component directly to build their own sidebars.smallScreenTitle
prop defined in the MailPoet pluginI decided to keep this prop because these plugins may still want to provide the title for mobile:Update: This component is not exposed in the global wp object. Developers must explicitly bundle the interface package. This means that unless developers update their interface package, it will not be affected by this PR. Therefore, we decided to remove the
smallScreenTitle
prop.Testing Instructions
Verify that the following screens are displayed correctly on a small screen and that the newly exposed features work.
Screenshots or screencast
Block Inspector
Global Styles
PluginsSidebar
Run the following code in your browser console:
Details
Global Styles Revisions
Additional CSS