feat: add global keyboard-shortcut help modal (Closes #922) - #1147
Open
waterWang wants to merge 1 commit into
Open
feat: add global keyboard-shortcut help modal (Closes #922)#1147waterWang wants to merge 1 commit into
waterWang wants to merge 1 commit into
Conversation
…ts across the app (Closes Stellopay#922) - Create data-driven shortcut registry (lib/shortcut-registry.ts) - Build ShortcutHelpModal component using Radix Dialog - Bind '?' key globally, suppressed on text input focus - Group shortcuts by area (global, dashboard, transactions, settings) - Add floating '?' button in bottom-right corner - Add comprehensive unit tests (6 tests)
Contributor
|
@waterWang is attempting to deploy a commit to the Jagadeesh B's projects Team on Vercel. A member of the Team first needs to authorize it. |
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
Adds a global keyboard-shortcut help modal accessible via the `?` key (Shift + /) or a floating "?" button in the bottom-right corner.
Changes
lib/shortcut-registry.ts— Data-driven shortcut registry. Single source of truth; new shortcuts are added by extending the array.components/common/shortcut-help-modal.tsx— Dialog-based modal listing all shortcuts grouped by area (Global, Dashboard, Transactions, Settings). Built on Radix Dialog for accessibility (WCAG 2.1 AA).components/common/shortcut-help-modal.test.tsx— 6 tests covering: button rendering, click-to-open, key press (Shift + /), input suppression, all shortcuts listed, toggle open/close.app/layout.tsx— MountsShortcutHelpModalin the root layout so it's available on every page.Key Behaviours
?(Shift + /) anywhere to toggle the modalTest Results
Closes #922