fix(query-bar): add resize handle and update execution key binding#7787
Open
bsradcliffe wants to merge 4 commits intomainfrom
Open
fix(query-bar): add resize handle and update execution key binding#7787bsradcliffe wants to merge 4 commits intomainfrom
bsradcliffe wants to merge 4 commits intomainfrom
Conversation
…keybinding Add a textarea-style resize grip to the filter field so users can manually expand the editor beyond the 10-line auto-grow limit. The grip uses role="separator" with ARIA value attributes for accessibility and supports keyboard resizing (Arrow keys, Home/End). Change the execute keybinding from Enter to Mod-Enter (Cmd+Enter on macOS, Ctrl+Enter on Windows/Linux) so bare Enter inserts a newline, aligning with the multiline editor model and the convention used by other database query tools. Co-authored-by: Cursor <cursoragent@cursor.com>
…y resized Remove the maxLines cap that was incorrectly added to the editor when the user has not resized. The original InlineEditor had no maxLines prop and grew with content indefinitely — passing maxLines=10 broke this by capping the editor at 10 lines with a scrollbar. Co-authored-by: Cursor <cursoragent@cursor.com>
The separator role is treated as non-interactive by eslint-plugin-jsx-a11y, causing no-noninteractive-element-interactions and no-noninteractive-tabindex errors. Switch to slider role which is interactive and semantically fits the resize handle with aria-valuenow/min/max. Also corrects orientation to vertical to match the up/down resize behavior. Co-authored-by: Cursor <cursoragent@cursor.com>
Collaborator
Author
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.

Description
I inlined a resize handler to the query bar that CodeMirror does not natively support. It can be made DRY in the future if we need to extend resizing to other fields, but this is the only surface that needs to ingest it right now, so inlining made sense.
Additionally, we did not follow the standard key combination for executing a query. Most IDEs/editors use "Ctrl/Cmd+Enter" to fire a query. Instead, we used "Enter", which is typically reserved for creating new lines and is likely to help discoverability of the auto-growing "Find" input. This changes CodeMirror on the documents tab to match this industry paradigm.
Checklist
Motivation and Context
https://mongodb.slack.com/archives/GDTJXPHD0/p1770825572519319
Open Questions
Dependents
Types of changes