Skip to content

[2.0] Fixes #33951: key-based CommonWidgets, respect widget size, fix tab flicker - #33996

Merged
chirag-madlani merged 1 commit into
2.0from
backport/2.0/pr-33952
Sep 25, 2026
Merged

chirag-madlani merged 1 commit into
2.0from
backport/2.0/pr-33952

Conversation

@chirag-madlani

Copy link
Copy Markdown
Collaborator

Describe your changes:

Fixes #33951

Backport of #33952 to 2.0: key-based CommonWidgets registry, widgets respect the Small/Large size picked when adding them (config.size, preserved through react-grid-layout updates), and DynamicHeightWidget ignores 0×0 measurements from unrendered panes (LeftPanel flicker / unresponsive tab clicks on persona tabs).

Adapted to 2.0 (2.0's pre-refactor CommonWidgets behaviour kept as-is):

  • Permissions: 2.0 has no PermissionDerivation, so each widget uses the same checks 2.0's CommonWidgets did (permissions.X || permissions.EditAll, && !deleted; getPrioritizedViewPermission for custom-property view).
  • Owners: OwnerWidget renders 2.0's OwnerLabelV2 instead of main's card-based owner widget.
  • BulkEntityImportPage.interface.ts: main's type-only import change doesn't apply (2.0 doesn't import CSV.utils there), so it's left untouched.

Type of change:

  • Improvement

Tests:

  • Related suites on 2.0 (CommonWidgets + widgets + hooks, DynamicHeightWidget, CustomizePageWidgetUtils, TablePureUtils and the moved extract* helper suites, GenericTab/GenericProvider/LeftPanelContainer/CustomizeTabWidget, TableDetailsPageV1): 20 suites, 144 tests pass.
  • tsc: no errors in the 40 touched files. ESLint: 0 errors, 0 warnings on touched files.

UI screen recording / screenshots:

See #33952.

…licker (#33952)

* refactor(ui): key-based registry for common detail-page widgets

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.

* fix(ui): keep widget config when react-grid-layout reports a layout change

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.

* fix(ui): keep the read-more toggle on default-expanded descriptions

Pass isDescriptionExpanded to Description again and let only a Large widget or
a Domain drop the toggle, so a Small widget that opens expanded (e.g. a table
with no columns) can still collapse long text.

* chore(ui): clear lint warnings in CommonWidgets and cover the new widgets

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.

(cherry picked from commit 509e0c5)
@chirag-madlani
chirag-madlani requested a review from a team as a code owner September 25, 2026 04:51
@chirag-madlani chirag-madlani added the UI UI specific issues label Sep 25, 2026
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@github-actions github-actions Bot added the safe to test Add this label to run secure Github workflows on PRs label Sep 25, 2026
@gitar-bot

gitar-bot Bot commented Sep 25, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

🟡 Medium risk · Entity-detail widget rendering, size persistence, and hidden-pane height handling change.

Backport of key-based CommonWidgets registry to 2.0 branch, ensuring widgets respect their configured size and fixing tab flicker in DynamicHeightWidget by ignoring 0×0 measurements from unrendered panes. Adapted to 2.0's pre-refactor architecture with appropriate permission checks and OwnerLabelV2 rendering. All 144 tests pass with no TypeScript or ESLint errors.

Review coverage

📋 Rules No rules evaluated

🧪 Functional validation Not enabled · Set up

🤖 Auto-approval Not enabled · Set up

Options

Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 67%
67.47% (81418/120660) 52.12% (50106/96126) 53.05% (14935/28150)

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit ad76e8be1a307a09fc6feb487598546c46983c26 in Playwright run 36096175129, attempt 1.

✅ 596 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky

Performance

Blocking 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) 49m 43s

⏱️ Max setup 3m 17s · max shard execution 17m 58s · max shard-job elapsed before upload 21m 15s · reporting 3s

🌐 214.37 requests/attempt · 2.70 app boots/UI scenario · 16.05% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 16.05% (convergence target: at most 15%).
  • Browser traffic was 214.37 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.7 per UI scenario (1744 boots / 645 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 154 0 0 0 0 0
✅ Shard chromium-02 142 0 0 0 0 0
✅ Shard chromium-03 142 0 0 0 0 0
✅ Shard data-asset-rules-01 65 0 0 0 0 0
✅ Shard domain-isolation-01 16 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard ingestion-01 1 0 0 0 0 0
✅ Shard reindex-01 2 0 0 0 0 0
✅ Shard search-01 11 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@chirag-madlani
chirag-madlani enabled auto-merge (squash) September 25, 2026 07:23
@chirag-madlani
chirag-madlani merged commit 800c58b into 2.0 Sep 25, 2026
115 of 160 checks passed
@chirag-madlani
chirag-madlani deleted the backport/2.0/pr-33952 branch September 25, 2026 08:33

This branch was previously deployed

1 inactive deployment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants