-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Keyboard shortcuts for full text search #1079
Keyboard shortcuts for full text search #1079
Conversation
o Shift-Command-F will focus the full text search bar o Hitting enter in the search bar will focus to the first result o Hitting enter on a search result will open it o Pressing up and down in the results will navigate between visible results
@jarrodmoldrich Thank you very much for your PR, we will review it and share a feedback within a few days. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1079 +/- ##
==========================================
- Coverage 38.31% 38.18% -0.14%
==========================================
Files 120 120
Lines 6511 6555 +44
==========================================
+ Hits 2495 2503 +8
- Misses 4016 4052 +36 ☔ View full report in Codecov by Sentry. |
@jarrodmoldrich Converting to draft as it seems you are still working on rhe PR. Move back to ready to review when you will have finished. |
Hi @jarrodmoldrich, Thank you for your PR. So my assumption is that it's more like a power user feature, for navigating without a mouse. ![]() |
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.
We need a way to trigger scroll for the search results as we move the focus up/down.
@BPerlakiH Thanks for taking the time to review! @kelson42 I apologise for all the noise. You're right to make it a draft, as it's more a proposal than contribution at this stage. It looks like I've opened a can of worms with this PR 😅 Essentially this was me just 'scratching my own itch' as a keyboard user, but also is an accessibility feature which could open usage of the app to the disability community. That said, the way I've implemented it is non-standard. Using the enter key to navigate to the first search result isn't intuitive or easily discoverable, and could confuse users. There's a couple of options I can think of to solve it: Option a) I could try and make it so that the down arrow goes to the first result, and an up arrow from the first result goes back to the search bar. Option b) Use a dropdown and remove the search results page. This would also improve the UX a bit on desktop by not hiding the currently viewed page in order to search for something – which means the user is free to refer to something on the page they are viewing while searching. A way to do this might be to use the I'm thinking I'll do option a) for now, and see if I can make the search results scroll along with focus. It's up to you if you want to merge it, or perhaps you might think there's a better approach towards accessibility. I gleaned a lot of insights from this video about how focus works on the various Apple OSes. I's a non-trivial amount of work to implement it across the app, but it could be a big win for the disability community and impatient keyboard users like me. |
f5bbb2b
to
013afbc
Compare
Thank you @jarrodmoldrich. Option A sounds good to me, as it's similar to TVOS focus behaviour. |
@BPerlakiH No worries. That’s already done. Seems fine on MacOS and iOS simulator, but could do with some extra checks, preferably on a real phone. If everything checks out I’ll fix up the tests. |
@jarrodmoldrich Thank you for the changes. My suggestion is the following, based on your PR, I have created the following changes: Which allows us to keep the scope of these changes only for macOS (iOS is not affected). For the contextual reasons of the search bar (which can be or cannot be seen on the screen, depending on where you are in the app) it won't contain the keyboard short-cut suggested by you in a global form. On the other hand, it's possible to navigate to the search bar with a single TAB button, which I think is equally good, plus you can close the search results with the ESC button, |
HI @BPerlakiH, All that makes sense!
For me, I initially tried using tab to navigate to the search bar, but each time I would Cmd-Tab to the application it would sometimes go to a different focusable item when I tabbed. As I use this in concert with another application, this solution doesn't work for me and exactly this was the catalyst for me starting this yak shave 😂 Also for me I much prefer to use the cursor keys to navigate to and from search results, as this imitates how the native I'm happy this PR has had a positive effect on the project! Your code is much much cleaner and idiomatic, so feel free to close this PR in preference to yours. Let me know if there's anything else you want me to do. Cheers! |
Thank you for your feed back and PR @jarrodmoldrich. I will keep the focus navigation on my radar. Maybe it will be possible to have what you require implemented without the custom work-around, as the search results and the search bar are really "in-line" (one above the other). For now, I am closing this PR. There's a new issue opened for the focus movement part, that you can follow: #1090 |
Hi maintainers,
I really wanted keyboard access to the find bar and the results, so I made some changes. I tried to make them compatible with the target MacOS 13.x, but a couple of things could use newer functions. It fine for my purposes, but thought I'd send it upstream in case it's worthy of a merge