Parent menu items with URLs are not linked to, do we make these available?

Created on 20 November 2023, 7 months ago
Updated 26 April 2024, 2 months ago

Problem/Motivation

The reason this isn't currently the case is a good one: User testing revealed that if a parent item is a link with an adjacent expand/collapse button, users still expect the link to expand/collapse the submenu. The toolbar was updated to match user intuition.

One thing that was lost, however, was the availability to click to navigate to the configured URL of that toolbar item. Gin already has a solution for this: an "Overview" link at the top of the submenu, that links to the URL assigned to that parent item. This is reasonably easy to implement, so lets provide an MR with that approach, but we should remain open to other solutions, too.

Example of a design exploration (not a final design) to illustrate this:

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

đź“Ś Task
Status

Closed: outdated

Version

1.0

Component

Code

Created by

🇺🇸United States bnjmnm Ann Arbor, MI

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @bnjmnm
  • Merge request !134#3402907 Overview link → (Open) created by bnjmnm
  • 🇪🇸Spain ckrina Barcelona

    Thanks Ben! I’m not sure though if we really want an “Overview” or “See all” link on all links that have children. It’s actually eating a lot of vertical space without actually adding value in most of them (admin/config is an exception). As discussed previously in Slack, this same solution is also being worked on a design perspective.
    But I think we should give this some thoughts beyond a technical or good looking design solution: do we really want this extra link everywhere? Adding the links there just "because they were there before” doesn’t feel like it’s solving a problem, but postponing a decision. But I have no answer for that and I’m not sure how to search for an answer. Leaving the comment here so we can continue the conversation and see if somebody can come up with ideas.

  • 🇺🇸United States bnjmnm Ann Arbor, MI

    Some scenarios come to mind that I think should be accounted for with whatever solution we come up with:

    • I do like the thought of getting a little opinionated with the goal of better UX. I'm on board with questioning "because that's how we've always done it" choices, but I also want to be considerate of existing sites that might be disrupted by the change. In particular, some sites might have additional top-level items that lead to destinations that aren't just section summaries, and removing those links could make it difficult to access something important. Possible Solution: make this a configuration option. On new sites, it will default to not having "Overview". Existing sites that upgrade to the new navigation could either automatically have "Overview" enabled - or perhaps only enable Overview if there are additional top-level items beyond what core provides.
    • In the Menu UI, each item has a field for "Link", including the top-level items. Even the current MR turning it into an Overview link messes with the the menu UI natural mapping. I think it would be even more disruptive if Link field does nothing for links in that position. Possible Solution: Solve a tricky design problem and update the menu UI to distinguish top level collapse/expand items from regular menu link items.
  • 🇫🇮Finland lauriii Finland

    I think @bnjmnm is raising a valid point that there could be existing menu links where it's necessary to be able to access the parent link. However, I'd recommend that we avoid introducing a site-wide configuration for this if possible. We don't want to make a maintainer of the site be responsible for knowing which option they should enable for their site.

    I'm wondering if we should just find a way to special case links pointing to \Drupal\system\Controller\SystemController::overview and \Drupal\system\Controller\SystemController::systemAdminMenuBlockPage to not display the overview links, while showing them for other links. The reason for the special case would be that these links are essentially just different representation of the children of that menu link. Routes to these controllers are special cased in \Drupal\system\EventSubscriber\AccessRouteAlterSubscriber::accessAdminMenuBlockPage, so maybe we could try to introduce something similar for the links too. 🤔

  • 🇺🇸United States bnjmnm Ann Arbor, MI
  • 🇦🇺Australia elgandoz Canberra

    Hey guys, sorry to intrude, I'm not on the working group and I know the module it's for researching UX improvements but I was curious to check the current state.
    After using the navigation bar for a short time I found this issue problematic.

    I think @bnjmnm is raising a valid point that there could be existing menu links where it's necessary to be able to access the parent link.

    I believe those menu items are more than a few and quite prominent: with the current behaviour I cannot directly access the pages to enable a new theme (or see the available ones), enable new modules (as before) and user management list, block placement. The only way is to access a subpage and then using the breadcrumb, requiring multiple clicks in different areas of the screen.
    I found particularly difficult accessing the Block Layout page, given the breadcrumb structure. Those are the bread and butter for every site-builder/manager, concerning the core modules only. There will be a lot more of those with many contrib modules using the long established menu pattern (like admin tools for clearing the cache or workbench, just to mention 2 I had installed).

    The "overview" option could sort of fix it but at the same time it seems wrong adding yet another set of menu items (Drupal with many modules has notoriously way too many) and adding yet another click for something that is already available, just not clickable. IMHO it's just a workaround for a wrong design.
    EG: for the Block Layout link, you would need an "Overview" (for the Block Layout) under another "Overview" (for Structure).
    Also, in few cases using Gin Toolbar I had to write code to remove the overview since the end users only had few permissions with few menu items and most of the time the extra link wasn't making any sense and it was just confusing the client (with Gin Toolbar you can actually click both the top level icon or the sub-menu "title", making the overview redundant). I really like to provide the most simple interface for the end user, the less the better.

    Lastly, when the toolbar is collapsed, I found it odd that some links open a sub-menu, while others go to a page (like the Content/File/Help). The behaviour has no immediate visual clue and is not predictable at glancing it, not until you hover the cursor. And even then I found myself quickly going to an item and immediately clicking it, only to have the submenu disappear. But maybe I'm biased after having used Gin Toolbar for a while, although there's a lot of fast clickers out there :)

    Are you sure not making the top level links clickable is the right path? I understand it has been user tested (maybe in isolation) but at the same time I believe that the behaviour should also match the way admin pages are currently organised.

    Sorry about the critic, I'm just very interested in this project and I wanted to provide a feedback about this particular topic.

  • 🇪🇸Spain ckrina Barcelona

    Adding a visual idea that came up where the parent item is visually different from the children.

  • 🇪🇸Spain ckrina Barcelona
  • 🇪🇸Spain ckrina Barcelona

    We haven’t decided the direction to take here yet, so this doesn’t expect any work yet.

    Open to ideas or suggestions on how to solve this though.

  • 🇺🇸United States johnpicozzi Providence, RI

    So another issue case that I have found. When using the Structure menu 1) you can't easily get to the Structure Page (as this issue indicates) 2) you also have the same issue with sub-items. As an example you can't get to the Block Layout Page. See attached screenshot.

    Not sure on a great solution here, but whatever we land on should resolve both issues.

  • 🇫🇮Finland lauriii Finland

    @johnpicozzi do you have a specific reason why you'd like to open "Structure" page? Wouldn't you be able to access all of the links directly from the navigation? I can definitely see that not being able to access "Block layout" is a problem.

  • 🇺🇸United States johnpicozzi Providence, RI

    @lauriii You raise a good point... I guess I don't have a use case to get to the Structure Page other than using it to get to the Block Layout Page. However, it might be worth asking around as I seems to remember some modules not always providing a menu item and only appearing on the overview page. That could be an edge case, the main issue here is not being able to get to sub-items like Black Layout.

  • 🇫🇮Finland lauriii Finland

    The overview pages are generated based on menus, so unless the module is doing something really unique (e.g. with preprocess), all of the links appearing in the overview pages should appear in the menu. See \Drupal\system\SystemManager::getAdminBlock if you're curious how the overview pages are generated.

    However, section pages built using other mechanisms like local tasks (i.e. Block Layout) or tables is still a common pattern, so we need to have some level of support for getting to the parent link. For example here's the same problem with Paragraphs module:

    Out of the box, Drupal doesn't provide links under the Block Layout link. I'm wondering which module is providing those links? 🤔

  • Issue was unassigned.
  • 🇺🇸United States bnjmnm Ann Arbor, MI
  • Status changed to Postponed 6 months ago
  • 🇪🇸Spain ckrina Barcelona

    Postponing this until designs are more advanced to see the different visual solutions and avoid people investing time here.

  • Pipeline finished with Success
    4 months ago
    #100378
  • 🇩🇪Germany rkoller NĂĽrnberg, Germany

    I think this is a more than relevant problem for cases like if you are trying to reach pages like /admin/modules, /admin/appearance, or /admin/people. Let's say you want to go to /admin/modules, right now the only available clickable sub menu items are Install new module, Uninstall module or Update, but the sub menu item you are actually interested in would be the list tab which is unavailable in the navigation. you have to click either uninstall module or update to reach a page that has the list tab available. plus on the Install new module page those tabs are not available. that is a rather complex process currently.

  • Pipeline finished with Canceled
    4 months ago
    Total: 851s
    #108225
  • Pipeline finished with Success
    4 months ago
    Total: 1069s
    #108247
  • Pipeline finished with Success
    2 months ago
    Total: 459s
    #152731
  • Status changed to Closed: outdated 2 months ago
  • 🇪🇸Spain ckrina Barcelona

    Closing as we've implemented new designs with a drawer to solve this.

  • Pipeline finished with Success
    about 2 months ago
    Total: 1242s
    #163832
  • Pipeline finished with Failed
    about 2 months ago
    Total: 1249s
    #163871
  • Pipeline finished with Failed
    about 2 months ago
    Total: 1171s
    #163975
  • Pipeline finished with Canceled
    about 2 months ago
    Total: 969s
    #164109
  • Pipeline finished with Failed
    about 2 months ago
    Total: 1167s
    #164123
  • Pipeline finished with Success
    about 2 months ago
    Total: 1053s
    #164208
  • Pipeline finished with Failed
    about 2 months ago
    Total: 1086s
    #164325
  • Pipeline finished with Failed
    about 2 months ago
    Total: 1223s
    #164495
  • Pipeline finished with Failed
    about 2 months ago
    Total: 339s
    #164707
  • Pipeline finished with Success
    about 2 months ago
    Total: 133s
    #164720
  • Pipeline finished with Success
    about 2 months ago
    Total: 180s
    #164732
  • Pipeline finished with Success
    about 2 months ago
    Total: 192s
    #164769
  • Pipeline finished with Success
    about 2 months ago
    Total: 132s
    #164770
  • Pipeline finished with Success
    about 2 months ago
    Total: 132s
    #164773
  • Pipeline finished with Success
    about 2 months ago
    Total: 132s
    #164776
  • Pipeline finished with Failed
    about 2 months ago
    Total: 385s
    #164802
  • Pipeline finished with Failed
    about 2 months ago
    Total: 256s
    #164815
  • Pipeline finished with Failed
    about 2 months ago
    Total: 976s
    #164813
  • Pipeline finished with Failed
    about 2 months ago
    Total: 337s
    #164901
  • Pipeline finished with Failed
    about 2 months ago
    Total: 162s
    #164912
  • Pipeline finished with Failed
    about 2 months ago
    Total: 131s
    #164922
  • Pipeline finished with Failed
    about 2 months ago
    #164926
  • Pipeline finished with Failed
    about 2 months ago
    #164933
  • Pipeline finished with Failed
    about 2 months ago
    #164935
  • Pipeline finished with Failed
    about 2 months ago
    Total: 182s
    #164939
  • Pipeline finished with Failed
    about 2 months ago
    Total: 1029s
    #165092
  • Pipeline finished with Success
    about 2 months ago
    Total: 1111s
    #165229
  • Pipeline finished with Canceled
    about 2 months ago
    Total: 210s
    #165682
  • Pipeline finished with Canceled
    about 2 months ago
    #165683
  • Pipeline finished with Success
    about 2 months ago
    #165687
  • Pipeline finished with Skipped
    about 2 months ago
    #165708
Production build 0.69.0 2024