Closed (fixed)
Project:
Drupal core
Version:
9.2.x-dev
Component:
Olivero theme
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Apr 2021 at 13:58 UTC
Updated:
12 May 2021 at 12:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
tushar_sachdeva commentedComment #3
tushar_sachdeva commentedQuick and easy patch attached. For ref, video is attached when a KeyboardEvent fire, you can test which keycode is pressed as for ESC key it's 27.
Comment #4
tushar_sachdeva commentedComment #5
tushar_sachdeva commentedComment #6
kishor_kolekar commentedComment #7
kishor_kolekar commentedplease review
Comment #8
kapilv commentedComment #9
mherchelTests are failing, but here's a quick review of #7
Errant console.
Instead of
e.keycode, usee.key === 'Escape' || e.key === 'Esc'Instead of manually changing attributes, use the toggleSearchVisibility function.
Be sure to run
yarn prettierafter your edits to make sure prettier doesn't fail.Comment #10
tushar_sachdeva commentedComment #11
tushar_sachdeva commentedThe new patch with interdiff is attached, with the changes mentioned above in #9. Please review and verify it.
Comment #12
tushar_sachdeva commentedComment #13
tushar_sachdeva commentedComment #14
mherchelGetting an error within CI
Comment #15
tushar_sachdeva commentedComment #16
sakthivel m commentedHi @mherchel
when i pressed ESC key, the search form popup closed. it's working fine in without patch, Attached video here.
Please correct me if i missed anything here
Comment #17
tushar_sachdeva commentedHope this will work fine , please review .
Comment #18
aaron.ferris commentedPatch from #17 applies cleanly for me and does what id expect it to do.
Would we want to keep the es6 file consistent in the usage of arrow functions?
IE:
Comment #19
tushar_sachdeva commentedComment #20
abhijith s commentedApplied patch #17 and it works.The search form is closing when pressing the ESC key.Screen recording added.
RTBC +1
Comment #21
aaron.ferris commentedAttaching a patch based off @tushar_sachdeva's patch in #17 but with an arrow function in the es6 file for consistency.
Comment #22
mherchelThis is looking really close. Thanks everyone for working on it!
Lets use the
keyupevent. The only reason being consistency (we're usingkeyupin navigagtion.es6.js and second-level-navigation.es6.js)Move the new code below this line. We want the reference to
toggleSearchVisibilityto appear directly below where it was originally defined.Comment #23
paulocsHere is the patch addressing comment #22.
Comment #24
paulocsComment #25
paulocsI really don't know what triggered the error.
Comment #26
tushar_sachdeva commented@paulocs make sure that you have run
yarn prettierafter your edits to make sure prettier doesn't fail.Comment #27
paulocsI ran it. I ran yarn prettier but found no problem in the lines that I added in the patch.
Maybe I'm doing it wrong because its my first time using it.
When I run it, it fixes other lines in the file but there are no change in the lines that I added.
Comment #28
aaron.ferris commentedI can’t see anything obvious wrong with the patch, the output of the failure suggests the file isn’t supported.
Comment #29
aaron.ferris commentedWeird, but I think its a problem with the files not matching. Even with the es6 file at default the test fails locally. I've started from scratch, yarn run build:js and attaching a patch that should pass
Local:
Checking core/themes/olivero/js/search.es6.jscore/themes/olivero/js/search.es6.js passedChecking core/themes/olivero/js/search.jscore/themes/olivero/js/search.js passedDid you run
yarn run build:jslocally? That's the only thing I can think of.Comment #30
mherchel#29 looks good to me. Thanks again for working on this.
Comment #32
lauriiiCommitted 1af77ea and pushed to 9.2.x. Thanks!