-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add save shortcut for navigation menu screen #21342
Conversation
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.
Code wise, this looks good (I didn't test).
It would be good to extract at some point the keyboard shortcuts modal to the keyboard shortcuts package in order to reuse in multiple screen. It is still 100% generated dynamically yet though.
packages/edit-navigation/src/components/menu-editor/shortcuts.js
Outdated
Show resolved
Hide resolved
return null; | ||
} | ||
|
||
MenuEditorShortcuts.Register = RegisterMenuEditorShortcuts; |
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.
I know we used this pattern in the other packages too, but I wonder if a hook is better than a component for the registration :) (not specific to this PR though)
Size Change: +449 B (0%) Total Size: 884 kB
ℹ️ View Unchanged
|
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 and worked as described.
I need to update the package-lock file by the looks of it. Will do that tomorrow and then merge. Thanks for the speedy reviews! |
Description
Related #21338
Adds a save shortcut for the navigation menu screen.
It does this via a
MenuEditorShortcuts
component that might be useful for registering any other shortcuts.How has this been tested?
Note - when saving there's no success/error notifications. I've created #21344 to track that.
Types of changes
New feature (non-breaking change which adds functionality)
Checklist: