Problem/Motivation

On mobile viewports, .toolbar-bar (the black toolbar with icons for Manage, Shortcuts and Admin) scrolls as it has position: relative - i.e. when you scroll down the screen it disappears from view. However .toolbar-tray-vertical (containing sub-menu items such as Content, Structure, Appearance, Extend…) has position: fixed - this means it stays on the left of the screen when scrolling, with an unwanted gap above it because the toolbar has moved off screen.

Top of page

Scrolled down

Proposed resolution

?

Remaining tasks

- Write patch
- Manual browser/device testing.

User interface changes

Yes (depends on what we do)

API changes

None.

Data model changes

None.

Comments

rajivmandve created an issue. See original summary.

rajivmandve’s picture

Added a media query in Drupal core file to fix this issue. Please find the attached patch file for the same

rajivmandve’s picture

Assigned: rajivmandve » Unassigned
Status: Active » Needs review

Status: Needs review » Needs work
rajivmandve’s picture

I have fixed the issues in patch file. please find the attached updated patch file.

rajivmandve’s picture

Status: Needs work » Needs review
jaspreetsingh31’s picture

Status: Needs review » Needs work
StatusFileSize
new156.13 KB
new34.22 KB

I have tested the patch: drupalcore-admin_main_menu_sticky_for_below_767_resolution-2562251-5-drupal8.0.x.dev_.patch but still admin toolbar is not sticky.
For sake reference, please find the attached video and image.

Thanks
Jaspreet singh

kostyashupenko’s picture

Assigned: Unassigned » kostyashupenko
kostyashupenko’s picture

will check now #7

kostyashupenko’s picture

Assigned: kostyashupenko » Unassigned
Status: Needs work » Needs review
StatusFileSize
new37.02 KB
new29.76 KB
new656 bytes
new928 bytes

Well, there was an issue with default values of toolbar model. I've changed some properties and removed css changes from patch #5, because we don't need this css. Styles for class ".toolbar-oriented" is not related to our issue with fixed/unfixed position. To have fixed position we have class ".toolbar-fixed". So for now we have fixed toolbar for any resolutions.

before
before
after screen 1
after
after screen 2
after

jaspreetsingh31’s picture

Status: Needs review » Needs work
StatusFileSize
new15.85 KB
new38.31 KB
new41.1 KB
new48.03 KB

@kostyashupenko, I have verified this issue on multiple simulators but still issue exists. Please review the attachments for sake reference.

Thanks
Jaspreet singh

nadiya’s picture

Adding patch for the fix, also adding the screenshot after applying the patch.

nadiya’s picture

Status: Needs work » Needs review
kostyashupenko’s picture

StatusFileSize
new83.24 KB

@jaspreetsingh31, use 8.0.x branch, then apply my patch, after drush cr you should check my patch
Look on my screen. There is ".toolbar-fixed" class for body tag
toolbar_47.png

And again in #12 comment.

.toolbar-oriented .toolbar-bar {
position: fixed;
}

I'm not sure that this way is correct for fixing position of toolbar. Read my message above #10. For sticky toolbar we have class "toolbar-fixed" ! Another ways to fix toolbar - it's a wrong ways. No?

jaspreetsingh31’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new37.38 KB
new38.91 KB
new62.95 KB
new62.63 KB

Thanks @nadiya for your support. I have tested your patch : toolbar_menu_tray_for-2562251-12.patch and it works fine.
I have tested it on multiple screens.
For sake reference, Please find the attachments.

Thanks
Jaspreet singh

star-szr’s picture

Status: Reviewed & tested by the community » Needs review
Issue tags: -media queries, -CSS +Needs issue summary update

Putting back to needs review, this needs more discussion and an issue summary. UX and other considerations need to be taken into account before we do something like this I think.

Thanks for the work so far, everyone.

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.

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.

wturrell’s picture

Issue summary: View changes
Issue tags: -Needs issue summary update
StatusFileSize
new37.25 KB
new38.94 KB

Rewritten issue summary + added screenshots.

wturrell’s picture

Title: Toolbar menu tray for viewports less than 767px for sticky admin menu » .toolbar-bar becomes detached from fixed position tray items when scrolling on mobile, leaving gap
brahmjeet789’s picture

StatusFileSize
new27.55 KB

can we put the navbar position to be fixed so that the space casn be retained.
.toolbar-bar{
position: fixed;
}

aaronchristian’s picture

Ahhh I've noticed this many times during development. Super annoying!

Patch works well, I do believe this is the correct direction in terms of best UX patterns.

I would be comfortable setting this to RTBC unless anyone opposes.

Tested:

Windows;
- Chrome Latest
- Firefox Latest
- IE 8/9/10

Mac;
- Chrome Latest
- Firefox Latest
- Safari 10

Samsung Galaxy S7
Android HTC 10
iPhone 6 & 7

lauriii’s picture

Status: Needs review » Closed (duplicate)