Make the menu dropdown as scrollable.

Created on 18 October 2017, over 7 years ago
Updated 24 January 2023, over 2 years ago

It would be nice if the fixed positioning of the admin toolbar was configurable. In most cases, having the menu be fixed is fine, but when you have very long menus with many items, it's impossible to scroll to them since the menu is fixed.

โœจ Feature request
Status

Needs review

Version

3.0

Component

User interface

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States rael9

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

Merge Requests

Comments & Activities

Not all content is available!

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

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia rinku jacob 13 Kerala

    I have tested the patch with drupal version 9.5.3. Patch doesn't applied. getting some errors like this
    Checking patch css/admin.toolbar.css...
    error: while searching for:
    border-right: 1px solid #ddd;
    }

    .toolbar .toolbar-tray-horizontal ul ul li.menu-item:first-child {
    border-top: 1px solid #ddd;
    }

    .toolbar-tray-horizontal li.menu-item--expanded.hover-intent ul ul,

    error: patch failed: css/admin.toolbar.css:34
    error: css/admin.toolbar.css: patch does not apply
    Checking patch js/admin_toolbar.hoverintent.js...
    error: while searching for:
    // Other wise we get unwanted behaviour where menu items are expanded while already in hovering other ones.
    $(this).parent().find('li').removeClass('hover-intent');
    $(this).addClass('hover-intent');
    },
    out: function () {
    $(this).removeClass('hover-intent');
    },
    timeout: 250

    error: patch failed: js/admin_toolbar.hoverintent.js:6
    error: js/admin_toolbar.hoverintent.js: patch does not apply

  • ๐Ÿ‡ฆ๐Ÿ‡ทArgentina abelpzl

    #42 is applied correctly in 9.5.3 and in my opinion works as expected.

    Thanks for providing this solution.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia sonam.chaturvedi Pune

    Tried testing #42 with v3.3.0 on Drupal 10.1.x-dev.
    On applying patch, getting below:

    Skipped patch 'css/admin.toolbar.css'.
    Skipped patch 'js/admin_toolbar.hoverintent.js'.
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 8
    last update about 2 years ago
    17 pass
  • ๐Ÿ‡บ๐Ÿ‡ฆUkraine vselivanov Kyiv, Ukraine

    Rerolled #40 for the v3.3.1 - 3.x-dev 50ff7eb6 commit. Tested with Drupal 9.5.8.

  • Status changed to Needs work about 2 years ago
  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia nikhil_110

    Tried to apply patch #46 it is working fine for add content menu but not working properly for last content type in content type list for content type I have shared video.
    need to work on it.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance tostinni

    We've changed a little bit the patch so it can apply to Claro but also to Gin and works a little better with submenus as shown in #47 video.

    We haven't tested yet on RTL theme and also the vertical admin menu bar for Gin is not functional, so keeping status as Need work.

  • ๐Ÿ‡ฒ๐Ÿ‡ผMalawi chancenyasulu

    patch #46 works for me in drupal 9.4.10 Panopoly thank you.

  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 8
    last update over 1 year ago
    17 pass
  • ๐Ÿ‡ฆ๐Ÿ‡ทArgentina abelpzl

    Patch #46 could not be applied in admin_toolbar 3.4.1 and drupal 9.5.10.
    Instead #48 was applied correctly and seems to work correctly.

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada darkodev

    #48 works well for us on Drupal 10.1.3 and Admin Toolbar 3.4.1

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Indranil Roy kolkata

    Indranil Roy โ†’ made their first commit to this issueโ€™s fork.

  • I have just made a couple of theming changes based on #48 to improve the appearance. Using Claro theme and Drupal 9.5.11.

  • ๐Ÿ‡บ๐Ÿ‡ฆUkraine vselivanov Kyiv, Ukraine

    I rerolled patch #48 for Admin Toolbar 3.5.0 on Drupal 10.3.1

  • The attached patch does not build on the currently dominant approach to this issue (#54 at the moment), and allows the sub-menus to scroll (rather than expand laterally) as mentioned in the original request. It introduces a new override template with an added container div around the ul's to achieve the desired result. This required some adjustments to the CSS and Javascript, including a direct copy/tweak of some of the core toolbar module code.

    This is my first contribution, so kindly let me know if I've missed any steps or approached the process incorrectly. Based on 3.5.1 running on core 10.3.6.

  • ๐Ÿ‡ฎ๐Ÿ‡ณIndia Kanchan Bhogade

    Hi
    I've tested patch #55 on Drupal 10.3.x
    The patch is applied successfully...

    The menu dropdown is scrollable after applied patch

    Screenshots

  • Status changed to Needs review about 2 months ago
  • First commit to issue fork.
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada bsuttis

    Here's a reroll of the patch in #54 against admin_toolbar:3.6.0

  • Pipeline finished with Failed
    18 days ago
    Total: 363s
    #505131
  • Pipeline finished with Failed
    18 days ago
    Total: 220s
    #505152
  • Pipeline finished with Success
    18 days ago
    Total: 408s
    #505173
  • Pipeline finished with Success
    18 days ago
    Total: 391s
    #505178
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance dydave

    Thanks a lot everyone for the great work on this issue, all the contributed patches and comments! ๐Ÿ™

    Looks like there is already a lot of history in this issue, going back to 2017 ๐Ÿ˜…
     

    Let's try summing up the current status:

    Currently, this issue contains two different implementations to achieve a similar goal:

    Improve the way dropdown menus with many items are currently displayed, so they could be visible.

    1 - Multi-column menu dropdown: MR !150
    Based on patch #59 which is the latest version of the very first implementation of this feature, when the ticket was initially created, so it has quite a lot of reviews and testing feedback.

    Patch MR!150 displays long lists of items in dropdown menus broken down into multiple columns, so they could be displayed horizontally and fit the viewport, see a screenshot of the result:


     

    2 - Scrolling menu dropdown: MR !151
    Based on patch #55 which is a more recent approach of the feature with fewer exchanges, reviews or feedback, but seems like a very valid approach as well.

    Patch MR !151 displays long lists of items in dropdown menus with a fixed height and a scrollbar, to be displayed when scrolling up or down the menu dropdown, see a screenshot of the result:


     

    At this point, I have not started any kind of code review or careful testing of any of these merge requests, but only very superficial testing locally and they both seemed to work very well ๐Ÿ‘Œ
    Great job everyone! ๐Ÿฅณ

    OK, first of all, we need to clarify what implementation should be chosen in this issue:

    What solution should be implemented exactly? Solution 1 or 2 or something else?

    Keep in mind, it is always possible to make any of these solutions configurable through the backend, for example, to enable/disable or select one method or another (select list, checkbox, radios, etc...).
    It is also possible to break down this issue into multiple smaller issues with different types of implementations.

    But if we would like to make any kind of serious progress here, we should start by having a clear vision of the results that would be expected by the changes in this issue.

    What would be your suggestions on this?

    Otherwise from a coding standpoint, MR !150 is much less intrusive than MR !151 which changes the HTML structure and classes of the menu with a twig template override....
    So we would probably need to rework some of the code implementations once we have a better idea of the expected result.

    Keeping this issue in Needs review for now, as an attempt to attract more attention, get more feedback, reviews of the new merge requests and replies to the questions in this comment.

    Feel free to let us know if you have any questions or concerns on any aspects of this comment, the merge request or this issue in general, we would surely be glad to help.
    Thanks in advance! ๐Ÿ™‚

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance dydave
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance dydave

    dydave โ†’ changed the visibility of the branch 3.x to hidden.

  • Reroll of scrolling patch in #55 for admin_toolbar 3.6.0.

Production build 0.71.5 2024