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

Duplicate choices under the Select existing menu dropdown in the placeholder state #36307

Closed
getdave opened this issue Nov 8, 2021 · 7 comments
Assignees
Labels
[Block] Navigation Affects the Navigation Block Needs Design Needs design efforts. [Type] Bug An existing feature does not function as intended

Comments

@getdave
Copy link
Contributor

getdave commented Nov 8, 2021

When you add a new Nav block you get duplicate choices under the Select existing menu dropdown in the placeholder state:

Screen Shot 2021-11-05 at 15 31 29

This is because the original "Classic" menus are still in place but x2 block-based, facsimile Menus have been auto-created on Theme switch (from Classic -> Block Theme).

I wonder whether we ought to filter out any items under Classic Menus which are already present under Menus. After all if you select one of the choices under Classic Menus then you are ultimately doing the same operation (creating a block-based copy of a classic Menu).

Would appreciate some design guidance - cc @jasmussen @javierarce.

Originally posted by @getdave in #36255 (review)

@getdave getdave added the [Block] Navigation Affects the Navigation Block label Nov 8, 2021
@getdave getdave self-assigned this Nov 8, 2021
@getdave getdave added Needs Design Needs design efforts. [Type] Bug An existing feature does not function as intended labels Nov 8, 2021
@draganescu draganescu added the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Nov 8, 2021
@draganescu
Copy link
Contributor

The problemI see which needs a designer's input is the UX around the fact that:

  • when a theme is switched the menus assigned to locations which can be migrated to areas are copied over to block menus
  • the block menus can be edited but the default titles would remain
  • simply filtering out the copied over would mean that if the user wants to get the original classic menu in the block context later they won't find it.

So the question is in my head: how to solve that bad UI withoutt crippling the baseline UX?

@getdave
Copy link
Contributor Author

getdave commented Nov 9, 2021

@draganescu - @jasmussen has a take on this in #36311 (comment)

@noisysocks noisysocks removed the Backport to WP 6.7 Beta/RC Pull request that needs to be backported to the WordPress major release that's currently in beta label Jan 17, 2022
@talldan
Copy link
Contributor

talldan commented Jan 18, 2022

A very similar problem was flagged in #38034 that a user can keep selecting the classic menu with each new nav block, and it's not clear that a new wp_navigation menu will be made each time.

Some options for improving the way classic menus are copied were outlined in #36311.

Currently, I believe we convert all classic menus at the point of selection in the nav block, but we don't then hide that option once the conversion has taken place. Perhaps we need to do that. We could try something like storing the id of the original classic menu in post meta of the new menu. Two potential issues with that:

  • If the user deletes the new menu, the reference will be lost and the classic menu will re-appear for selection, which might seem buggy to the user.
  • If the user modifies and renames the converted menu, is it still a duplicate of the classic menu?

Other options:

  • Changing the language in the section of the dropdown to something like 'Copy a classic menu'.
  • Showing a 'copy' icon next to each menu item with a tooltip 'This menu will be copied'.
  • Showing a dialog after a classic menu selection explaining what's about to happen. I don't know that this would be preferable, as recent improvements have been all about reducing friction in the setup of the block.

It might be best to start with something simple like the icon and tooltop?

cc @javierarce @jasmussen

@jasmussen
Copy link
Contributor

I appreciate the simplicity of the approach taken in #36311: hide the old menu based on the name of the new one. The effort there felt like it matched how often the use case is likely to come up, i.e. primarily on initial setup.

  • If the user modifies and renames the converted menu, is it still a duplicate of the classic menu?

Matching by name instead of ID would theoretically solve this one by letting the old one reappear.

  • If the user deletes the new menu, the reference will be lost and the classic menu will re-appear for selection, which might seem buggy to the user.

If old menus are prefixed or separated in the menu, perhaps with the suggested help text as well, it seems mostly harmless to let the original source reappear when a migrated version gets deleted. If that wasn't the case, we might even consider deleting the original version on initial conversion.

Two quick doodles:
Option 1
Option 2

@getdave
Copy link
Contributor Author

getdave commented Jan 18, 2022

I agree that making it clearer we are copying/important classic menus as opposed to simply selecting them is important.

@draganescu
Copy link
Contributor

I like @jasmussen 's doodle where there is some explanatory text in that dropdown.

Matching by name has the downside that creating a block menu with the same name as a classic menu, hides the classic menu, without it ever being imported. The problem is not that it hides it, but that there is no other way to get to that data.

IMO we should default to the most common usecases in the small footprint UI of the block tools and let advanced issues to a separate dedicated area. So hiding classic menus once we have imported them is great, even by name, if there is some other place where the user can revisit all the data (like a list of menus similar to the list of templates, where classic menus can be reimported, or some region in the inspector dedicated to this).

@mrfoxtalbot
Copy link

Considering that the menu selector has moved to the sidebar, that Classic menus are clearly separated in the UI and that #39489 is considered to be solved, I think we can close this issue. Right, @getdave, @jasmussen?

Screen Shot on 2022-10-10 at 16:10:02

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. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

No branches or pull requests

6 participants