Skip to content
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

Orientation Support: Not showing consistently across editors in Row block #39647

Closed
apeatling opened this issue Mar 22, 2022 · 5 comments · Fixed by #39650
Closed

Orientation Support: Not showing consistently across editors in Row block #39647

apeatling opened this issue Mar 22, 2022 · 5 comments · Fixed by #39650
Assignees
Labels
[Feature] Blocks Overall functionality of blocks [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Bug An existing feature does not function as intended

Comments

@apeatling
Copy link
Contributor

apeatling commented Mar 22, 2022

Description

It's been reported that the orientation settings are not showing consistently. For example using the skatepark theme and adding a row block in the post editor results in orientation settings now showing at all:

image

Skatepark does not have anything in theme.json to hide these settings.

Step-by-step reproduction instructions

  1. Activate the skatepark theme
  2. Open the site editor
  3. Add a row block
  4. Notice that the orientation settings are unavailable.

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@apeatling apeatling added [Type] Bug An existing feature does not function as intended [Feature] Blocks Overall functionality of blocks [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi labels Mar 22, 2022
@mtias
Copy link
Member

mtias commented Mar 22, 2022

The block is actually being inserted with the flag set to false in some circumstances. It also seems this should be a block / theme config not a block attribute.

<!-- wp:group {"layout":{"type":"flex","allowOrientation":false}} -->
<div class="wp-block-group"></div>
<!-- /wp:group -->

@andrewserong
Copy link
Contributor

Just following up, the fix that @youknowriad put together in #39650 ensures that it's hidden in all cases for the Group / Row block — it looks like the "Transform to variation" should be used to switch orientation in this case, as the Group block needs to support floated layouts.

As of #39532 the visibility of the orientation control can be set per-block at the block.json level.

@mtias
Copy link
Member

mtias commented Mar 23, 2022

@apeatling @andrewserong @youknowriad thinking a bit more about this, I think the orientation should be showing for the Row block. There's nothing inherent about rows being purely horizontal, and there's value in a vertically organized flex container that do stuff like space-between, etc. Maybe we want the name of the block to change to "Stack" or something like that for extra clarity, but I feel we are lacking that option and Group on its own doesn't provide it, so the transform to variation menu doesn't make much sense.

@youknowriad
Copy link
Contributor

@mtias I'm trying that in #39690

@apeatling
Copy link
Contributor Author

"Stack" is common across other platforms (for example interface builder for iOS), and comes without the assumption of orientation. Thumbs up for that.

@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants