Bundle sub-menu maximum not honored

Created on 1 February 2022, over 3 years ago
Updated 10 February 2023, over 2 years ago

Problem/Motivation

I've set the "Maximum number of bundle sub-menus to display" to a number, for example, 6. But not all of the menus seem to obey this setting. In particular, the Structure > Views and Content > Add Content menu items seem to show all of the items. But my Structure > Content types menu is correctly trimmed to the top 6.

Is this a feature, or a bug? I don't understand why some menu items are shortened and some are not.

System

Admin Toolbar 3.1.0, Drupal core 9.2.11

✨ Feature request
Status

Needs work

Version

3.1

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States jennypanighetti

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡·πŸ‡ΊRussia kiseleva.t

    Updated patch for latest 3.x-dev

  • Open on Drupal.org β†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 8
    last update almost 2 years ago
    Waiting for branch to pass
  • πŸ‡·πŸ‡ΊRussia kiseleva.t

    Updated MR with latest 3.x-dev version and exported static patch file to use with installed 3.4.1 module version on the project.

  • Status changed to Active about 1 month ago
  • πŸ‡«πŸ‡·France dydave

    Thanks a lot everyone for all the work and contributions in this issue, it's greatly appreciated! πŸ™

    I have taken a closer look at the issue summary and the comment from Jenny (@jennypanighetti) above at #3, and it would seem the problem described can still be reproduced with the latest version of the module.

    Comment #3 also suggests we should clarify the use of:
    Maximum number of bundle sub-menus to display
    In particular, what is considered "bundle sub-menu" and where their display should be limited.

    I personally agree with Jenny (@jennypanighetti) and think the behavior should be:
    1 - Consistent across all menu items where bundles are used (for example "Content types" and "Add content" should have the same limit enforced) and
    2 - For all entity types as well as config entities (Views, for example).

    Note the point (1) above would be closer to fixing a bug and (2) closer to a feature request.

    Additionally, the label and description texts of the corresponding configuration field, would also need to be updated to be clearer and align with the implementation chosen for the setting.

    The requirements for this feature should be clarified before going further into any implementation.
    We would need to go back through the tickets in which this feature was initially added and try to understand what the initial requirement was.

    If the initial requirement was:

    In the first place we added the limitation for UI reason and we did not think that the "Content > Add Content" sub links cause any trouble.

    For UI or performance reasons (maybe): trying to set a limit to the number of menu link items the module could create and most importantly, display in its dropdown sub-menus.
    If there are too many bundles or menu items in a sub-menu, then, there might not be enough room on the screen to display all the items and they would overflow out of the view port (not visible).

    Perhaps there could be different approaches or more generic ones that could potentially provide simpler solutions to the initial problem.
    Maybe setting a limit in general to all sub-menus at a certain depth could also work?!
    Something like: "Maximum number of menu links to display in sub-menus"

    Or something very specific like what was done in merge request MR !30 and patches above, allowing a very granular configuration of the maximum number of menu items per entity types, but with lots of fields.

    Or maybe a completely different approach, fixed with a UI solution, see:
    ✨ Make the menu dropdown as scrollable. Needs review

    We would greatly appreciate to have your opinion and feedback on this comment with the suggested logic and the steps to try moving this ticket forward.

    Feel free to let us know if you have any questions, comments or concerns on any aspects of this comment or the issue in general, we would certainly be happy to help.
    Thanks in advance! πŸ™‚

Production build 0.71.5 2024