Repository navigation
Fixes #33951: key-based CommonWidgets, respect widget size, fix tab flicker - #33952
Conversation
Split the monolithic CommonWidgets into one component per widget key so each widget only initialises its own hooks and closures, and resolve keys exactly instead of by prefix. Stop DynamicHeightWidget from reporting a 0x0 measurement from an unrendered pane into the shared layout (it collapsed the visible LeftPanel and ping-ponged on persona tab switches), and record the picked small/large size on new widgets so Description renders full vs read-more independent of its content-measured height.
…hange onLayoutChange returns only grid fields, so the customize page replaced each widget with a bare Layout and dropped widget-owned fields such as config.size right after a widget was added. Merge RGL's positions onto the stored widgets by id in both the main grid and the left panel handlers.
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
|
| Count | Rule |
|---|---|
| 10 | openmetadata-imports/no-lower-layer-page-imports |
| 9 | openmetadata-imports/no-circular-imports |
| 5 | react-hooks/exhaustive-deps |
| 3 | no-restricted-imports |
All findings
| Location | Rule | Message | |
|---|---|---|---|
| 🟡 | src/components/Customization/CustomizeTabWidget/CustomizeTabWidget.tsx:30:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/Customization/CustomizeTabWidget/CustomizeTabWidget.tsx:34:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/Customization/CustomizeTabWidget/CustomizeTabWidget.tsx:130:6 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 'currentPageType'. Either include it or remove the dependency array. |
| 🟡 | src/components/Customization/CustomizeTabWidget/CustomizeTabWidget.tsx:254:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'activeKey', 'currentPage', 'items', and 'updateCurrentPage'. Either include them or remove the dependency arra |
| 🟡 | src/components/Customization/CustomizeTabWidget/CustomizeTabWidget.tsx:319:5 |
react-hooks/exhaustive-deps |
React Hook useMemo has a missing dependency: 'getWidgetFromLayout'. Either include it or remove the dependency array. |
| 🟡 | src/components/Customization/CustomizeTabWidget/CustomizeTabWidget.tsx:345:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'activeKey', 'currentPage', 'items', and 'updateCurrentPage'. Either include them or remove the dependency arra |
| 🟡 | src/components/Customization/CustomizeTabWidget/CustomizeTabWidget.tsx:370:5 |
react-hooks/exhaustive-deps |
React Hook useCallback has missing dependencies: 'activeKey', 'currentPage', 'currentPageType', 'items', and 'updateCurrentPage'. Either include them or remove |
| 🟡 | src/components/Customization/GenericTab/DynamicHeightWidget.test.tsx:15:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/components/Customization/GenericTab/DynamicHeightWidget.tsx:18:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/utils/CustomizePage/CustomizePageWidgetUtils.ts:21:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/utils/CustomizePage/CustomizePageWidgetUtils.ts:23:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
| 🟡 | src/utils/DashboardDataModelUtils.tsx:25:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
| 🟡 | src/utils/DashboardDataModelUtils.tsx:33:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/utils/DashboardDataModelUtils.tsx:34:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
| 🟡 | src/utils/EntityVersionUtils.interface.ts:25:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/utils/MlModelDetailsUtils.tsx:23:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
| 🟡 | src/utils/MlModelDetailsUtils.tsx:29:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/utils/MlModelDetailsUtils.tsx:31:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
| 🟡 | src/utils/PipelineDetailsUtils.tsx:16:1 |
no-restricted-imports |
'../assets/svg/fail-badge.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designated abstra |
| 🟡 | src/utils/PipelineDetailsUtils.tsx:17:1 |
no-restricted-imports |
'../assets/svg/skipped-badge.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designated abs |
| 🟡 | src/utils/PipelineDetailsUtils.tsx:18:1 |
no-restricted-imports |
'../assets/svg/success-badge.svg' import is restricted from being used by a pattern. Do not import SVG icons directly from assets/ paths; use the designated abs |
| 🟡 | src/utils/PipelineDetailsUtils.tsx:28:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
| 🟡 | src/utils/PipelineDetailsUtils.tsx:35:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/utils/PipelineDetailsUtils.tsx:37:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
| 🟡 | src/utils/SearchIndexUtils.tsx:27:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
| 🟡 | src/utils/SearchIndexUtils.tsx:35:1 |
openmetadata-imports/no-lower-layer-page-imports |
Pages are route-level composition modules. Move the shared implementation/type to a lower layer instead of importing a page from here. |
| 🟡 | src/utils/SearchIndexUtils.tsx:37:1 |
openmetadata-imports/no-circular-imports |
This runtime import participates in a circular dependency. Extract the shared type/constant/utility or invert the dependency. |
Fix locally (fast - only checks files changed in this branch):
make ui-checkstyle-changed
✅ Playwright Results — workflow succeededValidated commit ✅ 4580 passed · ❌ 0 failed · 🟡 6 flaky · ⏭️ 1 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 1h 1m 17s ⏱️ Max setup 4m 53s · max shard execution 22m 12s · max shard-job elapsed before upload 26m 24s · reporting 22s 🌐 128.58 requests/attempt · 2.24 app boots/UI scenario · 30.03% common-shard skew Optimization targets still in progress:
🟡 6 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
…gets Break the import cycles that reached CommonWidgets through TablePureUtils by moving the pure extract* helpers it used out of the JSX util modules, and drop two runtime imports that only carried types. Move WidgetConfig to the interface layer (pages re-exports it) so the widgets no longer import from pages. Add tests for the hooks, Description, Owner, DataProducts and LeftPanel widgets and the remaining widget keys, bringing every new file to full line coverage.
Code Review ✅ Approved 1 closed / 1 findings🟡 Medium risk · Refactors entity detail widgets and changes saved layout sizing and tab behavior Refactors ✅ 1 closed✅ Bug: Default-expanded descriptions lose their read-less toggle
OptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|



Describe your changes:
Fixes #33951
I split the monolithic
CommonWidgetsinto a key-based registry of per-widget components, because every render initialised all widget closures regardless of widget type and resolved keys by prefix, so config could reach the wrong widget. I also made widgets respect the Small/Large size picked when adding them (recorded asconfig.size, now preserved through react-grid-layout updates), and stopped an unrendered tab pane from writing a 0 height into the shared layout, which caused the LeftPanel flicker and unresponsive tab clicks.Type of change:
High-level design:
CommonWidgets.tsxresolveswidgetConfig.i(exact match, or a-<n>instance suffix) againstCOMMON_WIDGET_REGISTRYand mounts only the matching component fromwidgets/. Unregistered keys fall back tocommonWidgetClassBase. Shared derivations live inCommonWidgets.hooks.tsx, and the glossary-term tag confirmation state now lives inside the tag widgets.getAddWidgetHandlerstoresconfig.size('small' | 'large') on new widgets. A newmergeGridLayoutkeeps widget-owned fields (config,children) whenCustomizeTabWidgetapplies react-grid-layout'sonLayoutChangeoutput, which only has grid fields.DescriptionWidgetshows the full description for Large and clamps behind "read more" for Small. It uses the existing free-formWidgetConfig.config/ pagelayoutJSON, so there's no schema change, and existing layouts behave as before.w(its meaning differs between the main grid and the left panel); a provider-level height cache (leaked heights across tabs).Tests:
Use cases covered
Unit tests
CommonWidgets.test.tsx,DynamicHeightWidget.test.tsx,CustomizePageWidgetUtils.test.ts(new). All 28 customization-related suites pass (287 tests), plus the GenericProvider and TableDetailsPageV1 suites.Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
UI screen recording / screenshots:
Before:
Screen.Recording.2026-09-24.at.4.22.53.PM.mov
After:
Screen.Recording.2026-09-24.at.4.21.41.PM.mov
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.