fix(notebook): render db selector dropdown via portal so it isn't clipped#178
Merged
debba merged 1 commit intoTabularisDB:mainfrom May 11, 2026
Merged
Conversation
The cell wrapper has overflow-hidden, which clipped the absolutely positioned database selector dropdown when many databases existed. Render the dropdown through a portal with fixed positioning computed from the trigger button so the full list (with its 230px scroll area) is reachable regardless of cell height.
Collaborator
|
Good catch, will merge it, thanks for your contribution. |
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
position: absoluteinsideNotebookCellWrapper, which hasoverflow-hidden. As a result, when a connection manages many databases (e.g., a single MySQL host with dozens of schemas), the dropdown'smax-h-[230px]scroll area is clipped by the cell's bounding rect — particularly noticeable on short cells (no result yet, collapsed neighbors, or the last cell in a notebook), where lower entries become unreachable and the scrollbar isn't visible.createPortaltodocument.body) withposition: fixed, computed from the trigger button'sgetBoundingClientRect(). Position is also recomputed onscroll(capture) andresize, matching the existing pattern insrc/components/ui/Select.tsx.max-h-[230px] overflow-y-autobehavior, backdrop click-to-close, and the show-only-when-selectedDatabases.length > 1condition are all preserved.Why
Without this change,
overflow-hiddenon the cell wrapper visually clips the absolutely-positioned dropdown regardless of its inneroverflow-y-auto, defeating the scroll added in #160 whenever the cell is shorter than the dropdown.Test plan
pnpm typecheckpassespnpm tauri dev— connect to a MySQL host with many databases (>12) and select multiple in the connection dialog