Problem/Motivation

In #3427659: Implement drawer functionality the initial work to have the drawer working has implemented the basic functionality. This issue is to verify it works with Right to Left direction and otherwise work on the remaining tasks.

Proposed resolution

Remaining tasks

Issue fork navigation-3436129

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

ckrina created an issue. See original summary.

ckrina’s picture

I forgot to postpone it.

ckrina’s picture

Status: Active » Postponed
ckrina’s picture

Status: Postponed » Active

Un-postponing since #3427659: Implement drawer functionality has been merged in.

ckrina’s picture

Title: [PP-1] Ensure the drawer works in RTL » Ensure the drawer works in RTL
kostyashupenko’s picture

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

bronzehedwick’s picture

https://www.drupal.org/project/navigation/issues/3427657 is fixed :)

Pushed an MR to fix popovers in RTL languages.

bronzehedwick’s picture

Status: Active » Needs review

ckrina changed the visibility of the branch 3436129-ensure-the-drawer to hidden.

ckrina’s picture

Issue summary: View changes
Status: Needs review » Needs work
StatusFileSize
new311.38 KB

The collapse animation is missing ;)

m4olivei’s picture

StatusFileSize
new92.02 KB

To test this, I've been:

  • drush si -y demo_umami
  • drush en -y navigation
  • drush uli
  • Use Chrome dev tools after page load to manually adjust the html[dir] attribute to set rtl as the value.

Let me know if there is a better way to test, and maybe lets put it into the issue description.

A few issues that I can see:

  • The expand collapse functionality breaks things in rtl. @ckrina has a good gif above.
  • At desktop, the first level chevrons should be pointing to the left, in the direction that the drawer now opens.
  • When the drawer slides out, there is a subtle gradient that sweeps across the lower part of the navigation (see gif below)

Subtle gradient sweep (animation slowed to 10%):

bronzehedwick’s picture

Assigned: Unassigned » bronzehedwick

Thanks for the feedback all, taking a look.

bronzehedwick’s picture

Hi all, I pushed fixes for the issues raised. However, note that a real RTL language, like Arabic, must be installed and selected for a proper test. Switching the dir property via browser dev tools will result in incorrect behavior, as Drupal isn't aware of this, and will incorrectly set an offset variable the navigation relies on to display properly.

Issues fixed

  1. When the drawer slides out, there is a subtle gradient that sweeps across the lower part of the navigation (see gif below)
  2. At desktop, the first level chevrons should be pointing to the left, in the direction that the drawer now opens.
  3. RTL uses the wrong offset variable for it's positioning math (the "left" variable instead of the "right" variable)
bronzehedwick’s picture

Assigned: bronzehedwick » Unassigned
Status: Needs work » Needs review
rkoller’s picture

StatusFileSize
new146.73 KB
new47.56 KB

I've tested the issue with Hebrew. One detail i've noticed is that the font weight of the top level menu items is too small compared to for example english

edit user page in hebrew

similar for the drawer:

navigation bar and drawer in hebrew

it also illustrates the detail that the design breaks in case strings are not translated yet.

ckrina’s picture

Status: Needs review » Needs work
StatusFileSize
new39.87 KB

the font weight of the top level menu items is too small compared to for example english

I'm afraid this is something we can't solve? I's guess this is a font problem.

@bronzehedwick I found another small thing: the submenus have the wrong direction when the arrow is closed. It should be pointing down.

rkoller’s picture

I'm afraid this is something we can't solve? I's guess this is a font problem.

but if you take a look into the main content area in https://www.drupal.org/files/issues/2024-04-03/hebrew.jpg you have actual bold typography as well, so it isn't the case that heavier weight isn't available for the font used?

ckrina’s picture

@rkoller It's a different font: we're using Inter for the Navigation, ans I'm not sure we've added the package for Hebrew of if there is one. Claro uses the system font. Either way, this discussion is worth its own ticket because goes beyond the "direction" of the page and lands in the typeface world :)

rkoller’s picture

ohhhh thanks for clarification, completely forgot that the navigation might use a different font than the main content area!

bronzehedwick’s picture

@ckrina I fixed the incorrect chevron direction for RTL, as well as rebasing on top of 1.x and resolving the conflicts.

bronzehedwick’s picture

Status: Needs work » Needs review
ckrina’s picture

Status: Needs review » Fixed

Merged, thanks!

Status: Fixed » Closed (fixed)

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