Skip to content

feat: add global keyboard-shortcut help modal (Closes #922) - #1147

Open
waterWang wants to merge 1 commit into
Stellopay:mainfrom
waterWang:feat/global-shortcut-help-modal
Open

feat: add global keyboard-shortcut help modal (Closes #922)#1147
waterWang wants to merge 1 commit into
Stellopay:mainfrom
waterWang:feat/global-shortcut-help-modal

Conversation

@waterWang

Copy link
Copy Markdown

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 — Mounts ShortcutHelpModal in the root layout so it's available on every page.

Key Behaviours

  • Press ? (Shift + /) anywhere to toggle the modal
  • Suppressed while a text input, textarea, or contenteditable has focus
  • Shortcuts are grouped by context area for discoverability
  • Floating "?" button in the bottom-right corner provides a visual affordance
  • Escape closes the modal (handled by Radix)

Test Results

✓ 6 tests passed (all shortcut-help-modal tests)

Closes #922

…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)
@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a global '?' keyboard-shortcut help modal cataloguing shortcuts across the app

1 participant