Repository navigation
fix(ui): anchor schema diff migration copy button outside scroll area - #1082
Merged
cevheri merged 1 commit intoSep 22, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
cevheri
approved these changes
Sep 22, 2026
cevheri
left a comment
Member
There was a problem hiding this comment.
Thanks @Aditya-XR, and welcome to LibreDB Studio! The red Functional Smoke check was a flaky E2E test on our side, not your change; a rerun on the same commit is green. The fix follows the CodeGenerator pattern and the structural test covers what #1080 asked for.
Merging now.
13 of 20 tasks
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
In
src/components/SchemaDiff.tsx, the SQL Migration view previously placed its migration SQL<pre>block without an anchored copy button within the scrollable container. When scrolling through long migrations, any control placed in normal document flow scrolls out of view.This PR addresses #1080 by:
CopyButtonfrom@/components/copy-buttoninto the SQL Migration view withtestId="schema-diff-migration-copy".CodeGenerator.tsx:346: wrapping the<pre>in adiv.relative, constraining<pre>withmax-h-[50vh]andoverflow-auto, and pinning theCopyButtonwithabsolute top-3 right-3. This guarantees that the button stays anchored in view regardless of how far down a long migration script the user scrolls.tests/components/SchemaDiff.test.tsxverifying:testId="schema-diff-migration-copy"and copies migration SQL to the clipboard.<pre>element.absoluteover therelativecontainer wrapping the scrollable<pre>.Closes #1080
Testing
bun tests/run-tests.ts tests/components/SchemaDiff.test.tsx(138/138 pass).bun run typecheck(tsc --noEmit- 0 errors).bun run lint:oxc(oxlint- 0 errors).