feat: add keyboard shortcut tooltips to sidebar action buttons (#1188)#1192
Conversation
Co-authored-by: Ona <no-reply@ona.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…eWithTooltip story The new SidebarToggleWithTooltip story added in this PR was missing its visual regression baseline screenshot, causing the visual regression CI job to fail. Co-authored-by: Ona <no-reply@ona.com>
|
✅ Post-merge verification passed. E2E tests against live site (https://memo.software-factory.dev):
Ad-hoc smoke tests:
Interaction smoke test (feat PR — tooltip area):
Skipped:
|
|
✅ UI verification passed — design spec compliance confirmed. Static analysis: No violations found. Tooltip wrappers use correct shadcn/ui components ( Storybook visual regression: All story baselines pass (0 diffs across all stories including new Live site vs Storybook comparison: No discrepancies. Tooltip components render identically in both Storybook isolation and the live production page context. Tooltips appear correctly on hover with proper shortcut hints (⌘N / Ctrl+N for New Page, ⌘\ / Ctrl+\ for Toggle sidebar). Dark mode, light mode, and mobile layouts all verified. |
Closes #1188
What
Adds keyboard shortcut hint tooltips to sidebar action buttons, improving discoverability of ⌘N (new page), and ⌘\ (toggle sidebar) shortcuts. The design spec requires shortcuts to be "displayed in tooltips and menu items" — sidebar buttons were missing this.
How
page-tree.tsx: Wrapped "New Page" and "New Database" buttons withTooltip/TooltipTrigger/TooltipContentfrom shadcn/ui. "New Page" tooltip includes the ⌘N / Ctrl+N shortcut hint viakbdwithdata-slot="kbd". "New Database" shows a label-only tooltip (no shortcut exists for it). UsesisMacfromuseSidebar()for OS-aware modifier display.app-sidebar.tsx: Wrapped the mobileSidebarTogglebutton with a tooltip showing "Toggle sidebar" and ⌘\ / Ctrl+\ shortcut hint.page-tree.stories.tsxandapp-sidebar.stories.tsxto include tooltip wrappers on all button instances. Added newSidebarToggleWithTooltipstory.page-tree-shortcut.test.tsxto wrapPageTreerenders inSidebarProvider(required after addinguseSidebar()toPageTree).Testing
pnpm lint— 0 errors (54 pre-existing warnings)pnpm typecheck— passespnpm test— 145 files, 1981 tests passed