Repository navigation
Hide the copy button whilst the find or go to line dialog covers it in read-only SQL editors. #10910 - #10911
Conversation
…n read-only SQL editors. pgadmin-org#10910 The find and go to line dialogs sit in the same top right corner as the copy button, and drawn on top of it, so a click meant for the button toggled 'Use regex' or closed the dialog instead. The shared CodeMirror component now hides its own copy button (SQL tab, Schema Diff, About) whilst either dialog is open, and tells its parent through a new onDialogToggle prop, which the Query Tool's Data Output SQL popup uses to hide its Copy SQL button in the same way. The button comes back when the dialog closes. Closes pgadmin-org#10910
|
No actionable comments were generated in the recent review. WalkthroughCodeMirror now reports whether its find or go-to-line dialog is open and hides its copy button while either dialog is open. The SQL query popup uses that state to hide its Copy SQL button. Tests cover dialog transitions and popup keyboard navigation. ChangesEditor Copy Button Visibility
Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Possibly related PRs
Suggested reviewers: Merge Risk:
|
Summary
onDialogToggleprop. The Query Tool's Data Output SQL popup, whose Copy SQL button lives outside the editor, uses that prop to hide its button too. The button comes back as soon as the dialog closes.Test plan
CodeMirror.spec.js(button hidden whilst find or go to line is open,onDialogTogglecalled, button back after Close) andResultSetCopyQuery.spec.js(Copy SQL hidden and skipped by Tab whilst a dialog is open, back afterwards); both fail without the fix.jest --findRelatedTestson the two changed components: 153 suites, 1101 tests pass.Closes #10910
Summary by CodeRabbit