Repository navigation
Keep entity summary panels at 400px so lineage tab counts fit - #37888
Conversation
react-reflex applies a ReflexElement's minSize only while the splitter is dragged; on first render the panel takes its flex share. Beside the 800px asset list that share drops below the declared 400px (about 356px at a 1512px window, 279px at 1280px), so the lineage tab's Upstream/Downstream tabs no longer fit and the Downstream count spilled outside the tab bar. Add tw:min-w-100 to the right summary panel on the Data Product, Domain, Domain data products, Glossary term, Tag and Metric pages so the declared minimum also holds on first render. Wider windows keep their flex share.
react-reflex does apply minSize on mount: it raises each panel's flex to its minSize. When the left panel's minimum (800px, 700px on Glossary and Metric) plus the right panel's 400px exceed the container, flex-grow then splits the space by those ratios, so the right panel gets about a third (279px at a 1280px window, 356px at 1512px). The previous comments said reflex applied minWidth only while dragging; replace them with the real reason. tw:min-w-100 keeps the summary panel at 400px at every width.
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
anuj-kumary
left a comment
There was a problem hiding this comment.
Thanks for the detailed root-cause write-up. The diagnosis is right: minSize is only enforced by react-reflex's JS, so when 800 + 400 exceeds the container the right panel gets squeezed below its declared minimum. The CSS fix itself is safe (--spacing: 4px → tw:min-w-100 = 400px, .reflex-element { overflow: hidden } lets the left panel shrink cleanly, and .hidden still applies display: none). I also checked openmetadata-collate: nothing selects these panel test IDs, so that open question is answered.
I'd like the minimum to live in ResizablePanels as an opt-in driven by minWidth, rather than a hardcoded class on six callers:
// ResizablePanels.interface.ts → PanelProps
enforceMinWidth?: boolean;
// ResizablePanels.tsx, second <ReflexElement> (ReflexElement merges `style`)
style={
secondPanel.enforceMinWidth && !isRightPanelCollapsed
? { minWidth: secondPanel.minWidth }
: undefined
}Why:
- One source of truth. The CSS minimum comes from
minWidth, so changing it later can't leave a staletw:min-w-100behind. - Testable.
ResziablePanels.test.tsxcan assertstyle.minWidth === '400px'when the prop is set and nothing when it isn't, so a revert fails Jest instead of relying on visual baselines that haven't been captured yet. - Opt-in keeps the blast radius you were worried about small. Default-on would change 30+ other callers (Add Service, SSO, Collate's QueryRunner/Automator…) on narrow screens.
- Test IDs stay clean.
classNamedoubles asdata-testid, so the current approach puts a Tailwind class into six test IDs. - Optionally, add a
COMMON_RESIZABLE_PANEL_CONFIG.ENTITY_SUMMARY_PANELwithenforceMinWidth: trueso the summary callers spread one config.
Follow-up (separate issue, not blocking): the underlying fragility is LineageTabContent's <Tabs.List fullWidth size="sm" type="button-border">, which can't shrink (core TabList only scrolls for variant="card"). That's why Team → Assets stays broken. A container query that drops the label text below ~280px and keeps the count with a tooltip would cover every host.
Before merge: the PR still needs a linked issue or the skip-pr-checks label, the 14 visual baselines refreshed, and the affected Playwright specs run.
| // Both minWidths can exceed the container, so reflex splits it by ratio; tw:min-w-100 keeps 400px. | ||
| className: | ||
| 'entity-summary-resizable-right-panel-container domain-resizable-panel-container', | ||
| 'entity-summary-resizable-right-panel-container domain-resizable-panel-container tw:min-w-100', |
There was a problem hiding this comment.
400 is now declared twice on this panel: minWidth: 400 above (for reflex) and tw:min-w-100 here (for CSS). If minWidth changes, the class silently stays at 400. The same applies to all six callers. I'd prefer enforceMinWidth: true with ResizablePanels applying style={{ minWidth }} from the existing value (details in the review summary). That also keeps tw:min-w-100 out of this panel's data-testid.
| ), | ||
| minWidth: 400, | ||
| flex: 0.33, | ||
| // Both minWidths can exceed the container, so reflex splits it by ratio; tw:min-w-100 keeps 400px. |
There was a problem hiding this comment.
Nit: this comment is repeated verbatim in six files. With the opt-in prop, one comment on the prop in ResizablePanels.interface.ts covers it and these can go.
| // Both minWidths can exceed the container, so reflex splits it by ratio; tw:min-w-100 keeps 400px. | ||
| className: | ||
| 'entity-summary-resizable-right-panel-container domain-resizable-panel-container', | ||
| 'entity-summary-resizable-right-panel-container domain-resizable-panel-container tw:min-w-100', |
There was a problem hiding this comment.
Unlike the other five, this ResizablePanels (line 150) has no hideSecondPanel. Once the preview is closed (setSelectedCard(undefined)), an empty panel now holds 400px instead of ~1/3. Could you add hideSecondPanel={!selectedCard} to match the others?
Review follow-up. Instead of a hardcoded tw:min-w-100 on six callers,
PanelProps gets an opt-in enforceMinWidth: when set, ResizablePanels gives
the second panel style={{ minWidth }} from its existing minWidth (not while
collapsed), so the CSS minimum cannot drift from the reflex one and the
panel data-testid no longer carries a Tailwind class.
The six entity summary panels spread a new
COMMON_RESIZABLE_PANEL_CONFIG.ENTITY_SUMMARY_PANEL (400px, 0.33, enforced);
Glossary and Metric keep their 0.3 flex. The style helper lives in
ResizablePanels.utils.ts to keep the component under the sonarjs
complexity limit. Domain > Data Products also hides its second panel when
no card is selected, like the other five pages.
Tests: ResizablePanels asserts the inline min width with and without the
prop (fails without the fix); the util test covers the collapsed case.
Code Review ✅ Approved 🟡 Medium riskApplying CSS minimum widths across six entity preview layouts changes panel sizing, which could reduce asset-list space on narrower windows. Keeps entity summary preview panels at their declared 400px minimum by enforcing it through a shared VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
* test(playwright): refresh stale 2.1 visual baselines and fix shell menu scenes Refresh 32 baselines from the 2.1 nightly (run 44266671648) actuals. Every diff traces to an intended change that arrived with the main merge: Tableau connected-app auth option (#37084), 400px entity summary panel (#37888), unified CopyButton (#37953), new Insights/AdvancedSearch icons (#37973), Data Estate connector counts (#37910) and the users Name/Email columns (#37127, #37998). shell-profile-menu and shell-mode-menu waited for my-data-page, which #38077 removed from /my-data in AI mode; wait for home-landing-page. * test(playwright): complete 2.1 shell and expanded Tableau baselines
Describe your changes:
No linked issue: the owner chose to open this fix without one, so Validate PR Metadata needs the
skip-pr-checkslabel.Bug. In the asset preview panel's Lineage tab, the Downstream tab and its count badge spill outside the Upstream/Downstream tab bar. Repro: Data Product → Assets → click an asset → Lineage, in a 1512px-wide window (AI mode). Narrower windows clip the Downstream tab entirely.
Cause. The preview panel is the second panel of
ResizablePanels(minWidth: 400) beside the asset list (minWidth: 800, or 700 on Glossary/Metric). On mount react-reflex raises each panel's flex to itsminSize(ReflexContainer.computeFlexData), then rendersflexGrow: flexwithflexBasis: 0%. When the two minimums together exceed the container, the space is split by that ratio, so the right panel gets about a third of it, well under 400px. The tab bar is then narrower than the two tabs need:Fix.
PanelPropsgets an opt-inenforceMinWidth. When it is set,ResizablePanelsgives the second panelstyle={{ minWidth }}from its existingminWidth(not while collapsed), so CSS holds the panel at its declared 400px and the asset list takes the rest. The six pages that renderEntitySummaryPanelthis way spread a newCOMMON_RESIZABLE_PANEL_CONFIG.ENTITY_SUMMARY_PANEL(minWidth: 400,flex: 0.33,enforceMinWidth: true); Glossary and Metric keep theirflex: 0.3. Wider windows keep their flex share (e.g. 527px at 1920px, unchanged). Upstream and Downstream stay side by side; the coreTabscomponent is untouched.Trade-offs for reviewers:
hideSecondPanel={!selectedCard}, like the other five pages, so an empty preview panel never holds 400px.offsetWidth − minSize) now returns 0 at the minimum, where it previously went negative.Type of change:
High-level design:
ResizablePanels.interface.ts:PanelProps.enforceMinWidth?: boolean(documented on the prop).ResizablePanels.tsx: secondReflexElementgetsstyle={getEnforcedMinWidthStyle(secondPanel, isRightPanelCollapsed)}; react-reflex mergesstyleinto the element's own. The helper sits inResizablePanels.utils.tsbecause an inline ternary pushed the component oversonarjs/cyclomatic-complexity(12 > 10).ResizablePanel.constants.ts:COMMON_RESIZABLE_PANEL_CONFIG.ENTITY_SUMMARY_PANEL.RIGHT_PANELis unchanged, so its other users (Domain Documentation, Service details) are untouched.ENTITY_SUMMARY_PANEL:utils/DataProductUtils.tsxutils/DomainUtils.tsxcomponents/Domain/DomainTabs/DataProductsTab/DataProductsTab.component.tsxpages/TagPage/TagPage.tsxutils/Glossary/GlossaryTermUtils.tsxcomponents/Metric/MetricAssetsTab/MetricAssetsTab.tsxAlternatives rejected:
minWidthinResizablePanelsby default — would change ~28 other callers (first panels withminWidth: 800, Table Queries atflex: 0.13, Add Service, SSO, Collate panels) on narrow screens; hence opt-in.tw:min-w-100on each caller (this PR's first version) — duplicated the 400 next tominWidthand put a Tailwind class into each panel'sdata-testid; replaced per review.tw:flex-wrap/min-w-0+ truncate) — stacks Upstream over Downstream or cuts the labels to "Downstr…"; the tabs are meant to stay side by side, which needs the panel width.frontend-styling.md).The panels'
className(whichResizablePanelsalso uses asdata-testid) is unchanged, so no test IDs change. openmetadata-collate was checked in review: nothing selects these IDs.Not covered here: Team → Assets (
TeamDetailsV1.tsx) renders the same summary panel in a 6/24Grid.Item, not inResizablePanels, so it can also be under 400px. It predates this change and needs a different layout fix (e.g. the Users page'stw:flex-[0_0_400px]).Tests:
Use cases covered
Unit tests
ResziablePanels.test.tsx: the second panel gets an inlinemin-width: 400pxwithenforceMinWidth, and none without it. Fails without the fix (checked by removing thestyleprop: 1 failed, 7 passed).ResizablePanels.utils.test.ts:getEnforcedMinWidthStylefor enforced, not enforced, and collapsed (the collapsed path isn't reachable from the component test).Run on
c98719adfa8(after mergingmain):yarn ui-checkstyle:changedon all changed files: 0 errors (8 pre-existing warnings on untouched lines).yarn tsc:check: no errors from this change.Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Not run locally.
make playwright_affectedselects ~95 impacted specs (Domain, Data Product, Glossary, Tag, Metric pages); they run in the merge queue. The impact map has no entry forutils/DataProductUtils.tsx, so CI runs the full suite for it.Visual regression baselines
Pending — needs a CI capture run. These scenes render the preview panel at 1440px, where it was 332–370px; it is now 400px, so these baselines change (light + dark each, 14 files):
entityTabs.spec.ts-snapshots/:tab-dataProduct-assets,tab-domain-assets,tab-domain-data-products,glossaryTerm-tab-assets,tag-tab-assets,metric-tab-assetsmetricList.spec.ts-snapshots/:metric-state-assetsThis branch is on a fork, so
gh workflow run playwright-postgresql-e2e.yml --ref fix/summary-panel-min-width -f full_suite=falsecannot be dispatched upstream from here. A maintainer run (or a run on a pushed upstream branch) is needed to capture the Linux-actual.pngfiles, which then get committed over these baselines.Manual testing performed
docker/development, sample data) + this branch's UI via Vite; signed in as admin.UI screen recording:
Not applicable — standalone layout bug fix, not a feature. Measurements are listed above.
Checklist:
I have read the CONTRIBUTING document.
My PR title is
Fixes <issue-number>: <short explanation>— no linked issue (see top).My PR is linked to a GitHub issue via
Fixes #<issue-number>above — no linked issue (see top).I have commented on my code, particularly in hard-to-understand areas.
For JSON Schema changes: I updated the migration scripts or explained why it is not needed. — N/A
For a UI feature or feature task: as part of PR creation, I ran the PR build in Docker with sample data and embedded a verified GitHub-hosted recording plus build/health evidence above (or explained why this requirement is not applicable).
I have added tests (unit / integration / Playwright as applicable) and listed them above.
Self-review: I reviewed the final diff against
REVIEW.md(thepr-checklistskill runs it) and fixed every 🔴 finding, or answered it on the line below.Fresh-eyes review of
edd81fd07a4: no 🔴. 🟡 inaccurate react-reflex comment/commit text → fixed in the follow-up commit. 🟡 no test fails if the fix is reverted → answered: jsdom has no layout and every Jest suite mocksResizablePanels; the 14 visual baselines listed above, once refreshed, capture the panel at 400px at 1440px, so a revert fails the visual lane. 🟡 Team → Assets panel → out of scope (notResizablePanels, pre-existing), noted above.Maintainer review (anuj-kumary) → applied in
c98719adfa8: opt-inenforceMinWidth, sharedENTITY_SUMMARY_PANELconfig, one comment on the prop,hideSecondPanelon Domain → Data Products, Jest coverage.Decision check: no new decision — the 400px minimum was already declared by each panel's
minWidth; this makes it hold on first render.I have added a test that covers the exact scenario we are fixing (
ResziablePanels.test.tsx; fails without the fix).Summary by Gitar
enforceMinWidthtoPanelProps, applied throughgetEnforcedMinWidthStyleinResizablePanels.utils.tsENTITY_SUMMARY_PANELconfig withenforceMinWidth: trueinResizablePanel.constants.tshideSecondPanel={!selectedCard}so the preview panel is hidden until a card is selectedENTITY_SUMMARY_PANELgetEnforcedMinWidthStyleand CSS min-width behavior inResizablePanelsThis will update automatically on new commits.


Confidence Score: 5/5
The reviewed changes appear safe to merge.Summary
Keeps entity summary previews at their declared 400px minimum without changing other resizable panels.
Vansh0310 explicitly deferred visual baseline updates until a CI capture is available. Tests and browser checks were not rerun during this review; local dependencies were unavailable.
Reviews (10) · Last reviewed commit: "refactor(ui): enforce the summary panel ..." · Reviewed by Greptile