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: Automatically name menus and remove "Save as" button from toolbar #36575

Closed
mkaz opened this issue Nov 17, 2021 · 4 comments
Closed
Labels
[Block] Navigation Affects the Navigation Block [Priority] High Used to indicate top priority items that need quick attention

Comments

@mkaz
Copy link
Member

mkaz commented Nov 17, 2021

The navigation block saves its content to a custom post type, this helps persist it across classic and block theme switches. This mechanism to save should not impede the user flow when creating a menu.

This was discussed in a different PR, pulling out @mtias comment from #36169 (comment):

It's important saving menus is as transparent to users as we can conjure.
Untitled menus is a poor experience; a user should not have to name things.
We should aim to auto-generate a name based on the template part a navigation is used. If a menu is added to a template root, we should use that, or just a numbered one.

Example: navigation-header, navigation-header-with-banner, navigation-1, navigation-archive, etc.

Menus can be renamed in the inspector, not in the toolbar, and the "Save as" button can then be removed.

cc: @jasmussen @adamziel @getdave - I know y'all might be creating similar must-have tickets, I didn't see another matching this one, so wanted to make sure it was captured.

@mkaz mkaz added the [Block] Navigation Affects the Navigation Block label Nov 17, 2021
@priethor priethor added the [Priority] High Used to indicate top priority items that need quick attention label Nov 17, 2021
@mkaz
Copy link
Member Author

mkaz commented Nov 18, 2021

Is this a duplicate of #36524? It looks like the proposed solution in that issue would solve this, we can close this since there is more discussion and background there.

@talldan
Copy link
Contributor

talldan commented Nov 18, 2021

@mkaz #36524 is about changing the menu id to be a slug, and automatically generating that slug based on where the block is rendered (I imagine from the template part area that the block is within).

At the moment, the menu name is a separate thing (a post title). It's unclear to me whether the idea is to remove the menu name and only have a slug. Maybe that's the case, if it is this can be closed as a duplicate (cc @mtias - would you be able to clarify?).

@mtias
Copy link
Member

mtias commented Nov 18, 2021

Name and slug should match, we should generate a name "{Template Part Name} Menu" that WP also saves as a slug as it normally does. The name is useful for the focused template part display, etc.

Regarding the "save as" the idea is to align with other blocks that have saving flows (reusable blocks, etc). This last point is not targeted for 5.9 as it's an ongoing area of work and ideation.

@mkaz
Copy link
Member Author

mkaz commented Nov 18, 2021

Ok, I'm going to close this one and reopen @tellthemachines ticket #36593 that is specific to the "Save as" part, there more details and a screenshot in that ticket so better to work off.

So then ticket #36524 can cover both name and slug per Matias comment above.

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 [Priority] High Used to indicate top priority items that need quick attention
Projects
None yet
Development

No branches or pull requests

4 participants