Skip to content

Keyboard shortcut support #3890

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

AshAnand34
Copy link
Contributor

@AshAnand34 AshAnand34 commented May 27, 2025

Pull Request Type

  • ✨ feat
  • 🐛 fix
  • ♻️ refactor
  • 💄 style
  • 🔨 chore
  • 📝 docs

Relevant Issues

resolves #3880

What is in this change?

This pull request introduces a new feature for managing and displaying keyboard shortcuts across the application. It includes the addition of a keyboard shortcuts help modal, integration of keyboard shortcuts into the app, and localization support for shortcut descriptions.

New Keyboard Shortcuts Feature:

  • Keyboard Shortcuts Help Modal: Added a new KeyboardShortcutsHelp component to display a modal with a list of keyboard shortcuts and their descriptions. The modal is styled and responsive, and it supports closing via a button. (frontend/src/components/KeyboardShortcutsHelp/index.jsx)

  • Keyboard Shortcuts Hook and Initialization: Introduced useKeyboardShortcuts to manage the state of the help modal and handle keyboard shortcuts. Added the initKeyboardShortcuts function to globally register shortcuts for navigation and actions. (frontend/src/utils/keyboardShortcuts.js)

Integration into the Application:

  • App Component: Integrated the keyboard shortcuts hook into the App component to manage the display of the help modal. The modal is conditionally rendered based on the state. (frontend/src/App.jsx)

  • Quick Links Section: Added a new button in the "Quick Links" section of the home page to open the keyboard shortcuts help modal. Updated the grid layout to accommodate the new button. (frontend/src/pages/Main/Home/QuickLinks/index.jsx)

Localization:

  • Translation Keys: Added translation keys for the keyboard shortcuts modal title and descriptions of all shortcuts. These translations are included in the English locale file. (frontend/src/locales/en/common.js)

Developer Validations

  • I ran yarn lint from the root of the repo & committed changes
  • Relevant documentation has been updated
  • I have tested my code functionality
  • Docker build succeeds locally

@timothycarambat timothycarambat merged commit 2cabb2f into Mintplex-Labs:master May 27, 2025
1 check failed
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.

[FEAT]: Keyboard shortcuts
2 participants