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: Make it Dynamic #16810

Closed
mtias opened this issue Jul 30, 2019 · 3 comments · Fixed by #16796
Closed

Navigation Block: Make it Dynamic #16810

mtias opened this issue Jul 30, 2019 · 3 comments · Fixed by #16796
Assignees
Labels
[Block] Navigation Affects the Navigation Block

Comments

@mtias
Copy link
Member

mtias commented Jul 30, 2019

The navigation menu was initially represented as a collection of static links, but I think that is not appropriate at all for this block. Navigation is inherently a dynamic structure that needs to handle all these requirements:

  • Changes in a site's domain.
  • Updates to permalink structure.
  • Updates to item identity slugs (a page is changed).
  • Dynamically rendering current page (and current sub-menu holding the current page, etc).

I'd suggest converting it to a dynamic block now, where final render is server determined.

@mtias mtias added the [Feature] List View Menu item in the top toolbar to select blocks from a list of links. label Jul 30, 2019
@mtias mtias added [Block] Navigation Affects the Navigation Block and removed [Feature] List View Menu item in the top toolbar to select blocks from a list of links. labels Jul 30, 2019
@swissspidy
Copy link
Member

Apparently there's a WIP PR for this: #16796

@noisysocks
Copy link
Member

I was thinking that ideally I’d like the ‘hierarchy’ tree to be encoded in the inner block markup:

<!-- wp:menu -->
    <!-- wp:menu-item {"id": 123} -->
        <!-- wp:menu-item {"id": 123} /-->
    <!-- /wp:menu-item -->
    <!-- wp:menu-item {"id": 123} /-->
<!-- /wp:menu -->

@mtias
Copy link
Member Author

mtias commented Jul 31, 2019

@noisysocks indeed. It might also be a case to explore saving the internal editor state for that sub-tree without serializing to HTML. (This should not be a blocker, just something to explore.)

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.

4 participants