Skip to content

fix(query-bar): add resize handle and update execution key binding#7787

Open
bsradcliffe wants to merge 4 commits intomainfrom
feat/query-bar-resize-handle
Open

fix(query-bar): add resize handle and update execution key binding#7787
bsradcliffe wants to merge 4 commits intomainfrom
feat/query-bar-resize-handle

Conversation

@bsradcliffe
Copy link
Collaborator

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.

CleanShot 2026-02-12 at 08 24 58@2x

Checklist

  • New tests and/or benchmarks are included
  • Documentation is changed or added
  • If this change updates the UI, screenshots/videos are added and a design review is requested
  • If this change could impact the load on the MongoDB cluster, please describe the expected and worst case impact
  • I have signed the MongoDB Contributor License Agreement (https://www.mongodb.com/legal/contributor-agreement)

Motivation and Context

https://mongodb.slack.com/archives/GDTJXPHD0/p1770825572519319

  • Bugfix
  • New feature
  • Dependency update
  • Misc

Open Questions

Dependents

Types of changes

  • Backport Needed
  • Patch (non-breaking change which fixes an issue)
  • Minor (non-breaking change which adds functionality)
  • Major (fix or feature that would cause existing functionality to change)

bsradcliffe and others added 2 commits February 11, 2026 11:58
…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>
@bsradcliffe bsradcliffe requested a review from a team as a code owner February 12, 2026 16:29
@bsradcliffe bsradcliffe requested a review from lerouxb February 12, 2026 16:29
@bsradcliffe bsradcliffe changed the title fix/query bar resize handle fix(query-bar): add resize handle and update execution key binding Feb 12, 2026
@github-actions github-actions bot added the fix label Feb 12, 2026
@bsradcliffe bsradcliffe added no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion) no release notes Fix or feature not for release notes labels Feb 12, 2026
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>
@bsradcliffe
Copy link
Collaborator Author

Me approving my own design review:
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix no release notes Fix or feature not for release notes no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant