Closed (fixed)
Project:
Drupal core
Version:
9.2.x-dev
Component:
Olivero theme
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 May 2021 at 14:36 UTC
Updated:
13 Jul 2021 at 08:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
mherchelUpdating scope
Comment #3
mherchelPatch attached. Several CSS files and another JS file were also modified when adjusting the selectors.
Tugboat preview at https://3212981-refactor-navigation-js-6mvrgpr2ci8ntkdg9ksdsev5t07t1aut....
Comment #4
gauravvvv commentedjs-fixedclass for the header is changed tois-fixedandjs-overlay-activetois-overlay-activein patch #2.The fixed header is working fine. This can be move to RTBC
Comment #5
gauravvvv commentedVerified at live preview https://3212981-refactor-navigation-js-6mvrgpr2ci8ntkdg9ksdsev5t07t1aut....
Comment #6
lauriiiWas these left unchanged on purpose?
Comment #7
mherchelYes. Those are being changed in #3212981: Olivero: Refactor navigation.es6.js to meet Drupal's JavaScript coding standards
Comment #8
andy-blum@mherchel the issue you reference in #7 is this issue.
Comment #9
mherchelYeah you're right! I created a circular dependency. I do believe those need to be updated.
Comment #10
mherchelRe-roll attached.
Comment #11
mherchelComment #12
thejimbirch commentedWe need to convert navigation.es6.js to use regular JavaScript selectors to using attribute selectors where possible. For attributes, we should use data-drupal-selector="selector-name"
- This is addresses throughout the patch.
We should use SMACSS style is- selectors to indicate state (see https://css-tricks.com/bem-101/#:~:text=%2F*%20btn%20module%20with%20sta...)
- From #6, this now returns no results:
grep -r 'js-fixed' core/themes/oliveroWe have one instance of adding a keyup event listener for Escape that will not work in IE11
- This is addressed on line 363.
Marking as RTBC.
Comment #13
andy-blumThere is one small issue on IE11.
The escape key does exit the navigation, but it does not return focus to the dropdown arrow. See attached recording
Comment #14
mherchel@andy-blum, that is addressed in #3210443: Olivero: Focus after submenu close via ESC key, which is not yet committed.
Comment #15
andy-blumThen RTBC!
Comment #17
lauriiiThis seems like a bug which we should solve in a separate issue and make sure it's properly tested. Other than that, this looks good 👍
Comment #18
mherchelCode is removed, but not sure if we can test this at all. All of our tests use Chromium, and AFAIK there's no way for Nightwatch to pass an invalid key.
Comment #19
mherchelOpened followup #3217175: Olivero: Make IE11 close submenu when ESC key is pressed
Comment #20
indrajithkb commentedHi @mherchel i have checked the #18, Now the 'js-fixed' changed to 'is-fixed' and 'js-overlay-active' to 'is-overlay-active'.
Before patch we have 'js-fixed' and 'js-overlay-active':
After patch we have 'is-fixed' and 'is-overlay-active'
Moving to RTBC
Comment #23
lauriiiCommitted 34633c2 and pushed to 9.3.x. Also cherry-picked to 9.2.x since Olivero is experimental. Thanks!