Skip to content

feat(ui): add shortcuts help dialog#1148

Merged
perber merged 4 commits into
mainfrom
feat/shortcut-help-dialog
Jun 9, 2026
Merged

feat(ui): add shortcuts help dialog#1148
perber merged 4 commits into
mainfrom
feat/shortcut-help-dialog

Conversation

@perber

@perber perber commented Jun 9, 2026

Copy link
Copy Markdown
Owner

Add a shortcuts overview dialog to the user menu using the existing dialog registry so the first UI entry point lands without touching hotkey infrastructure.

Include viewer translations and a focused component test that verifies the dialog opens from the user menu.

Add a shortcuts overview dialog to the user menu using the existing dialog registry so the first UI entry point lands without touching hotkey infrastructure.

Include viewer translations and a focused component test that verifies the dialog opens from the user menu.
Copilot AI review requested due to automatic review settings June 9, 2026 18:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a keyboard-shortcuts overview dialog to the UI, wired through the existing dialog registry and exposed from the user menu, with accompanying viewer-namespace translations and a component test to ensure the dialog opens correctly.

Changes:

  • Added ShortcutsDialog and registered it in the app-wide dialog registry.
  • Added a new “Keyboard Shortcuts” entry to the user menu to open the dialog.
  • Added viewer i18n strings for the dialog and a focused UserToolbar test covering the open flow.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
ui/leafwiki-ui/src/locales/en/viewer.json Adds shortcutsHelp translation strings used by the new dialog/menu entry.
ui/leafwiki-ui/src/lib/registries/index.tsx Registers a new dialog type and render function for the shortcuts help dialog.
ui/leafwiki-ui/src/features/shortcuts/ShortcutsDialog.tsx Implements the shortcuts overview dialog UI using BaseDialog.
ui/leafwiki-ui/src/components/UserToolbar.tsx Adds a user-menu item that opens the shortcuts dialog via the dialogs store.
ui/leafwiki-ui/src/components/UserToolbar.test.tsx Adds a component test verifying the dialog opens from the user menu.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread ui/leafwiki-ui/src/locales/en/viewer.json
Comment thread ui/leafwiki-ui/src/components/UserToolbar.test.tsx Outdated
perber added 2 commits June 9, 2026 20:43
Add a central shortcut catalog with mode-aware metadata, i18n labels, and shared display formatting so the shortcuts dialog and runtime registrations use the same source of truth.

Migrate the existing explicit UI hotkeys to the catalog while keeping the current hotkey runtime intact and preserving current behavior through tests, lint, and build validation.
Unstub __APP_VERSION__ after the UserToolbar test so the suite does not leak global state into later tests and stays order-independent.
Apply the formatting changes required by format:check for the shortcut migration files so CI passes without changing behavior.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated 1 comment.

Comment thread ui/leafwiki-ui/src/features/shortcuts/ShortcutsDialog.tsx
@perber
perber merged commit b6505ee into main Jun 9, 2026
9 checks passed
@perber
perber deleted the feat/shortcut-help-dialog branch June 20, 2026 23:57
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.

2 participants