feat: add keyboard shortcuts for rapid admin dashboard navigation (#640)#669
feat: add keyboard shortcuts for rapid admin dashboard navigation (#640)#669lb1192176991-lab wants to merge 1 commit into
Conversation
|
@lb1192176991-lab is attempting to deploy a commit to the ritesh Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7c1e637f4a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| * Escape → Close help modal / go back | ||
| */ | ||
|
|
||
| import { useEffect, useCallback, useRef, useState } from 'react'; |
There was a problem hiding this comment.
This new import brings in useState but the hook never references it. The repo’s ESLint config treats no-unused-vars as an error and npm run lint is configured with --max-warnings 0, so once dependencies are installed any CI/pre-commit path that runs lint will fail on this file before the app can be accepted.
Useful? React with 👍 / 👎.
|
Superseded by PR #674 which includes the shortcuts help overlay and is more complete. |
What
Adds interactive keyboard shortcuts for rapid admin dashboard navigation. Press
Gthen a second key to navigate between admin pages without clicking.New files:
hooks/useKeyboardShortcuts.js— Custom hook that listens for two-key sequences (G+D, G+T, G+A, etc.) and navigates to the corresponding admin route. Buffer-based approach (2s timeout) so keys dont need to be pressed simultaneously. Also supportsCtrl+/to toggle the help modal andEscapeto close it.components/shared/ShortcutsHelpModal.jsx— Reusable modal showing all available shortcuts with styled kbd elements. Animated with framer-motion.Modified files:
admin/layout/AdminLayout.jsx— Wired the keyboard shortcuts hook and help modal into the admin layout.Shortcuts:
Why
Team leads and admins managing large volumes of tickets need to navigate the dashboard rapidly. Keyboard shortcuts eliminate mouse-based navigation for common routes, matching the efficiency expectations of enterprise support tools (like Zendesk, Jira, or Linear).
Testing