-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Fix hotkey scope in settings #12387
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 hotkey scope in settings #12387
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.
PR Summary
This PR simplifies hotkey management by consolidating page scopes and disabling shortcuts in settings pages to resolve conflicts, particularly in the GraphQL playground.
- Simplified
PageHotkeyScope
enum by replacing specific page scopes (ShowPage, PersonShowPage, etc.) with a genericRecordShowPage
scope - Modified
PageChangeEffect
to use a single restrictive settings scope instead of multiple specific ones - Removed
OpportunitiesPage
andTasksPage
hotkey scopes fromuseShowAuthModal
test cases - Changed
DEBUG_HOTKEY_SCOPE
to true, though this might not be the optimal solution for disabling settings shortcuts
4 files reviewed, 2 comments
Edit PR Review Bot Settings | Greptile
@@ -1 +1 @@ | |||
export const DEBUG_HOTKEY_SCOPE = false; | |||
export const DEBUG_HOTKEY_SCOPE = true; |
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.
logic: Enabling debug mode by default could expose debugging information and affect hotkey behavior across the application. Consider using a more targeted approach to disable hotkeys in specific scopes.
case location.pathname.startsWith(AppBasePath.Settings): { | ||
setHotkeyScope(PageHotkeyScope.Settings, { | ||
goto: false, | ||
keyboardShortcutMenu: true, | ||
}); | ||
break; | ||
} | ||
case isMatchingLocation( | ||
location, | ||
SettingsPath.WorkspaceMembersPage, | ||
AppBasePath.Settings, | ||
): { | ||
setHotkeyScope(PageHotkeyScope.WorkspaceMemberPage, { | ||
goto: true, | ||
keyboardShortcutMenu: true, | ||
keyboardShortcutMenu: false, | ||
commandMenu: false, | ||
commandMenuOpen: false, | ||
}); | ||
break; | ||
} |
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.
style: Disabling all hotkey functionality in settings might be too restrictive - consider keeping basic navigation shortcuts
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
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:62925 This environment will automatically shut down when the PR is closed or after 5 hours. |
Too many conflicts on hotkey scopes (e.g. we still had the issue on the graphql playground). Let's disable all shortcuts in settings.
Too many conflicts on hotkey scopes (e.g. we still had the issue on the graphql playground). Let's disable all shortcuts in settings.
Too many conflicts on hotkey scopes (e.g. we still had the issue on the graphql playground). Let's disable all shortcuts in settings.
Too many conflicts on hotkey scopes (e.g. we still had the issue on the graphql playground). Let's disable all shortcuts in settings.
Too many conflicts on hotkey scopes (e.g. we still had the issue on the graphql playground). Let's disable all shortcuts in settings.
Too many conflicts on hotkey scopes (e.g. we still had the issue on the graphql playground). Let's disable all shortcuts in settings.