-
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
Use correct layout type to display controls. #59979
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: +25 B (0%) Total Size: 1.71 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.
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 fix, this is testing well for me, too! ✨
Fixes an issue I encountered in working on #42240.
I just noticed that issue describes switching over to grid instead of flex, but I'm wondering if it'd be better to allow both, with the option to switch between them, since grid and flex can offer slightly different styling possibilities? I'll leave a comment over on that issue since it's not related to this PR 🙂
Edit: added a comment over here: #42240 (comment)
Co-authored-by: tellthemachines <[email protected]> Co-authored-by: ramonjd <[email protected]> Co-authored-by: andrewserong <[email protected]>
What?
Fixes an issue I encountered in working on #42240.
When a block's default layout type is set to anything other than "default" or "constrained", the
allowInheriting
property should have no effect. But because we were only checking the layout's type inlayout.type
and not inlayout.default.type
, other default layout types were not being evaluated correctly, and were depending on explicitly settingallowInheriting
tofalse
in the block.json in order to hide the "Inner blocks use content width" toggle.It should not be necessary to set
allowInheriting
explicitly when adding a default flex or grid layout type to a block.Testing Instructions
"allowInheriting": false,
from the layout config in packages/block-library/src/buttons/block.json.