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 - improve placeholder flow #35818

Closed
Tracked by #35521
talldan opened this issue Oct 21, 2021 · 6 comments · Fixed by #36023
Closed
Tracked by #35521

Navigation Block - improve placeholder flow #35818

talldan opened this issue Oct 21, 2021 · 6 comments · Fixed by #36023
Assignees
Labels
[Block] Navigation Affects the Navigation Block Needs Design Needs design efforts. [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Comments

@talldan
Copy link
Contributor

talldan commented Oct 21, 2021

What problem does this address?

#35746 would introduce the concept of saving a navigation block's data to a separate post type, similar to how a template part works.

That PR introduces an extra step in the block setup. First you create or choose an existing 'Navigation menu':
Screenshot 2021-10-21 at 2 22 03 pm

If a new one is created there's a second step with the familiar block interface placeholder:
Screenshot 2021-10-21 at 2 23 02 pm

This could do with some refinement.

@talldan talldan added [Block] Navigation Affects the Navigation Block [Type] Enhancement A suggestion for improvement. Needs Design Needs design efforts. labels Oct 21, 2021
@talldan talldan changed the title Navigation Block - improve placeholder when saving a navigation block to a post type Navigation Block - improve placeholder flow Oct 22, 2021
@tellthemachines tellthemachines self-assigned this Oct 25, 2021
@tellthemachines
Copy link
Contributor

One thing that might be confusing is the apparent repetition between "Choose existing" (navigation block) and "Add existing menu" (classic menu). Ideally we have a single-step placeholder, but just putting all the current options of the two placeholders together won't work very well. Would be great to have some design thoughts on this! Cc. @jasmussen

(I assigned myself the issue as I'm happy to deal with the implementation but need some guidance on what to do 😅 )

@talldan
Copy link
Contributor Author

talldan commented Oct 25, 2021

Yeah, that is definitely confusing.

Perhaps the 'Add existing menu' option could be rephrased to something like 'Copy existing menu', and the dropdown could include both the new navigation menus and classic menus.

@jasmussen
Copy link
Contributor

Some of the dynamic behavior of the new interface is still a little beyond me so forgive me if I'm slow to pick this up, and please correct what I get wrong, thank you. As I understand it:

  • In the first step you can choose to link to an existing cpt-saved menu which when edited syncs all the way round, whether being edited in the block or the screen.
  • If you click "new", it's just the block as we know it, and it behaves like other blocks needing to be in a template part or reusable block if it needs to be synced.

If that is the case, then it seems like the simplest solution would be to move the "Choose existing" dropdown into the block itself, and to replace the "Add existing menu" dropdown. What would be the shortcomings of this one?

@talldan
Copy link
Contributor Author

talldan commented Oct 25, 2021

If you click "new", it's just the block as we know it, and it behaves like other blocks needing to be in a template part or reusable block if it needs to be synced.

This step does create a new 'wp_navigation' post. It's based on the flow when adding a new Template Part block.

It could be an option to move the naming of the post until after having clicked 'Start empty' or 'Add all pages'. So there would be one step to the placeholder with the following options:

  • 'Use existing menu' - dropdown contains both the new 'wp_navigation' posts and classic menus. If the user selects a 'wp_navigation' menu it's loaded without the user having to name it. If a classic menu is selected, the user has an option to name the menu, but the input is perhaps pre-filled with the name of the classic menu?
  • 'Add all pages' - after clicking user has to name the menu
  • 'Start empty' - after clicking user has to name the menu

@tellthemachines
Copy link
Contributor

If a classic menu is selected, the user has an option to name the menu, but the input is perhaps pre-filled with the name of the classic menu?

What if we just use the classic menu name and skip this step altogether? The name can always be changed later in the inspector.

@talldan
Copy link
Contributor Author

talldan commented Oct 26, 2021

Yeah, wasn't sure whether it would be necessary. Sounds good 👍

@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Oct 28, 2021
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 Needs Design Needs design efforts. [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants