Problem/Motivation

The mobile navigation button position is incorrect when navigation is expanded.

Steps to reproduce

1. Enable navigation module
2. Go to mobile/tablet screensize
3. Expand the navigation sidebar
4. Expand the right sidebar menu
5. See the position of menu button
6. See the screenshot for reference

Proposed resolution

Width of the container .site-header__inner__container is calculated incorrectly from layout.css and need to be overridden.

Remaining tasks

User interface changes

Before

After:

API changes

Data model changes

Release notes snippet

Issue fork drupal-3450773

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

Gauravvvv created an issue. See original summary.

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

ahsannazir’s picture

Status: Active » Needs work
kostyashupenko’s picture

Good catch. I can reproduce layout shifting and wrong position of Close button only when `Navigation` module is enabled.

Can be reproduced on screen width around ~1034px

`--drupal-displace-offset-left` is calculating correctly. The real reason of all that is this line https://git.drupalcode.org/project/drupal/-/blob/11.x/core/themes/oliver...

But if to remove this line - we'll get the same bug if `Navigation` module isn't installed (so with default Toolbar).

For now no solution for this, but at least issue summary should be updated

test

ahsannazir’s picture

Status: Needs work » Needs review
StatusFileSize
new109.36 KB

It seems reseting width fixes the issue. Attaching screenshot for reference.

kanchan bhogade’s picture

StatusFileSize
new63.63 KB
new63.8 KB

I've tested MR 8324 on Drupal 11
The MR is applied Cleanly...

Testing steps :
1. Enable navigation module
2. Go to mobile/tablet screensize
3. Expand the navigation sidebar
4. Expand the right sidebar menu
5. See the position of the menu button
6. See the screenshot for reference

Test Result:
The mobile navigation button position issue is fixed and it looks fine.
Attaching SS

RTBC+1

Keeping in "Needs review" for Code verification

smustgrave’s picture

Status: Needs review » Needs work

Looking at the issue summary the solution doesn't match the solution so should be documented why the solution fixes the problem.

Please no snippet of the code but the why

Also an after picture should be added the summary also.

Thanks.

ahsannazir’s picture

Resetting/overriding the width works because the width set in layout.css for body.is-fixed .container is incorrect for this case.

ahsannazir’s picture

Issue summary: View changes
StatusFileSize
new159.87 KB
mithun s’s picture

Reviewed out the various scenarios for the issue.
1. Without MR being applied and without navigation enabled.
2. Without MR being applied and with navigation enabled.
3. With MR and without navigation enabled.
With MR and with navigation enabled.

The MR looks good, the width for the container needs to be overwritten and after MR the issue seems to be resolving.
Attaching the different screenshots for the same. RTBC +1

Thank you.

mithun s’s picture

Title: Olivero: Header width issue when Aside navigation is expanded » Olivero: Incorrect positioning of close button on mobile device when navigation module is enabled.
Issue summary: View changes
Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs issue summary update +Needs Review Queue Initiative

@Mithun S thanks for checking but screenshots were already uploaded in #7.

Thanks @ahsannazir for updating the summary, looks good to me that was the only holdup from before.

nod_’s picture

Status: Reviewed & tested by the community » Needs work

Question in MR

ahsannazir’s picture

Status: Needs work » Needs review
smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Extra change removed

nod_’s picture

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

Committed and pushed 77b8e59604 to 11.x and 103201d3d5 to 11.0.x and 225ed0a05f to 10.4.x and 7c442b0677 to 10.3.x. Thanks!

  • nod_ committed 7c442b06 on 10.3.x
    Issue #3450773 by ahsannazir, Kanchan Bhogade, Gauravvvv, kostyashupenko...

  • nod_ committed 225ed0a0 on 10.4.x
    Issue #3450773 by ahsannazir, Kanchan Bhogade, Gauravvvv, kostyashupenko...

  • nod_ committed 103201d3 on 11.0.x
    Issue #3450773 by ahsannazir, Kanchan Bhogade, Gauravvvv, kostyashupenko...

  • nod_ committed 77b8e596 on 11.x
    Issue #3450773 by ahsannazir, Kanchan Bhogade, Gauravvvv, kostyashupenko...
nod_’s picture

nod_’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.