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.

CommentFileSizeAuthor
#72 admin_toolbar-scrolling-menus-2917168-72.patch2.11 KBharishpatel86
#71 admin_toolbar-scrolling-menus-2917168-71.patch8.16 KBgallant_dev
#68 2917168-mr150.patch6.13 KBuptil4music
#67 toolbar-add-block-misaligned.png41.3 KBjennypanighetti
#65 admin_toolbar-scrolling-menus-2917168-65.patch8.23 KBgallant_dev
#62 2917168-62-admin_toolbar-add-scrolling-menu1a.jpg100.72 KBdydave
#62 2917168-62-admin_toolbar-multi-column-menu1a.jpg137.04 KBdydave
#59 admin_toolbar-added_multi_column_menu_dropdown-2917168-59.patch5.5 KBbsuttis
#57 Before.png110.42 KBkanchan bhogade
#57 After.png104.45 KBkanchan bhogade
#55 admin_toolbar-scrolling-menu-example-comment55.jpg91.07 KBgallant_dev
#55 admin_toolbar-scrolling-menus-2917168-55.patch8.19 KBgallant_dev
#54 admin_toolbar-added_multi_column_menu_dropdown-2917168-54.patch5.63 KBvselivanov
#53 admin_toolbar-added_multi_column_menu_dropdown-2917168-53.patch5.67 KBoneillo
#48 admin_toolbar-added_multi_column_menu_dropdown-2917168-48.patch5.7 KBtostinni
#47 admin_toolbar-added_multi_column_menu_dropdown-2917168-47.mov10.69 MBnikhil_110
#46 admin_toolbar-added_multi_column_menu_dropdown-2917168-46.patch3.78 KBvselivanov
#42 admin_toolbar-added_multi_column_menu_dropdown-2917168-42.patch3.68 KBvselivanov
#41 53f4d808-7489-11e6-985c-6ceb4b96d729.gif929.73 KBklonos
#40 admin_toolbar-added_multi_column_menu_dropdown-2917168-40.patch3.85 KBstefanos.petrakis
#40 Untitled.png86.37 KBstefanos.petrakis
#31 added-multi-column-menu-dropdown-2917168-31.patch3.93 KBgalileo25
#29 menu.png98.47 KBadriancid
#28 interdiff-20-28.txt5.06 KBlyafel
#28 added-multi-column-menu-dropdown-2917168-28.patch3.88 KBlyafel
#27 interdiff-20-27.txt5.32 KBlyafel
#27 added-multi-column-menu-dropdown-2917168-27.patch4.14 KBlyafel
#25 menu-small.png115.52 KBmalcomio
#22 Add_content_type___Drupal_8_5_Test.jpg220.62 KBadriancid
#20 added-multi-column-menu-dropdown-2917168-20.patch2.7 KBdrintios
#17 tips_admin_menu.tar_.gz849 bytesSchaklaggedehu
#16 Bildschirmfoto_2018-02-27_18-44-21.png514.96 KBSchaklaggedehu
#16 Bildschirmfoto_2018-02-27_18-43-55.png646.44 KBSchaklaggedehu
#13 tips_admin_menu.tar_.gz837 bytesSchaklaggedehu
#9 created_configuration_form-admin_toolbar-2917168-9.patch3.71 KBamsteri
#7 admin_menu_issue.png34.34 KBkurinjiselvan v
#5 Image 2017-11-16 14-46-43.png1.78 MBrael9
Command icon 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

rael9 created an issue. See original summary.

adriancid’s picture

Hi @rael9 thanks for reporting, would be great if the next time you use the Issue Summary Template to report an issue.

Can you explain a more bit the issue please, maybe adding some screenshots?

adriancid’s picture

Status: Active » Postponed (maintainer needs more info)
adriancid’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

I'm closing this as we can't reproduce the issue, if the problem persists please feel free to reopen and update the status.

rael9’s picture

Status: Closed (cannot reproduce) » Active
StatusFileSize
new1.78 MB

Hi @adriancid,

Sorry I didn't get back to this sooner, it's been a busy couple of months. Also, sorry I didn't use the issue template. Due to the name, I assumed that was only for bugs, not feature requests.

I've attached a screenshot to try to illustrate what I'm talking about. Since the admin menu is fixed position, you can't access any of the menu items that go down below the bottom of the screen. When you scroll the page, the menu stays in place, so you can't scroll down to - in this case - the vocabularies past "Package Type". Obviously you can still click on "Taxonomy" and get to the other vocabs, but we had a request from a user to be able to scroll down to access the rest of the menu.

I felt this was more of a feature request than a bug or anything, since there is a simple workaround and it doesn't hamper you from being able to use the site. That being said, I can see where it might be useful for this to be configurable (the fixed state of the menu) for requests like ours (or just for people that don't care for fixed menus).

Let me know if you have any further questions.

adriancid’s picture

Thanks @rael9 I see the problem, and yes I have the same problem in some sites, let see if somebody can help us in this, I'm a little busy too in this days.

kurinjiselvan v’s picture

StatusFileSize
new34.34 KB

Hi,
I am also facing this issue. Its also affect the parent menu items. Please see the image below. I think in D7 menu will having scrolling option but in D8 the page only scrolling not the menu.

admin_menu_issue.png

kurinjiselvan v’s picture

Title: Make the stickiness of the menu configurable. » Make the menu dropdown as scrollable.
amsteri’s picture

Version: 8.x-1.20 » 8.x-1.22
Status: Active » Needs review
Issue tags: +Needs Review
StatusFileSize
new3.71 KB

I have ported feature from Drupal 7 administration menu module (Keep at the top) and this patch should resolve issues like this. Please make review and apply this patch.

kurinjiselvan v’s picture

Status: Needs review » Reviewed & tested by the community

Hi @Amsteri..
This patch working fine when the menu is not fixed at the top. If we enable the Keep menu at top of page, the menu having the scroll able problem which is mentioned before.

kurinjiselvan v’s picture

Status: Reviewed & tested by the community » Needs work
eme’s picture

Well, I think that we should adapt the way the sub-menu shows up to have them going up in JS as we often have enough space but we got the issue with the sub menus of the last menu elements. Maybe we could have less margin to maximize too ? That would allow us to keep the module plug & play and fix most of the issue without having a special option and let the other that wish to keep it sticky still have the issu...

Schaklaggedehu’s picture

StatusFileSize
new837 bytes

If you like, you can use my custom module. It doesn't make the menu scrollable, but if you have too many items in one menu, it creates multiple rows of entries.

adriancid’s picture

Hi @Schaklaggedehu I installed your module but I don't see any changes in my menus. Can you show some screenshots of yours?

eme’s picture

Same for me : no change...

Schaklaggedehu’s picture

Sure. Maybe you have to look into adjusting the css selectors, I don't know just yet.
As you can see in the images, the menu items get broken down into columns, if there are too many.

Schaklaggedehu’s picture

Issue tags: -
StatusFileSize
new849 bytes

Updated version. If there are more than 12 entries in a list, it gets broken down into multiple columns. Tested with drupal 8.6.

adriancid’s picture

Hi @Schaklaggedehu can you upload the patch please?

drintios’s picture

Assigned: Unassigned » drintios
drintios’s picture

Assigned: drintios » Unassigned
Status: Needs work » Needs review
StatusFileSize
new2.7 KB

I added fix based on @Schaklaggedehu custom module

adriancid’s picture

@drintios I patched the module but I don't see any changes, How many content types I need to have to see the two columns?

adriancid’s picture

Issue summary: View changes
StatusFileSize
new220.62 KB

@drintios I see it now, can you add some explanation about how this works?

And I see a minimal problem with the alignments, see the picture:

@eme Can you take a look at the last patch, please?

drintios’s picture

it works based on the screen height, if the content of dropdown is bigger than screen it splits into the amount of columns needed to be able to see the whole list, also yep alignment a bit broken need to do some little rework on the styles when dropdown divided in columns.

batkor’s picture

malcomio’s picture

StatusFileSize
new115.52 KB

Tested with the patch applied - works more or less OK, but if the screen is very small, then the bottom item of each column was not visible for me in Firefox.

Seemed to be less of a problem in Chrome, but still some of the options were not visible.

This issue existed in Seven and in Adminimal Theme, on a site where there are a lot of menus.
menu on small screen

malcomio’s picture

Status: Needs review » Needs work
lyafel’s picture

Version: 8.x-1.22 » 8.x-1.x-dev
Status: Needs work » Needs review
StatusFileSize
new4.14 KB
new5.32 KB

Based on previous patch, fixed the alignment of the items and the height of the menus so that the last items are not cut out.

lyafel’s picture

StatusFileSize
new3.88 KB
new5.06 KB

Removed some unexisting code that was failing the patch.

adriancid’s picture

Issue summary: View changes
Status: Needs review » Needs work
StatusFileSize
new98.47 KB

I tested the patch but the menu is not working well for me.

chris matthews’s picture

The patch in #28 still applied, but needs work per #29.

git apply -v added-multi-column-menu-dropdown-2917168-28.patch
Checking patch css/admin.toolbar.css...
Hunk #5 succeeded at 186 (offset 7 lines).
Hunk #6 succeeded at 214 (offset 7 lines).
Checking patch js/admin_toolbar.js...
Applied patch css/admin.toolbar.css cleanly.
Applied patch js/admin_toolbar.js cleanly.
galileo25’s picture

Status: Needs work » Needs review
StatusFileSize
new3.93 KB

@Chris Matthews

I've fixed margin from #28 The patch contains all changes from #28 and some CSS fixes

Please review

adriancid’s picture

I think this is not more needed in the branch 8.x-2.x, can you check? I don't have paragraphs installed now.

galileo25’s picture

@adriancid
Yes, you are right! In 8.x-2.x everything work's correct without any patches

adriancid’s picture

Status: Needs review » Closed (outdated)
the_glitch’s picture

Neither the 2.x-dev version or the patches fix anything. The menus don't scroll as this issue title suggests, it just cuts them in half and moves the cut off half up to the relative right position of the first half.

Also, when hovering over items in a long menu, both the 2.x-dev version and the stable and 1.x-dev versions with patches just make a mess of the menus by stacking submenu lists in front of other lists then somehow it selects and flickers submenus on and off by itself when the user hasn't moved the mouse over to the submenus at all. This the leaves user confused to where they are and where they're supposed to be in the menu.

Terrible UX.

Can this be fixed by just having scroll bars in each long list in the menus?

Perhaps these pages help:
https://css3menu.com/rq/scroll-bar-for-sub-menu-in-superfish-menu-css-3X...
https://stackoverflow.com/questions/38712857/how-to-show-sub-menu-when-u...

adriancid’s picture

@the_glitch will be great if you can provide a working patch for this issue.

thommyboy’s picture

Hi @All I installed 8.x-2.4 but can't see any of the improvement mentioned here 🤔
I got a vertical menu but some branches have too many items to display but I can't access them at the bottom and nothing splits into multiple columns- did I get something wrong?

the_glitch’s picture

Status: Closed (outdated) » Active
nwom’s picture

I agree, it appears none of these fixes were included in the newest dev.

#31 applies cleanly however appears to be broken, since the submenus instead overlap and flicker non-stop. Perhaps this has to do with me using the Adminimal Admin Toolbar as well?

#28 applies cleanly as well and appears to work better than #31, but the submenus are too far to the right away from the menu.

stefanos.petrakis’s picture

Version: 8.x-1.x-dev » 3.x-dev
Status: Active » Needs review
StatusFileSize
new86.37 KB
new3.85 KB

I am a bit split here:

First off, here is a reroll of #28 for 3.x-dev (N.B.: I tried #31 and it was breaking the layout).
With this patch and following #35 this issue should be renamed to "Split-n-stack into multiple columns to allow presenting longer lists horizontally on hover" (or sth similar).
This patch applies cleanly and seems to solve the problem, at least till the horizontal space is exhausted, when using the default admin_toolbar theme as per the screenshot below.

Second off, the easiest UX way out of this situation would be to switch to using the vertical version of admin_toolbar without any changes; the vertical orientation provides scrolling covering the case for very long lists. In this case, I would also be happy to see this issue closed with "works as designed".

Could the maintainers chip in on this?

klonos’s picture

StatusFileSize
new929.73 KB

I would like to offer an alternative possible solution here: in Backdrop, we have been using https://www.smartmenus.org as the library to provide responsive drop-down functionality for the main navigation menu (since v1.5.0 - released September 2016) and it has been serving us well since.

Although we have not implemented it yet, we have an issue in our queue to use the same library for the admin menu as well. One of the main reasons for it is that it allows for scrollable menus when they get too long and are rendered below the viewport:

smart menus scroll functionality

You can see the above in action if you head to https://www.smartmenus.org/about/themes and click the "Launch gallery" button (keep the example JS fiddles collapsed, and check out the submenus under the "Sub test" top-level item).

I believe that this would be a much more scalable solution, since even when stacking menus in horizontal chunks, you can still run out of screen space in very very long menus.

vselivanov’s picture

Reroll #40 for the latest 3.x-dev 9113639. Tested with Drupal 9.5.1.

rinku jacob 13’s picture

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

abelpzl’s picture

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

Thanks for providing this solution.

sonam.chaturvedi’s picture

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'.
vselivanov’s picture

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

nikhil_110’s picture

Status: Needs review » Needs work
StatusFileSize
new10.69 MB

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.

tostinni’s picture

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.

chancenyasulu’s picture

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

abelpzl’s picture

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.

darkodev’s picture

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

Indranil Roy made their first commit to this issue’s fork.

oneillo’s picture

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

vselivanov’s picture

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

gallant_dev’s picture

The attached patch does not build on the currently dominant approach to this issue (#54 at the moment), but 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.

scrolling menu screenshot

gallant_dev’s picture

Status: Needs work » Needs review
kanchan bhogade’s picture

StatusFileSize
new104.45 KB
new110.42 KB

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

dydave made their first commit to this issue’s fork.

bsuttis’s picture

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

dydave’s picture

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 result expected.

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 requests or this issue in general, we would surely be glad to help.
Thanks in advance! 🙂

dydave changed the visibility of the branch 3.x to hidden.

gallant_dev’s picture

Reroll of scrolling patch in #55 for admin_toolbar 3.6.0.

abelpzl’s picture

The patch in #65 is applicable to 3.6.1 and works correctly. I like the scroll bar that was added in the latest iterations.
I hope this will soon be part of the module.

jennypanighetti’s picture

StatusFileSize
new41.3 KB

Something seems to be affecting the CSS of fly-outs in unexpected ways. In my admin menu, the "Add content" submenu is fine and scrolls properly. But now the "Blocks" submenu is completely misaligned. I'm hovering over "Blocks" here and yet the submenu is placed above it. See attached screenshot.

This happens both with !MR51 and patch #65.

uptil4music’s picture

StatusFileSize
new6.13 KB

Reroll of MR150 for 3.6.2

gallant_dev’s picture

Re the visual regression flagged in #67 - this may be related to the recently-added setting making hoverintent optional. Enabling it again fixed the problem for me, as the patch was written when that library was mandatory. HTH!

ressa’s picture

Perhaps a compact display option could also help optimize the usage of space, as a supplement?

gallant_dev’s picture

Reroll of scrolling patch in #65 for admin_toolbar 3.6.3.

Note - I had to disable and re-enable hoverintent after applying the patch to get the submenus appearing correctly.

harishpatel86’s picture

Implemented a fix for the scrolling menus issue described in #7.

This patch improves submenu positioning/alignment for long admin menu trees and keeps nested flyout items aligned more consistently when the menu exceeds the viewport height.

Tested on admin_toolbar 3.6.3 and the patch applies cleanly.

charginghawk’s picture

FYI the #72 patch seems to apply to 3.6.2, not 3.6.3.