We need to convert second-level-navigation.es6.js to use regular JavaScript selectors to using attribute selectors where possible. For attributes, we should use
data-drupal-selector="selector-name"
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | data-drupal-selector.png | 69.2 KB | indrajithkb |
| #9 | 3213074-B-P.png | 60.52 KB | indrajithkb |
| #7 | js-lint.png | 15.15 KB | indrajithkb |
| #6 | Screenshot 2021-05-20 at 14.30.51.png | 208.57 KB | gauravvvv |
| #5 | 3213074-5.patch | 12.25 KB | mherchel |
Comments
Comment #2
mherchelCurrently blocked by #3210443: Olivero: Focus after submenu close via ESC key and #3212998: Olivero: Normalize JavaScript selectors in scripts.es6.js
Comment #3
mherchelStill blocked, but here is some initial work. The rest should be relatively easier.
Comment #4
mherchelUnblocked
Comment #5
mherchelThis should be good.
Comment #6
gauravvvv commenteddata-drupal-selectoris added by patch #5. Added screenshot for reference.Can be move to RTBC.
Comment #7
indrajithkb commentedHi @mherchel i have checked the patch #5 with
yarn run lint:core-jsI have found one warning with too many call-back, it would be great if we can resolve the warning for meet the drupal js standards. Other than that everything is okay.Comment #8
mherchelLet's create a followup issue to discuss this. It passes CI, and the primary goal of this issue is to refactor to use the
[data-drupal-selector]selectors.Thanks for the review though.
Comment #9
indrajithkb commentedHi @mherchel, Now i checked for "drupal-data-selector", now we can see the drupal-data-selector after the patch #5.
Before patch
After patch:
Moving to RTBC
Comment #11
gauravvvv commentedUnrelated failure
Comment #13
mherchelAnother unrelated failure.
Comment #16
lauriiiCommitted 55361f8 and pushed to 9.3.x. Also cherry-picked to 9.2.x because Olivero is experimental. Thanks!