The new navigation should use the Drupal displace API to inform themes that it exists, and what it’s width is. This lets themes fix position elements, without overlapping the HTML elements.
More information on the displace is at https://www.drupal.org/node/1956804
Issue fork navigation-3378754
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
Comment #2
claireristow commentedWorking on this now!
Comment #4
claireristow commentedHey @mherchel, I'm struggling to find a way to make Drupal.displace work with CSS transitions. Since the sidebar width transitions when collapsed/expanded, the main page content position can't be calculated until the transition is complete, causing a delay/glitch. Check out the tugboat for the visual. I'm wondering if you have any insight on this one?
Comment #5
claireristow commentedComment #6
mherchelJust pushed some changes that should resolve the issue. The remaining bug is if the page is loaded with the navbar in the wide state, and then switched to the narrow state, the transition will does not apply on the very first state change. Other than that, it looks good IMO.
Comment #7
ckrinaClosing #3380683: The sidebar in umami appears on top of the content in favor of this one. But moving here the discussion:
I mentioned:
See the comments it triggered in the Change Record for the New Off-Canvas dialog: #2896596: New Off-Canvas dialog tray now available
Also, @bnjmnm mentioned this as FEFM:
Comment #9
ckrinaComment #10
claireristow commentedHere is a summary of our Zoom discussion about using the drupal-off-canvas-main-canvas class for the shifting of main page content.
We have decided to move forward with this method. We discussed adding padding to the body element as an alternative but agreed that this would likely cause more headaches than the off-canvas approach. The worst case scenario if a developer removes the off-canvas class would be that the sidebar overlaps with some content when logged in.
We agreed the following should be done to help communicate the importance of keeping the off-canvas class when customizing themes:
Comment #11
claireristow commentedI am going to work on that remaining bug that @mherchel flagged in comment #6
Comment #13
claireristow commented