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

Spacer block no longer inherits orientation #58894

Closed
draganescu opened this issue Feb 9, 2024 · 8 comments · Fixed by #58921
Closed

Spacer block no longer inherits orientation #58894

draganescu opened this issue Feb 9, 2024 · 8 comments · Fixed by #58921
Assignees
Labels
[Block] Spacer Affects the Spacer Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@draganescu
Copy link
Contributor

Description

When a spacer block is inserted in a navigation block which has a default horizontal orientation, the spacer block is oriented vertically.

Step-by-step reproduction instructions

  1. In a tempalte
  2. Insert a navigation block
  3. Add a link or two
  4. Add a spacer block
  5. Notice the spacer spaces only up and down

Screenshots, screen recording, code snippet

spacer-orientation-layout-bug.mp4

Environment info

Gutenberg trunk.

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

@draganescu draganescu added [Type] Bug An existing feature does not function as intended [Block] Spacer Affects the Spacer Block Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta labels Feb 9, 2024
@draganescu
Copy link
Contributor Author

@tellthemachines in #49322 updated this block to inherit the orientation from the parent's layout. Something must have happened in the mean time.

@tellthemachines
Copy link
Contributor

I can't reproduce this on Gutenberg trunk, have you tried in on a clean install?

@t-hamano
Copy link
Contributor

@tellthemachines

If you are testing with TT4, you may not be able to reproduce this issue as the layout is already defined in the template part of the theme.

image

I think you can reproduce this problem by inserting the navigation somewhere else or creating a new navigation.

@tellthemachines
Copy link
Contributor

Oooh I see thanks! I can now reproduce this but it's not only in Gutenberg trunk, I can also see it in WP 6.4.3. Not sure if this can be classed as a regression but I agree it would be good to fix for this release 😅

@tellthemachines
Copy link
Contributor

I see what the problem is: we're checking the parent layout type but not default.type. I can do a quick PR to fix that

@tellthemachines
Copy link
Contributor

I suspect now that this never worked correctly and we somehow didn't notice until now 🤔

@youknowriad youknowriad removed the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Feb 12, 2024
@youknowriad
Copy link
Contributor

For clarity, I removed the label because it's meant for PRs not issues.

@draganescu
Copy link
Contributor Author

@youknowriad oops to eager me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Spacer Affects the Spacer Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants