Problem/Motivation
We were discussing #3387665: Warn user when entity delete will cause menu item re-parenting in today's usability meeting #3420206: Drupal Usability Meeting 2024-02-16. The latter issue will have a link to a recording of the meeting. For the record the attendees of the meeting were @AaronMcHale, @benjifisher, @rkoller, @simohell, and @worldlinemine
If you take a look at a site that is set up with the Umami demo profile and you go to /en/admin/structure/menu/manage/main, out of the box you have Home, Articles, and Recipes as menu links. If you add another link, let's call it Test and you compare the list of available operations for the different menu links you will notice the following:
Home
Edit
Add child
Test
Edit
Add child
Delete
Articles
Edit
Delete (see #3421998: Menu links created by a view have a visually and functionally broken delete option
Add child
Recipes
Edit
Delete (see #3421998: Menu links created by a view have a visually and functionally broken delete option
Add child
Problem is without consulting the options of the button in the operations column there is no way to distinguish or even realize in the first place that there are different types of menu links with a different number of options available. At the moment the list of menu links is uniform, their category is only implicitly communicated by the number and type of operation options available. But in fact you have menu links created in code, you have menu links created in/by Views (technically also in code at least for the Umami example) and you have menu links created manually within the admin ui.
Steps to reproduce
1. Install Drupal 11.x-dev with the demo_umami
2. Go to /en/admin/structure/menu/manage/main
3. Create a new menu link called Test (/en/admin/structure/menu/manage/main/add?destination=/en/admin/structure/menu/manage/main)
Proposed resolution
The idea was to follow the pattern used on /en/admin/structure/block and introduce such a category column for menu pages as well.
Remaining tasks
- Decide which categories to create and how to name them
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | menu-links-list-after.png | 60.36 KB | benjifisher |
| #4 | menu-list-links-before.png | 54.22 KB | benjifisher |
Issue fork drupal-3422008
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
benjifisherMR 10750 is not ready for review, but it is ready for discussion.
The default edit form for the menu item has text like this:
That example is from the Home link in the Main navigation menu. It means the Standard profile: there is no Standard module. The
menu_link_contentmodule provides a different form that does not have this text.As a first step, I added the Provider column to the table of menu links, making that same information available without opening the edit form.
I also added the Expanded column. (The MR needs work: the choices made in this column are ignored when the form is saved.) That is out of scope for this issue, so I should probably make a new issue for it. Or we could expand the scope of this issue: add more information to the table of menu links from the edit forms for those links.
Screenshot using 11.x:
Screenshot using the branch from the MR: