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

Navigation Block: Render nav items from __unstableLocation even if there is content inside the block. #36865

Closed
scruffian opened this issue Nov 25, 2021 · 0 comments · Fixed by #36863
Labels
[Block] Navigation Affects the Navigation Block

Comments

@scruffian
Copy link
Contributor

scruffian commented Nov 25, 2021

Description

At present if a Navigation block has content, the __unstableLocation attribute will be ignored. This makes it impossible to specify a default for the block and also allow users update the menu from the Classic dashboard.

Instead, if the block has an __unstableLocation defined and there is a menu at that location, the contents of the block should be ignored.

When the user edits the navigation block then the __unstableLocation attribute should be removed, as at present.

Step-by-step reproduction instructions

  1. Create a navigation block with a site logo inside and an __unstableLocation
<!-- wp:navigation {"__unstableLocation":"primary"} -->
<!-- wp:site-logo /-->
<!-- /wp:navigation -->
  1. Notice that the site logo will always appear, even if I have a menu set at my "primary" location.

Screenshots, screen recording, code snippet

No response

Environment info

  • Tested with Blockbase and emptytheme

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant