-
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
Hide the orientation switcher from the group block #39650
Conversation
When toggled it also switched the block variation off, so you are back with a plain Group, which is confusing. |
Size Change: -4 B (0%) Total Size: 1.21 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.
Thanks for following up here @youknowriad, apologies for missing this one — I think I must have only checked for allowOrientation
within block.json
files so missed that the variation set the attribute.
This is testing nicely for me with existing blocks made before the PR, and with new blocks added after the PR. As you linked to on the previous decision, keeping the Orientation control hidden for both variations of the Group block makes sense, so that we can support floated alignments in the flow
variation 👍
When toggled it also switched the block variation off, so you are back with a plain Group, which is confusing.
It looks like that's because the Inherit toggle currently replaces the whole layout
state rather than just toggling the inherit
attribute. I think we can probably look at that in a separate PR.
@youknowriad @mtias I've opened up a separate PR to hide the "inherit default layout" toggle on non "flow" layouts in #39665 — is that what you had in mind? |
I agree that removing these two settings is the right call. |
Thanks for the fix! |
closes #39647
What?
This PR hides the orientation switcher from the "row" block variation.
Why?
It is arguable whether we should have a "column" block variation as well at some point for the group block, but until we do, it was never the intent to have an "orientation" switcher for the row variation. See original reasoning here #35819 (comment)
How?
Initially when we implemented the "allowOrientation" opt-out flag in the "layout" block support, it was mistakenly added as a block attribute property, while it should have been added as a block support flag.
The #39532 PR fixed that by making it a block support config (like it should be) but making sure the flag is false for the group "row" variation was missed.
Testing Instructions
Note
I just noticed that the "inherit default layout" is also visible for the "flex" layouts right now (row block). That doesn't make a lot of sense and it should probably be removed from there if the layout is not "flow"