feat/fix: keyboard shortcuts for search/filter inputs#2476
Open
feat/fix: keyboard shortcuts for search/filter inputs#2476
Conversation
add onKeyDown handler to SearchFilter so pressing Escape resets the filter text and restores the full file listing, and add e2e test
pressing / opens the search filter and focuses the input. when search is already visible but not focused, / re-focuses it. the shortcut is documented in the Keyboard Shortcuts modal. includes e2e tests for open, re-focus, and navigate-away-and-back.
pressing / focuses the Filter peers input, pressing Escape clears it. the filter input is now a controlled component so Escape can reset both the input text and the filter state. includes e2e tests for both behaviors.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Small quality of life improvements related to search/filtering on Files and Peers screens.
Changes
Escapeclears the search filter text on both Files and Peers screens/focuses the filter input (opens it first on Files if hidden)/shortcut is documented in the Keyboard Shortcuts modal (Shift+?)Test plan
/to open+focus search, type filter, pressEscapeto clear, press/again to re-focus/to confirm it focuses/to focus filter, type text, pressEscapeto clear