Problem/Motivation

During the usability sessions, some participants did not notice the toolbar on mobile, as struggled to get back to their administrative content area.

When the toolbar was originally designed, mobile devices had limited screen sizes and vertical height was a premium, times have changed maaan.

Proposed resolution

Set position fixed on mobile

To avoid the mobile toolbar having too many items and crowding the viewport, when at mobile widths, collapse toolbar tabs that don't open trays into a single toolbar tab that can be toggled to hide/show the items.

Remaining tasks

Implement the change
Test

User interface changes

Fixed toolbar on mobile which is always visible to the user.
Toolbar tabs that don't open trays are collapsed on mobile.

API changes

None

Data model changes

None

CommentFileSizeAuthor
#131 Captura de pantalla 2023-08-31 a les 18.18.13.png27.42 KBckrina
#130 Screen Recording 2023-08-29 at 4.34.34 PM.mov8.41 MButkarsh_33
#120 Screen Recording 2023-06-29 at 2.46.34 PM.mov1.46 MBhooroomoo
#119 Screenshot 2023-06-12 at 11.49.34 AM.png62.9 KBnarendrar
#118 Screenshot 2023-06-08 at 2.36.12 PM.png11.78 KBsmustgrave
#113 Screenshot 2023-06-01 at 7.01.09 PM.png61.56 KButkarsh_33
#110 Screen Recording 2023-05-11 at 1.35.05 PM.mov514.02 KBhooroomoo
#108 AfterChanges.png256.49 KButkarsh_33
#108 BeforeChanges.png199.32 KButkarsh_33
#97 2516938-3809-patch.mov4.36 MBpradipmodh13
#96 after.png38.61 KBraveen_thakur51
#96 before.png24.7 KBraveen_thakur51
#92 toggle-extra-2 (1).gif10.32 MBbnjmnm
#87 2516938--after--patch--pic.png51.21 KBvikashsoni
#87 2516938--before--patch--pic.png33.12 KBvikashsoni
#79 confused.png46.34 KBdroplet
#78 toolbar-many-tabs-mobile.png72.83 KBbnjmnm
#76 Before_Iphone_X.png66.9 KBpriyanka.sahni
#76 Before_Iphone_6:7:8Plus.png82.68 KBpriyanka.sahni
#76 Before_Iphone.png59.56 KBpriyanka.sahni
#76 After_Iphone.png73.83 KBpriyanka.sahni
#76 After_Iphone_6:7:8.png77.35 KBpriyanka.sahni
#76 After_Iphone_6:7:8Plus.png90.39 KBpriyanka.sahni
#76 After_Iphone_X.png62.77 KBpriyanka.sahni
#73 core-toolbar-mobile-2516938-73.patch2.15 KBnod_
#71 9.1.x_afterPatch.JPG28.08 KBpankaj.singh
#71 9.1.x_beforePatch.JPG26.19 KBpankaj.singh
#71 9.1.x_patchApplied.JPG67.94 KBpankaj.singh
#70 interdiff-69-70.txt4.91 KBnod_
#70 core-toolbar-mobile-2516938-70.patch7.3 KBnod_
#69 core-toolbar-mobile-2516938-69.patch10.16 KBnod_
#66 9.1.x-dev_patchFailed.JPG110.55 KBpankaj.singh
#66 8.9.x_beforePatch.JPG35.48 KBpankaj.singh
#66 8.9.x_beforePatch.JPG35.48 KBpankaj.singh
#66 8.9.x_patchApplied.JPG79.85 KBpankaj.singh
#44 toolbar_fixed_height-2516938-44.patch10.03 KBjamesashok
#44 After Patch - After Scroll.png79.01 KBjamesashok
#44 Before Patch - After Scroll.png56.27 KBjamesashok
#42 2516938_42.patch1.91 KBgrathbone
#36 toolbar-fixed-all-time.patch1.1 KBdroplet
#31 2864051-12.patch966 bytestameeshb
#25 fixed_mobile_toolbar-2516938-25.patch6.07 KBgrapefruitjuice
#25 interdiff-2516938-14-25.txt2.26 KBgrapefruitjuice
#23 Patch Applied-Toolbar.png24.47 KBmeenakshi.r
#23 Without Patch-Toolbar.png21.95 KBmeenakshi.r
#21 fixed_mobile_toolbar-2516938-10.patch1004 bytesellizard
#21 admin_menu_scroll_before.png23.1 KBellizard
#21 admin_menu_scroll_after.png19.68 KBellizard
#21 admin_menu_open_before.png22.09 KBellizard
#21 admin_menu_open_after.png23.68 KBellizard
#18 fixed_mobile_toolbar-2516938-18.patch6.07 KBgrapefruitjuice
#18 interdiff-2516938-14-18.txt2.26 KBgrapefruitjuice
#14 fixed_mobile_toolbar-2516938-14.patch4.52 KBgrapefruitjuice
#14 interdiff-2516938-10-14.txt3.57 KBgrapefruitjuice
#10 fixed_mobile_toolbar-2516938-10.patch1.31 KBdpetruk
#9 toolbar-lost-menu.png23.6 KBMattA
#7 Screen Shot 2015-08-14 at 09.42.58.jpg101.88 KBlewisnyman
#4 Screen Shot 2015-08-13 at 14.44.52.jpg207.82 KBlewisnyman
#4 Screen Shot 2015-08-13 at 14.40.46.jpg894.97 KBlewisnyman
#2 fixed_mobile_toolbar-2516938-2.patch936 bytesmerilainen

Issue fork drupal-2516938

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

lewisnyman’s picture

Component: ckeditor.module » toolbar.module
merilainen’s picture

Status: Active » Needs work
StatusFileSize
new936 bytes

Here is a plain CSS fix for this. Probably the javascript should be updated not to toggle the toolbar-fixed css class, but I'm not familiar enough to change the code and make sure it works with the Barebone library.

lewisnyman’s picture

Status: Needs work » Needs review
lewisnyman’s picture

Issue summary: View changes
Status: Needs review » Needs work
StatusFileSize
new894.97 KB
new207.82 KB

Ok thanks, this change also affects desktop as well as mobile. I'll ping tkoleary and ask if there was a design decision behind not making it fixed position.

In any case, this introduces a few visual oddities on desktop, we can choose to fix them here or we can choose to make this patch mobile only which doesn't seem to introduce the issues.

johnalbin’s picture

I'll ping tkoleary and ask if there was a design decision behind not making it fixed position.

It was because position fixed didn't work in iOS 7.
http://caniuse.com/#feat=css-fixed

wim leers’s picture

I think JohnAlbin may be right: I vaguely remember that this was done solely for browser compatibility reasons. It would be good though if Kevin could confirm this.

lewisnyman’s picture

Issue summary: View changes
StatusFileSize
new101.88 KB

Ah right, iOS7 had a show stopping bug which meant that the toolbar always stayed fixed even when you zoom in on text inputs, in many cases covering up the text inputs. This was fixed at some point because on iOS8 the behaviour is that the position: fixed is disabled while an input is in focus. It returns when the focus is moved to a non-input element. Here's a screenshot in iOS8 with the current patch.

I can't seem to recreate the original bug on my iOS7 simulator, it's possible it was fixed in a 7.x point release.

wim leers’s picture

I can't seem to recreate the original bug on my iOS7 simulator, it's possible it was fixed in a 7.x point release.

Applying Drupalisms to iOS :P

MattA’s picture

Here's another reason to make it fixed:

dpetruk’s picture

Status: Needs work » Needs review
Issue tags: +dcuacs2015
StatusFileSize
new1.31 KB

Hi, all!

If we will decide to keep toolbar menu fixed. I suggest this patch.
I've changed style for toolbar and removed unnecessary js code.

dpetruk’s picture

Also, about zoom bug.

https://www.drupal.org/files/issues/prevent_auto_zoom_in_mobile-2516918-...
This patch can fix many issues with zoom on mobile. But it might not be so comfortable for people with bad eyesight.

lewisnyman’s picture

Status: Needs review » Reviewed & tested by the community

I manually tested this patch and I'm happy with the changes here. We don't have a formally list of mobile devices to test. As this bug was only ever reported for iOS, I feel safe marking this as RTBC without introducing regressions.

wim leers’s picture

Title: Set the toolbar to position fixed on mobile. » Set the toolbar to position fixed on mobile
Status: Reviewed & tested by the community » Needs work
Issue tags: +JavaScript
+++ b/core/modules/toolbar/js/views/BodyVisualView.js
@@ -38,8 +38,6 @@
-        .toggleClass('toolbar-fixed', (isViewportOverflowConstrained || this.model.get('isFixed')))

We should also remove the isFixed property from the model, and the toolbar-fixed class from the CSS and JS.

grapefruitjuice’s picture

Status: Needs work » Needs review
StatusFileSize
new3.57 KB
new4.52 KB

Removed "isFixed" from model and also removed "toolbar-fixed" class from the CSS and JS.

wim leers’s picture

Issue tags: +Needs manual testing

Looks good, but this does mean we need another round of manual testing IMO.

nod_’s picture

Status: Needs review » Needs work

Things related to isViewportOverflowConstrained must go too, that would solve the eslint error too.

And now there is a zindex issue, some header links show up on top of the toolbar (like my account, home, log out).

grapefruitjuice’s picture

Assigned: Unassigned » grapefruitjuice
grapefruitjuice’s picture

Status: Needs work » Needs review
StatusFileSize
new2.26 KB
new6.07 KB

Removed things related to isViewportOverflowConstrained, added position: static for #toolbar-administration to prevent zindex issue.

droplet’s picture

It's a bit buggy from my last test in #14 when you scroll the mobile down and scroll back to top very fast (like pull to fresh, out of screen size).

the debounce function in Drupal.drupalDisplace caused the wrong calculate. (leaves a big grey gap)
$(window).on('resize.drupalDisplace', debounce(displace, 200));

MattA’s picture

Assigned: grapefruitjuice » Unassigned

@droplet That sounds a lot like the issue I reported in #2551777: Scrolling creates an empty space on mobile browsers a while back. It is actually a separate bug since it happens regardless of the position:fixed property.

ellizard’s picture

lucastockmann’s picture

Assigned: Unassigned » lucastockmann

I'm going to review this.

meenakshi.r’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new21.95 KB
new24.47 KB

Issue is fixed & tested.

Before applying patch

After applying patch

wim leers’s picture

Status: Reviewed & tested by the community » Needs work

#21 lost all JavaScript changes. It was a bad reroll.

grapefruitjuice’s picture

Status: Needs work » Needs review
StatusFileSize
new2.26 KB
new6.07 KB

What about patch from #18 ? Wich includes javascript changes and zindex fixes.
Just re-added.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

droplet’s picture

Status: Needs review » Needs work

I like some changes in this patch. But I'd say to keep it clean and let it move forward. Dead code / improves can be cleanup in other issues.

Above JS changes are uncertain (from my EXP on #2542050: Toolbar implementation creates super annoying re-rendering.. I can't tell the exact problem now but it's a bit tricky.)

.toolbar-fixed was designed to set Toolbar to be fixed. But now it is not present in mobile. Here's the problem we have to address.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

lauriii’s picture

tameeshb’s picture

Status: Needs work » Needs review
StatusFileSize
new966 bytes

Status: Needs review » Needs work

The last submitted patch, 31: 2864051-12.patch, failed testing.

vj’s picture

Applied #31 patch on 8.4.x. Worked for me. Just need to clear cache after patch

aaronchristian’s picture

Patch works well for me too. The duplicates @laurii has noted were RTBC and have been closed already.

There are 4 coding standards messages but are unrelated to this patch.

Setting this to RTBC unless anyone else objects.

aaronchristian’s picture

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

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new1.1 KB

It has a wired implementation in Toolbar's MQ handler

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

grathbone’s picture

StatusFileSize
new1.91 KB

Rerolled #36 for 8.8.x.

lucastockmann’s picture

Assigned: lucastockmann » Unassigned
Issue tags: -JavaScript +JavaScript
jamesashok’s picture

Assigned: Unassigned » jamesashok
Issue tags: +fixed toolbar, +isFixed, +isViewportOverflowConstrained
StatusFileSize
new56.27 KB
new79.01 KB
new10.03 KB

Referring the above comments and taking pointers from #9, #13 and #16, the following patch makes toolbar fixed across all screen sizes and browsers. Please refer the screenshot attached...

With this patch,
# isFixed and isViewportOverflowConstrained occurrences from JS has been removed.
# Narrow devices will have a fixed top admin toolbar and an overlapping secondary side toolbar.
# Standard devices with side secondary toolbar will push the main content to the right (no overlapping secondary side toolbar), which is the default behaviour as usual (left undisturbed)
# The toolbar-fixed has been permanently added to the toolbar. It is not removed from the code, just in case if it might find some use or other options to compete with in the future.

I have tested across all major browsers and OS simulations and attaching now a couple of screenshots..

Before patch

Before Patch - After Scroll

After patch

After Patch - After Scroll

avpaderno’s picture

Issue tags: -fixed toolbar, -isFixed, -isViewportOverflowConstrained
jamesashok’s picture

Assigned: jamesashok » Unassigned
wim leers’s picture

#44: very interesting patch, thanks!

It's been too long since I looked at the Toolbar module's code in detail, so I can't sign off on this. My thoughts:

  1. 🥳 Simplification, yay!
  2. 🥳 But … is it really okay to delete all that code? I feel like we're missing something. It'd help if you could explain why the code that the patch is deleting is no longer needed. Do you think you could do that?
jamesashok’s picture

Detailed Changes made to the code with the patch #44:-

  1. /core/modules/toolbar/css/toolbar.module.css & /core/themes/stable/css/toolbar/toolbar.module.css
    • Styles when toolbar fixed are adjusted and moved to a media query
    • Because, for narrow devices the toolbar should overlap the main content
    • And for wider devices (landscape, tablet, desktops...), the toolbar should push the main content right
  2. /core/modules/toolbar/js/models/ToolbarModel.es6.js & /core/modules/toolbar/js/models/ToolbarModel.js
    • isFixed & isViewportOverflowConstrained properties defined for the toolbar in this model
    • The above properties are only used to decide when to make the toolbar fixed
    • Now that the toolbar is fixed for all screen devices, from mobiles to wider screens, we are removing those properties, the javascript dependencies and conditions for fixed toolbar
  3. /core/modules/toolbar/js/toolbar.es6.js & /core/modules/toolbar/js/toolbar.js
    • In this file, we are 1) triggering the event for change in isFixed value and 2) setting the value for isFixed on toolbar model for standard devices
    • We will not be requiring it as the toolbar is now always fixed
  4. /core/modules/toolbar/js/toolbar.menu.es6.js & /core/modules/toolbar/js/toolbar.menu.js
    • We have a check for setting active tab if toolbar position fixed
    • With this patch, we are now removing that check as toolbar is always fixed and isFixed property has been removed from the model
  5. /core/modules/toolbar/js/views/BodyVisualView.es6.js & /core/modules/toolbar/js/views/BodyVisualView.js
    • We are removing the listener and handler function to the change event for isFixed and isViewportOverflowConstrained value to add toolbar-fixed class on body element
    • Instead we are now permanently adding the toolbar fixed class on the body element (updated isToolbarFixed method to setToolbarFixed)

Basically we are removing all occurrences of isFixed and isViewportOverflowConstrained as they are used only to decide when to make toolbar fixed.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

nod_ credited Keenegan.

nod_ credited pipboy3.

nod_ credited seiplax.

nod_ credited syamnath.

nod_’s picture

credits from duplicate issue

nod_ credited John Cook.

nod_ credited Sumit kumar.

nod_ credited ahebrank.

nod_ credited elandirayan.

nod_ credited ruchirashree.

nod_ credited timmillwood.

nod_’s picture

Adding credit for duplicate issues I just closed.

pankaj.singh’s picture

Assigned: Unassigned » pankaj.singh
pankaj.singh’s picture

Assigned: pankaj.singh » Unassigned
StatusFileSize
new79.85 KB
new35.48 KB
new35.48 KB
new110.55 KB

Tested the patch given in #44 on 8.9.x, the toolbar is fixed on mobile devices while scrolling the page. However, the length of the toolbar touches or going down to the footer of the page.

Also, I tried to apply the same patch on 9.1.x-dev but its getting failed. Please refer to the screenshot attachd for detailed insight

nod_’s picture

Status: Needs review » Needs work

Need reroll for 9.1.x

nod_’s picture

Adding credit for cat-hearding

nod_’s picture

Status: Needs work » Needs review
StatusFileSize
new10.16 KB

reroll

nod_’s picture

StatusFileSize
new7.3 KB
new4.91 KB
+++ b/core/modules/toolbar/js/toolbar.menu.es6.js
@@ -70,14 +70,12 @@
-      if (!Drupal.toolbar.models.toolbarModel.get('isFixed')) {
-        Drupal.toolbar.models.toolbarModel.set('activeTab', null);
-      }
+      Drupal.toolbar.models.toolbarModel.set('activeTab', null);

This is an issue.

When on desktop and you force the menu to be vertical, clicking on a menu link closes the tray. Before the tray would stay open on the next page when there is enough width space. We need something like "isFixed", but with a better name.

pankaj.singh’s picture

StatusFileSize
new67.94 KB
new26.19 KB
new28.08 KB

@nod_ thanks for the patch. Tested and applied the patch given in #70 on 9.1.x-dev. The issue with the toolbar on devices while scrolling the page is fixed and working fine on my end. Please find the screenshots attached.

Also, the similar issue with menu stays open on devices(having limited width space) is already reported in comment #10 on the issue: https://www.drupal.org/project/drupal/issues/3097856

droplet’s picture

+++ b/core/modules/toolbar/js/views/BodyVisualView.es6.js
@@ -15,22 +15,8 @@
-        this.listenTo(
-          this.model,
-          'change:isFixed change:isViewportOverflowConstrained',
-          this.isToolbarFixed,
-        );

To change the API doesn't look right.

I believed #36 still works. (That part exists for less hard-coded style (MQ) I bet) (In general case, to toggle a HTML class is the right way)

some codes removing Backbone style. I don't like it but doing that before #3145958: [META] Re-evaluate use of Backbone.js in core doesn't look right also :)

A combine with https://www.drupal.org/project/body_scroll_lock is needed

nod_’s picture

StatusFileSize
new2.15 KB

yeah making #70 started to feel like it was too much. You're right droplet.

#36 had an issue on narrow screens, for this to work need to change what it means to have the .toolbar-fixed class on the body.

Tested in seven, did not test on claro.

andrewmacpherson’s picture

I'd like to see how this plays with text resizing, especially user-specified text sizes on mobile browsers.

Fixed headers sometimes cause problems when users increase the text size; the header ends up occupying too much of the viewport, leaving less room for the content the user is actually trying to focus on.

priyanka.sahni’s picture

Assigned: Unassigned » priyanka.sahni
priyanka.sahni’s picture

StatusFileSize
new62.77 KB
new90.39 KB
new77.35 KB
new73.83 KB
new59.56 KB
new82.68 KB
new66.9 KB

Verified and tested by applying the patch #73.It looks good to me.Can be moved to RTBC.

priyanka.sahni’s picture

Assigned: priyanka.sahni » Unassigned
bnjmnm’s picture

StatusFileSize
new72.83 KB

It's possible for toolbars to become much larger than what is seen in the earlier screenshots. On a narrower viewport, it's possible for the toolbar to consume a significant amount of the available space on the screen. For toolbars such as mine, I'd only have half the screen for content and wouldn't be able to geet more space by scrolling away.

If this was a brand-new feature, I could see the merits in arguing that this was an acceptable tradeoff for sites that opt to have lengthy toolbars. However, in this case, there may be existing sites with many toolbar items that are accustomed to this behavior. Implementing the solution in its current state could be a regression, and could limit the available non-toolbar space on these sites - potentially preventing them from accessing the page content altogether.

droplet’s picture

StatusFileSize
new46.34 KB

We should ask: Does the toolbar support unlimited items first?

If NO, then make it fixed. (But, see below)
If YES, then found a solution (, because no matter fixed or not, that's a problem)

In fact, I doubt users can't find the toolbar. I agree a pinned toolbar is provided a quick way to perform actions (eg. FB.com). But without a pinned toolbar is an extremely common pattern around the net, d.org also the same. ( I wouldn't say common is always good. We need to take a balance since we can't pin every actions)

"Failed to find the toolbar" vs "Failed go back to Admin area". To me, this is two different concepts.

Sometimes the UX testing is designed and guides the tester to fail. For example, after creating a new node, you asked "How to go back?". As a long time user, I may fail too. But if you asked "How to edit it?". I will find the edit button. The further problem is "Pinned toolbar" vs "Pinned EDIT"

Another problem, they may found the "Main nav" menu instead.

bnjmnm’s picture

Status: Needs review » Needs work
Issue tags: +Needs issue summary update

Does the toolbar support unlimited items first?

yes 🤦‍♂️.

If YES, then found a solution (, because no matter fixed or not, that's a problem)

I agree. This is a problem for not just situation such as the one I pointed out in #78 , but has other impacts such as the ones you elaborated on here: #2958478: Toolbar height calculation is faulty in multiple cases.

Since a JavaScript maintainer agrees this is a concern, I'm comfortable switching this to Needs Work. This issue could be rescoped to include figuring out how to deal with excess toolbar items, or a followup issue could be created, and this would be postponed until that was completed.

droplet’s picture

Needs to tag the UI team I think (, if there's a UI/UX team for the design)

rkoller’s picture

At the moment there are three menu icons available in the toolbar: "menu", "shortcuts" and "profil". In case there are one to x custom helper modules installed like @bnjmnm illustrated in #78 would it be a reasonable step to introduce a fourth icon wrapping and collapsing all registered custom helper modules into for viewports smaller 610px? That way it might be possible to keep the single row toolbar as well as still add the position:fixed for viewports smaller 610px.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

shriaas’s picture

@rkoller I think that will be a good idea to make the UI clean.
Also in some websites the toolbar is hidden when you scroll down and it appears when you scroll up a little, that can also be implemented for the mobile view and even the desktop too.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

vikashsoni’s picture

StatusFileSize
new33.12 KB
new51.21 KB

Applied patch #73 applied successfully in durpal-9.3.x-dev
and looks good for me
Thanks for the patch
for ref sharing screenshots ....

catch’s picture

Category: Task » Bug report
Issue tags: +Bug Smash Initiative

Since several bugs have been marked duplicate of this, I'm going to reclassify as a bug here too.

I've also run into #2516938-44: Set the toolbar to position fixed on mobile several times personally which is definitely a functional bug.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

bnjmnm’s picture

Status: Needs work » Active
Issue tags: +Field UX
StatusFileSize
new10.32 MB

Started an MR which includes the beginning of a solution for excess toolbar tabs. There are steps to do before it is review ready, but the underlying functionality is now there.

bnjmnm’s picture

Issue summary: View changes
bnjmnm’s picture

Status: Active » Needs review
Issue tags: -Needs issue summary update
pradipmodh13’s picture

Assigned: Unassigned » pradipmodh13
raveen_thakur51’s picture

StatusFileSize
new24.7 KB
new38.61 KB

Applied patch #73 on Drupal 9 PHP version 8.1. I am attaching my screenshots for reference. Please review & thank you.

pradipmodh13’s picture

StatusFileSize
new4.36 MB

3809.patch has been successfully applied on Drupal 10.1
Now toolbar is fixed and working as expected in mobile.
For ref attached recording.

pradipmodh13’s picture

Assigned: pradipmodh13 » Unassigned
bnjmnm’s picture

There are already more than enough screenshots and recordings - it's not necessary to provide more such as #96 and #97. These are demonstrating something that has already been demonstrated 7 times prior, so it does not move the issue forward and will not receive contribution credit.

A significant feature was added in #92 reviewing that addition might even warrant screenshots or videos. However but neither of the above have the toolbar configured to include tabs that don't open menu trays, so the end result is just screenshots of the exact same functionality that was screenshotted in #87, #76, #71, #66, #44, #23, #21.

hooroomoo’s picture

Status: Needs review » Reviewed & tested by the community

Tested the toolbar and the excess toolbar items toggle manually with different phone sizes and window sizes and looks good.

avpaderno’s picture

Status: Reviewed & tested by the community » Needs review
bnjmnm’s picture

Status: Needs review » Reviewed & tested by the community

Since there's no explanation of the near instantaneous switch from RTBC to "Needs review" in #101 I'm guessing this was an accidental submit?

Switching the status back to RTBC since #101 appears to be accidental (either accidentally switching status, or accidentally omitting the explanation for the status change)

lauriii’s picture

Status: Reviewed & tested by the community » Needs review

Asked few questions on the MR

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative, +Needs screenshots

This it would help to have before/after screenshots in the issue summary to show what is being fixed.

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

utkarsh_33’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Needs work

Moving back for the screenshots

utkarsh_33’s picture

Status: Needs work » Needs review
StatusFileSize
new199.32 KB
new256.49 KB

Attached the screenshots of how it looks before and after the changes.

screenshot

screenshot

bnjmnm’s picture

hooroomoo’s picture

Status: Needs review » Needs work
StatusFileSize
new514.02 KB

Looks like the styling on the toggle when there are excess items is gone now 😅 Attached video here

raveen_thakur51’s picture

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

utkarsh_33’s picture

StatusFileSize
new61.56 KB

When we try to add multiple toolbar items and use the mobile view, ideally the items should collapse and on clicking the ...it should expand but it's not happening here.And even the click on ...just updates the HTML element via ajax but it does not perform any action on click of it.I have attached the screenshot for the problem that i described.

utkarsh_33’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Needs work

Only open thread I see

I think this would benefit from a comment and also potentially from additional test coverage 😇

utkarsh_33’s picture

Status: Needs work » Needs review
thomas-kane’s picture

I reviewed the test in testCollapsibleToolbarItems() and it appears to pass test.
Note: DrupalCon2023, bug smash initiative.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: -Needs manual testing +Pittsburgh2023
StatusFileSize
new11.78 KB

Tested this manually at DrupalCon and the toolbar does stay fixed.

But adding extra tabs the "..." appears but clicking on it does nothing and when using enough tabs they wrap.

fixed

narendrar’s picture

StatusFileSize
new62.9 KB

Issue

Clicking "..." works for me (enabled Workspaces module, it toggles workspace switcher).
However I found an issue related to z-index when manage icon is clicked.

hooroomoo’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new1.46 MB

The toolbar stays fixed and the toggle works and looks as expected. Pushed a small commit that just changes the selector of the toggle in a test. #119 was discussed today with lauriii and bnjmnm and the z-index issue is pre-existing and out of scope of this MR.

lauriii’s picture

Status: Reviewed & tested by the community » Needs work

There's one kind of a major issue with this which is that when there's horizontal scroll on the page, e.g. when there's a table on the page, the toggle is pushed to the right side of the screen. This makes it very hard to notice the toggle. Ideally we would do #3068696: Tables overflow on mobile first but maybe there's a workaround that we could use here before that?

hooroomoo’s picture

Status: Needs work » Needs review

hooroomoo’s picture

Status: Needs review » Reviewed & tested by the community

Tested manually and code looks good to me

lauriii’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: -Needs accessibility review

Tested the scenario mentioned in #74. There's still a ultra-narrow mode which kicks in when zoomed in. Toolbar is not using rem or em units meaning that overriding body/html font-size won't impact toolbar. Pretty sure we can remove the needs accessibility review tag.

Posted few comments on the MR.

hooroomoo’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Appears the review was done by lauriii and the feedback was addressed.

Applied the MR myself and didn't notice any regression.

lauriii’s picture

Status: Reviewed & tested by the community » Needs work

Left couple more comments in the MR.

utkarsh_33’s picture

utkarsh_33’s picture

I again tested the above problem that @laurii mentioned in Umami profile after removing the toolbar items but still i can't reproduce it.I'm attaching the screen recording for reference.

ckrina’s picture

Issue summary: View changes
StatusFileSize
new27.42 KB

First, thanks all for working on this! I'd say the idea looked like a quick win before we get the new navigation, but I've tested the latest changes and I'm a bit concerned it's a bit too far to what I'd sign-off to get in.

  1. It ends up in 2 lines of links (testing in FF at 390px wide) and that's too much much vertical space to leave a working area.
  2. Apart from that, the z-index for icons gets in the way by showing icons in the middle of other submenus and it's confusing (I know it's a previous problem but it just makes it worst).
  3. Another thing is that the open/close icon stays the same all the time, while when it's opened should be something else.
  4. When the links open they are one next to the other (I know this is the current behavior) but it's a really strange and unseen pattern, specially interacting with the right "collapse" button making the items float to the left). If something is being changed from the current interaction it should make it better, and right now the result is confusing.

I'm afraid the place where this is right now will need a substantial amount of hours to design&rethink a few things, develop and review and I wonder if it's really worth the time of core experts here when we're planning on replacing this as soon as we can with the new Toolbar.

herved’s picture

Hello, I stumbled on this for the issue depicted in #108.
We have a sticky header that relies on Drupal displace - top: var(--drupal-displace-offset-top, 0); - which is not positioned correctly on mobile with the toolbar.

Reading #131 is not really reassuring.
Can a compromize be found here maybe?

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.

quietone’s picture

Status: Needs work » Postponed

The Toolbar Module was approved for removal in #3476882: [Policy] Move Toolbar module to contrib.

This is Postponed. The status is set according to two policies. The Remove a core extension and move it to a contributed project and the Extensions approved for removal policies.

The deprecation work is in #3484850: [meta] Tasks to deprecate Toolbar module and the removal work in #3488828: [meta] Tasks to remove Toolbar module.

Toolbar will be moved to a contributed project before Drupal 12.0.0 is released.