feat(ui): keyboard shortcuts overlay - '?' opens a cheat-sheet (LC-252) #304
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/lc-252-shortcuts-overlay"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Adds a discoverable keyboard-shortcuts cheat-sheet (LC-252). Pressing
?anywhere outside a text field opens a modal listing every existing shortcut, grouped by area. A "Keyboard shortcuts" link in the sidebar footer opens the same modal.The app had accumulated shortcuts (Arrow-Up edit-last from LC-248, Alt+Shift+Up/Down jump-to-unread, Enter/Shift+Enter, @ mention, / slash, Esc cancel) with no way to discover them. This surfaces them.
How
server/templates/shortcuts_modal.html, included once in the persistent shell (layout.html) next topoll_modal.html. Mirrors that convention exactly:.modal-backdrop/.modal-panel,role="dialog" aria-modal="true", Escape + backdrop-mousedown close, opener focus restore, sharedwindow.__lcDialogTrapfocus trap.?keydown handler exposeswindow.__lcOpenShortcuts(). It is suppressed while typing ininput/textarea/select/[contenteditable], during IME composition, with any modifier held, or when another dialog/popover is already open (so?types normally in the composer).en+es(shortcuts-*in common.ftl,sidebar-link-shortcutsin partials.ftl).Pure front-end: no server route, no DB, no new env var. Not operator-visible.
Shortcuts listed (real only, nothing invented)
Messaging: Enter send, Shift+Enter newline, Up edit last, Esc cancel/close, @ mention, / slash command. Navigation: Alt+Shift+Down / Alt+Shift+Up next/prev unread room. General: ? show help.
Tests
routes_drafts::room_page_ships_shortcuts_overlayasserts the room page ships the modal markup, the?open handler, and the dialog label.just testandjust test-saaspass.QA note
The
?keybind, open/close, and focus trap are JS-driven, so they want a quick manual click-through before merge (open via?and via the sidebar link; confirm?types normally inside the composer; Esc/backdrop/close all dismiss and return focus).