Ensure the drawer works in RTL

Created on 26 March 2024, 9 months ago
Updated 17 April 2024, 8 months ago

Problem/Motivation

In ๐Ÿ“Œ Implement drawer functionality Needs review 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

๐Ÿ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

๐Ÿ‡ช๐Ÿ‡ธSpain ckrina Barcelona

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @ckrina
  • ๐Ÿ‡ช๐Ÿ‡ธSpain ckrina Barcelona

    I forgot to postpone it.

  • Status changed to Postponed 9 months ago
  • ๐Ÿ‡ช๐Ÿ‡ธSpain ckrina Barcelona
  • Status changed to Active 9 months ago
  • ๐Ÿ‡ช๐Ÿ‡ธSpain ckrina Barcelona

    Un-postponing since ๐Ÿ“Œ Implement drawer functionality Needs review has been merged in.

  • ๐Ÿ‡ช๐Ÿ‡ธSpain ckrina Barcelona
  • ๐Ÿ‡ท๐Ÿ‡บRussia kostyashupenko Omsk

    I think better wait for https://www.drupal.org/project/navigation/issues/3427657 ๐Ÿ“Œ Implement the new designs to the drawer Needs review

  • First commit to issue fork.
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States bronzehedwick New York

    https://www.drupal.org/project/navigation/issues/3427657 ๐Ÿ“Œ Implement the new designs to the drawer Needs review is fixed :)

    Pushed an MR to fix popovers in RTL languages.

  • Status changed to Needs review 9 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States bronzehedwick New York
  • Pipeline finished with Success
    9 months ago
    Total: 201s
    #135614
  • ๐Ÿ‡ช๐Ÿ‡ธSpain ckrina Barcelona

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

  • Pipeline finished with Success
    9 months ago
    Total: 200s
    #135687
  • Status changed to Needs work 9 months ago
  • ๐Ÿ‡ช๐Ÿ‡ธSpain ckrina Barcelona

    The collapse animation is missing ;)

  • ๐Ÿ‡จ๐Ÿ‡ฆCanada m4olivei Grimsby, ON

    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]<code> attribute to set <code>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%):

  • Assigned to bronzehedwick
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States bronzehedwick New York

    Thanks for the feedback all, taking a look.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States bronzehedwick New York

    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)
  • Issue was unassigned.
  • Status changed to Needs review 9 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States bronzehedwick New York
  • Pipeline finished with Success
    9 months ago
    Total: 690s
    #135732
  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany rkoller Nรผrnberg, Germany

    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

    similar for the drawer:

  • Status changed to Needs work 9 months ago
  • ๐Ÿ‡ช๐Ÿ‡ธSpain ckrina Barcelona

    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.

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany rkoller Nรผrnberg, Germany

    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?

  • ๐Ÿ‡ช๐Ÿ‡ธSpain ckrina Barcelona

    @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 :)

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany rkoller Nรผrnberg, Germany

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

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States bronzehedwick New York

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

  • Status changed to Needs review 9 months ago
  • ๐Ÿ‡บ๐Ÿ‡ธUnited States bronzehedwick New York
  • Pipeline finished with Success
    9 months ago
    Total: 268s
    #136431
  • Status changed to Fixed 9 months ago
  • ๐Ÿ‡ช๐Ÿ‡ธSpain ckrina Barcelona

    Merged, thanks!

  • Pipeline finished with Success
    9 months ago
    Total: 219s
    #136729
  • Automatically closed - issue fixed for 2 weeks with no activity.

  • Pipeline finished with Skipped
    5 months ago
    #222362
  • Pipeline finished with Failed
    3 months ago
    Total: 469s
    #289691
  • Pipeline finished with Failed
    3 months ago
    Total: 275s
    #289702
  • Pipeline finished with Canceled
    3 months ago
    Total: 116s
    #289712
  • Pipeline finished with Failed
    3 months ago
    Total: 401s
    #289713
  • Pipeline finished with Failed
    3 months ago
    Total: 336s
    #290271
  • Pipeline finished with Success
    3 months ago
    Total: 311s
    #290312
  • Pipeline finished with Success
    3 months ago
    Total: 334s
    #290331
  • Pipeline finished with Success
    about 1 month ago
    Total: 149s
    #336468
  • Pipeline finished with Success
    about 1 month ago
    Total: 146s
    #336509
  • Pipeline finished with Success
    about 1 month ago
    Total: 235s
    #336568
  • Pipeline finished with Success
    about 1 month ago
    Total: 203s
    #337295
  • Pipeline finished with Success
    about 1 month ago
    Total: 324s
    #337308
  • Pipeline finished with Success
    about 1 month ago
    Total: 293s
    #337322
  • Pipeline finished with Failed
    about 1 month ago
    Total: 1462s
    #347050
  • Pipeline finished with Skipped
    28 days ago
    #348816
Production build 0.71.5 2024