Repository navigation
fix(shortcuts): the reference matches the bindings; Ctrl+Enter, Shift+Alt+F and Ctrl+, work as listed (#1148) - #1261
Merged
Conversation
…ft+Alt+F formats; Ctrl+, opens Preferences (#1148) - The global key handler sent Ctrl/Cmd+Enter, Ctrl/Cmd+R and F5 to the same script run. Outside the editor (results grid, toolbar) Ctrl+Enter now runs the selection or the statement at the cursor, as inside it; F5 and Ctrl/Cmd+Shift+Enter run the script. SqlEditorCommandBridge gets onExecuteStatement / invokeExecuteStatement for that. - Shift+Alt+F was named in the reference, the Format button tooltip and the palette, but bound nowhere. The SQL workspace binds it. - Ctrl+, worked only through the macOS menu bar; the global handler opens Preferences on Linux and Windows too.
…it so (#1148) - F5 was listed as 'Refresh schema / connection'; nothing refreshes the tree on F5. It runs the script in the SQL editor and reloads the table browser: listed as an alternative of Execute all statements and as Refresh table data. - Ctrl/Cmd+R is listed with Execute query / selection, Ctrl/Cmd+E (edit mode), Ctrl/Cmd+P (palette) and Ctrl/Cmd+K (quick switcher) are added. - ShortcutItem.alternativeKeys: other combinations for the same action, shown after 'or' and found by the keycap search. - A workspace test checks every SQL Editor combination of the reference against the workspace's bindings; Shift+Alt+F formats the active tab.
…nawaited The wrapper did not compile and took every test that loads the main screen with it.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Closes the gaps left on #1148: no test checked the shortcuts reference against the real bindings, and F5 was described as "Refresh schema". Checking it found three bindings that did not do what the app says.
Bindings
main_screensent Ctrl/Cmd+Enter, Ctrl/Cmd+R and F5 to the same script run. Now Ctrl/Cmd+Enter and Ctrl/Cmd+R run the selection or the statement at the cursor, as inside the editor, and F5 / Ctrl/Cmd+Shift+Enter run the script. This uses the newSqlEditorCommandBridge.onExecuteStatement/invokeExecuteStatement, which falls back to the script run.Reference (
preferences_shortcuts_section.dart)ShortcutItem.alternativeKeys: other combinations for one action, shown after "or" and matched by the keycap search (also in the Preferences search count).Tests
generic_sql_workspace_shortcuts_test.dart: every SQL Editor combination in the reference is bound in the workspace; Shift+Alt+F formats the active tab.sql_editor_command_bridge_test.dart: statement vs script, and the fallback.preferences_shortcuts_section_test.dart: the F5 search finds Execute all statements and Refresh table data.Not covered by the reconciliation test: the Data Grid and Navigation rows. Those are bound in the grid and in the global handler, which is a raw key handler, not a shortcut map.
Refs #1148
Test plan