Skip to content

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

Merged
merged 2 commits into from
May 30, 2025
Merged

Fix hotkey scope in settings #12387

merged 2 commits into from
May 30, 2025

Conversation

FelixMalfait
Copy link
Member

Too many conflicts on hotkey scopes (e.g. we still had the issue on the graphql playground). Let's disable all shortcuts in settings.

Copy link
Contributor

@greptile-apps greptile-apps bot left a 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 generic RecordShowPage scope
  • Modified PageChangeEffect to use a single restrictive settings scope instead of multiple specific ones
  • Removed OpportunitiesPage and TasksPage hotkey scopes from useShowAuthModal 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;
Copy link
Contributor

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.

Comment on lines +188 to 196
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;
}
Copy link
Contributor

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

Copy link
Contributor

@bosiraphael bosiraphael left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@FelixMalfait FelixMalfait merged commit c74d7fe into main May 30, 2025
52 checks passed
@FelixMalfait FelixMalfait deleted the fix-graphql-playground branch May 30, 2025 14:45
Copy link
Contributor

github-actions bot commented May 30, 2025

🚀 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.

abdulrahmancodes pushed a commit to abdulrahmancodes/twenty that referenced this pull request May 31, 2025
Too many conflicts on hotkey scopes (e.g. we still had the issue on the
graphql playground). Let's disable all shortcuts in settings.
jordan-chalupka pushed a commit to InsurOS/twenty that referenced this pull request Jun 1, 2025
Too many conflicts on hotkey scopes (e.g. we still had the issue on the
graphql playground). Let's disable all shortcuts in settings.
jordan-chalupka pushed a commit to InsurOS/twenty that referenced this pull request Jun 1, 2025
Too many conflicts on hotkey scopes (e.g. we still had the issue on the
graphql playground). Let's disable all shortcuts in settings.
abdulrahmancodes pushed a commit to abdulrahmancodes/twenty that referenced this pull request Jun 2, 2025
Too many conflicts on hotkey scopes (e.g. we still had the issue on the
graphql playground). Let's disable all shortcuts in settings.
abdulrahmancodes pushed a commit to abdulrahmancodes/twenty that referenced this pull request Jun 2, 2025
Too many conflicts on hotkey scopes (e.g. we still had the issue on the
graphql playground). Let's disable all shortcuts in settings.
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.

2 participants