-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
fix: make shortcut change work for shortcuts with two words, added sidebar shortcut, fix categories order #4831
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mfortman11
approved these changes
Nov 25, 2024
anovazzi1
requested changes
Nov 25, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tested on linux machine and the shortcuts that use ctrl+shift+something are not working
anovazzi1
approved these changes
Nov 26, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
6cc1ac5
to
245c7f7
Compare
245c7f7
to
b97578e
Compare
b97578e
to
3d56b16
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Something isn't working
javascript
Pull requests that update Javascript code
lgtm
This PR has been approved by a maintainer
size:L
This PR changes 100-499 lines, ignoring generated files.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces several changes to the shortcut management and sidebar functionality in the frontend application. The most important changes include the addition of a new keyboard shortcut for toggling the sidebar, modifications to the shortcut storage structure, and updates to the utility functions for handling shortcuts.
Shortcut Management Updates:
toggleSidebar
keyboard shortcut to the default shortcuts list and theuseShortcutsStore
state. (src/frontend/src/constants/constants.ts
,src/frontend/src/stores/shortcuts.ts
) [1] [2]useShortcutsStore
to use consistent naming for thefreezePath
shortcut. (src/frontend/src/pages/FlowPage/components/nodeToolbarComponent/hooks/use-shortcuts.tsx
,src/frontend/src/stores/shortcuts.ts
) [1] [2]handleRestore
function inShortcutsPage
to useshortcut_mod
instead ofshortcut
for updating unique shortcuts. (src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/index.tsx
)Sidebar Functionality Enhancements:
useHotkeys
anduseShortcutsStore
to handle the newtoggleSidebar
shortcut, replacing the previous hardcoded keyboard shortcut. (src/frontend/src/components/ui/sidebar.tsx
) [1] [2]SIDEBAR_KEYBOARD_SHORTCUT
constant and its associated event listener for toggling the sidebar. (src/frontend/src/components/ui/sidebar.tsx
) [1] [2]Utility and Miscellaneous Changes:
toNormalCase
utility function and updated relevant imports and usage to ensure consistent shortcut naming. (src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/EditShortcutButton/index.tsx
,src/frontend/src/pages/SettingsPage/pages/ShortcutsPage/index.tsx
) [1] [2]FlowSidebarComponent
to correctly sort categories. (src/frontend/src/pages/FlowPage/components/flowSidebarComponent/index.tsx
)