Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Try replacing navigation page list with named navigation areas #212

Closed
carolinan opened this issue Nov 8, 2021 · 6 comments
Closed

Try replacing navigation page list with named navigation areas #212

carolinan opened this issue Nov 8, 2021 · 6 comments
Labels
[Type] Enhancement New feature or request
Milestone

Comments

@carolinan
Copy link
Collaborator

carolinan commented Nov 8, 2021

The theme could take advantage of the new navigation area block and at the same time, increase the usage and testing of the new block:
WordPress/gutenberg#36178

@kjellr kjellr added the [Type] Enhancement New feature or request label Nov 8, 2021
@kjellr
Copy link
Collaborator

kjellr commented Nov 8, 2021

How does this work if there are no navigation areas defined? Will the menu appear empty?

@carolinan
Copy link
Collaborator Author

It is empty on the front if there is no menu previously assigned to the area.

This works in the editor and for using existing menus.

<!-- wp:navigation-area {"area":"primary"} -->
<!-- wp:navigation {"itemsJustification":"right","isResponsive":true} /-->
<!-- /wp:navigation-area -->

But with the following code, the page list shows on the front.
In the editor, the page list is showing in the list view but is not used by the navigation block 🤔. Clicking the navigation block shows that it is empty:

<!-- wp:navigation-area {"area":"primary"} -->
<!-- wp:navigation {"itemsJustification":"right","isResponsive":true} -->
<!-- wp:page-list {"isNavigationChild":true,"showSubmenuIcon":true,"openSubmenusOnClick":false} /-->
<!-- /wp:navigation -->
<!-- /wp:navigation-area -->

@carolinan
Copy link
Collaborator Author

carolinan commented Nov 8, 2021

But we also need this area populated for when people switch from Twenty Twenty-Two 🤔 so that their menus show in the correct location.

@carolinan
Copy link
Collaborator Author

@jffng jffng added this to the Beta 2 milestone Nov 12, 2021
@carolinan
Copy link
Collaborator Author

I propose closing this, as navigation areas are being reverted:
https://github.com/WordPress/gutenberg/pull/36604/files

@kjellr
Copy link
Collaborator

kjellr commented Nov 18, 2021

That makes sense. I'll close for now, and we can reopen if something changes.

@kjellr kjellr closed this as completed Nov 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
[Type] Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants