-
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
Global Styles: Fix UI appearing on blocks that don't support text alignment #62376
Conversation
Size Change: +3 B (0%) Total Size: 1.75 MB
ℹ️ View Unchanged
|
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. |
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.
LGTM 👍
I could replicate the original issue and confirm this PR fixes the problem.
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.
LGTM
Thanks for the review! |
…gnment (#62376) Co-authored-by: t-hamano <[email protected]> Co-authored-by: aaronrobertshaw <[email protected]> Co-authored-by: juanfra <[email protected]> Co-authored-by: richtabor <[email protected]>
…gnment (#62376) Co-authored-by: t-hamano <[email protected]> Co-authored-by: aaronrobertshaw <[email protected]> Co-authored-by: juanfra <[email protected]> Co-authored-by: richtabor <[email protected]>
…gnment (WordPress#62376) Co-authored-by: t-hamano <[email protected]> Co-authored-by: aaronrobertshaw <[email protected]> Co-authored-by: juanfra <[email protected]> Co-authored-by: richtabor <[email protected]>
This was cherry-picked to the wp/6.6 branch. |
Fixes #62369
What?
This PR fixes an issue where the Text Alinment UI would unintentionally appear even though the block did not support
typography.textAlign
.Why?
#61182 changed
textAlign
totrue
in the defaulttheme.json
, so this support is enabled at a global level, but we still needed to check if a block actually supported it.How?
Added
textAlign
to theuseSettingsForBlockElement
hook.Testing Instructions
Visit the following screens in the default state. The Text Alignment UI should not be visible on any of the screens.
After that, add
textAlign
support to Media & Text.The Text Alignment UI should only be visible in the following places: