feat : add global keyboard shortcut Alt+T to toggle theme#1009
feat : add global keyboard shortcut Alt+T to toggle theme#1009tmdeveloper007 wants to merge 3 commits into
Conversation
|
@TESTPERSONAL is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel. A member of the Team first needs to authorize it. |
GSSoC Label Checklist 🏷️@Priyanshu-byte-coder — please apply the appropriate labels before merging: Difficulty (pick one):
Quality (optional):
Validation (required to score):
|
|
@TESTPERSONAL is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel. A member of the Team first needs to authorize it. |
The DashboardHeader renders the h1 as 'DASHBOARD' (all-caps via
design), but the Playwright selectors used an exact-case match
{ name: "Dashboard" } which never matched.
Changed all three heading assertions to /dashboard/i regex so they
match the actual DOM output and unblock every failing E2E test.
landing.spec.js: - Remove assertion for 'DevTrack' h1 (hero reads 'YOUR CODE HAS A PULSE') - Add .first() to 'Sign in with GitHub' link selectors (2 links on page, strict mode violation) - Replace 'View on GitHub' link with '★ Star on GitHub' (actual text) auth-bypass.spec.js: - Add .first() to 'Sign in with GitHub' link (strict mode violation) - Change heading assertions from exact 'Dashboard' to /dashboard/i regex dashboard-widgets.spec.js: - Add mock for /api/goals/sync so GoalTracker doesn't hang waiting for a real Supabase call (Goals heading was never rendering in CI) - Add mocks for additional API routes hit on dashboard load
|
Closing as duplicate of #985 which covers the same Alt+T shortcut feature (already approved and has broader implementation with GlobalKeyboardShortcuts). Thanks for contributing! |
Closes #977.
Summary of What Has Been Done:
Implemented the requested keyboard shortcut to toggle dark/light mode via
Alt + Tglobally, and updated the keyboard shortcuts panel modal to list the new shortcut keys clearly.Changes Made:
src/components/KeyboardShortcuts.tsxkey event listener to requiree.altKeywhentis pressed.src/components/ShortcutsModal.tsxkey item display for theme toggling fromTtoAlt + T.Impact it Made:
Allows power users to seamlessly toggle application themes globally using the
Alt + Thotkey (orOption + Ton Mac) without any conflicts with standard keyboard inputs when typing in inputs/textareas, and integrates beautifully with the built-in shortcuts modal display.