fix: prevent source setup dropdowns from being clipped by the modal (HDX-4445)#2411
Conversation
🦋 Changeset detectedLatest commit: 772c840 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🔵 Tier 2 — Low RiskSmall, isolated change with no API route or data model modifications. Why this tier:
Additional context: agent branch ( Review process: AI review + quick human skim (target: 5–15 min). Reviewer validates AI assessment and checks for domain-specific concerns. Stats
|
E2E Test Results✅ All tests passed • 197 passed • 3 skipped • 1280s
Tests ran across 4 shards in parallel. |
Deep ReviewThe change flips ✅ No critical issues found. 🟡 P2 — recommended
🔵 P3 nitpicks (1)
Reviewers (5): correctness, testing, maintainability, project-standards, kieran-typescript. Testing gaps: Coverage is jsdom-only by design; actual pixel-level clipping is not assertable without a real-browser E2E test, so the visual fix itself remains unverified by automation. |
c239965 to
d0905b3
Compare
d0905b3 to
5700f04
Compare
…HDX-4445)
The Database, Table, and Server Connection pickers in the source setup form used comboboxProps={{ withinPortal: false }}, so their dropdowns rendered inside the modal's DOM and were clipped by its bounds — with many databases the list was cut off at the modal edge. Render the dropdowns in a portal instead so the full list is visible and scrollable.
Adds a component test that mounts each picker with a 20-item list and asserts every option is rendered AND rendered in a portal (outside the picker's own container). The portal check fails if withinPortal is flipped back to false, independent of how many options there are.
5700f04 to
252ad4a
Compare
What & why
In the Configure New Source modal, clicking the Database field opened a dropdown that was clipped at the top edge of the modal — with several databases the list was cut off and the top entries were unreachable (HDX-4445).
Root cause: the Database, Table, and Server Connection pickers set
comboboxProps={{ withinPortal: false }}, so their dropdowns were positioned inside the modal's DOM and clipped by the modal's bounds. (maxDropdownHeightalready gives the list an internal scrollbar — the problem was purely positional clipping by the modal container.)Change
withinPortal: false → trueon the three source-form pickers (DatabaseSelect,DBTableSelect,ConnectionSelect) so their dropdowns render in a portal and escape the modal's clip box. Matches the in-modal precedent inDashboardFiltersModal;trueis Mantine v9's default.maxDropdownHeight={280}is kept for the internal scroll.sourceFormPickerDropdowns.test.tsx): mount each picker with a 20-item list and assert (a) all 20 options render (no truncation) and (b) they're portaled out of the picker's own container, so a modal can't clip them. (b) is the regression guard — it fails onwithinPortal: falseregardless of option count; (a) guards against truncation. Verified red/green.Note: clipping is a visual
overfloweffect that doesn't change the DOM or an element's box and isn't measurable in jsdom, so the portal DOM-location is the deterministic signal a component test can assert. (True on-screen visual proof would need a real-browser E2E test.)Testing
make ci-lint✅ (lint + tsc, all packages)yarn ci:unit✅ — full app unit suite, incl. the new testwithinPortal: falseall 20 options still render but are nested in the container (clippable) → test fails; ontruethey're portaled out → test passes.Closes HDX-4445.
🤖 Generated with Claude Code