-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Hide toolbar slots for contentOnly pattern wrappers #73182
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
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: +35 B (0%) Total Size: 2.42 MB
ℹ️ View Unchanged
|
Are those links in the same slot as the tools we want to hide? Maybe we can hide slots selectively. Edit: or maybe we can move the controls we want to preserve into their own slot. Edit 2: the controls we want to preserve are all in the "other" slot so I adjusted the condition to keep those visible. That also has the advantage of keeping the Cover "replace" control visible, which I believe we want. Edit 3: I also moved the reusable block controls into the "other" slot for consistency. |
| group="inline" | ||
| className="block-editor-block-toolbar__slot" | ||
| /> | ||
| { ! isSectionContainer && ( |
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.
Nice idea!
Looking pretty good
Kapture.2025-11-12.at.14.17.38.mp4
I also checked unlocking patterns and "regular" blocks - toolbar items are there, but not when in content only mode.
|
Flaky tests detected in 9942cfd. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/19285059924
|
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.
It'd be good to get a second set of eyes on this, but from my perspective it LGTM
andrewserong
left a comment
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.
Oh, I like the approach here, it feels nice and elegant to me, and it still preserves the section styles shuffle button:
The toolbar feels cleaner, but it's still possible for folks to change their alignment once they go in to unlock the design:
2025-11-12.15.29.39.mp4
I smoke tested a bit with and without the contentOnly experiment and playing around with template parts, etc, and all seemed to be working well.
LGTM too!
|
Thanks for reviewing folks! |






What?
Fixes #71553.
When patterns are in contentOnly mode their wrapper toolbars shouldn't show controls such as Align or Justify.
This PR hides the slots that contain those controls for section blocks, similarly to what already happens in zoom out mode.
Testing Instructions