feat(ui): searchable keyboard shortcut cheat sheet overlay (#428)#44
Open
advancedresearcharray wants to merge 1 commit into
Open
feat(ui): searchable keyboard shortcut cheat sheet overlay (#428)#44advancedresearcharray wants to merge 1 commit into
advancedresearcharray wants to merge 1 commit into
Conversation
0ac0633 to
2bf1a15
Compare
Replace the static shortcuts dialog with a searchable CommandDialog, wire bare ? to open help outside inputs/editors, and add a toolbar HelpCircle button for mouse users. Closes kiwifs#428.
2bf1a15 to
53eb25c
Compare
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.
Summary
Closes kiwifs#428
Replaces the static shortcuts dialog with a searchable
CommandDialogoverlay. Plain?(outside inputs/editors) andCmd+/open the cheat sheet. Shortcuts are grouped (Navigation, Views, Editor, Custom), platform-aware (⌘vs Ctrl), and populated fromuseKeybindings().Changes
ui/src/components/KeyboardShortcuts.tsx<kbd>segmentsui/src/lib/kiwiKeybindings.tsisTextInputTarget,shouldOpenShortcutsHelp,formatChordSegments,getCustomShortcutItemsui/src/lib/kiwiKeybindings.test.tsui/src/App.tsx?toggle, HelpCircle toolbar buttonui/src/components/ui/command.tsxtitleprop on CommandDialog for a11yAcceptance criteria
?opens overlay (guarded byisTextInputTarget)Cmd+/opens viashortcuts_helpbindingclose_overlay+resolveOverlayDismisspriority)Test plan
npm test -- --run kiwiKeybindings overlayDismiss— 19 tests passednpm test -- --run— 196 tests passedgo test ./internal/keybindings/... -count=1— ok