New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: adding a query parameter in Playground requires one extra click to type in search field #4295
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4295 +/- ##
========================================
Coverage 59.02% 59.02%
========================================
Files 133 133
Lines 10885 10885
Branches 2565 2662 +97
========================================
Hits 6425 6425
+ Misses 4185 3987 -198
- Partials 275 473 +198
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
overlay={ | ||
<Menu | ||
onKeyDown={(e) => { | ||
if (['ArrowDown', 'ArrowUp'].includes(e.key)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks weird. We do focus on every key except these two? It should break keyboard navigation hard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure it's weird, though. When we navigate the menu and can't find the needed item, we can start typing, and even if the input isn't focused, the text will be typed in the input. This is a nice pattern :)
Screen.Recording.2022-03-31.at.20.56.21.mov
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, there is no keyboard navigation except navigation within the list. I've tested.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pattern is good. But keyboard navigation includes: Space, Enter, PageUp, PageDown, Up, Down, Right, Left (yeah, horizontal, even in a vertical layout). Maybe we should test an event for a character and only in that case do the focus.
Check List
Description of Changes Made (if issue reference is not provided)
this PR add focusing in input on opening the menu and on typing within the list