From 6f30df3d26ec094bc2503412a89595159c95b849 Mon Sep 17 00:00:00 2001 From: dognose24 Date: Thu, 9 Jul 2026 11:44:53 +0800 Subject: [PATCH] Premium Analytics: Isolate dashboard story stacking context The widget settings drawer has no z-index of its own; widget headers' z-index: 1 escalated past the story helper's wrappers and painted over the body-portaled drawer. isolation: isolate contains them, matching the stacking context the wp-admin shell provides in product. Co-Authored-By: Claude Fable 5 --- .../changelog/storybook-drawer-stacking | 4 ++++ .../widgets/stories/widget-dashboard-with-widget.tsx | 9 +++++++++ 2 files changed, 13 insertions(+) create mode 100644 projects/packages/premium-analytics/changelog/storybook-drawer-stacking diff --git a/projects/packages/premium-analytics/changelog/storybook-drawer-stacking b/projects/packages/premium-analytics/changelog/storybook-drawer-stacking new file mode 100644 index 000000000000..f0599714e1fa --- /dev/null +++ b/projects/packages/premium-analytics/changelog/storybook-drawer-stacking @@ -0,0 +1,4 @@ +Significance: patch +Type: fixed + +Keep the widget settings drawer above widget chrome in dashboard Storybook stories. diff --git a/projects/packages/premium-analytics/widgets/stories/widget-dashboard-with-widget.tsx b/projects/packages/premium-analytics/widgets/stories/widget-dashboard-with-widget.tsx index 213eda1c0a26..830363fea513 100644 --- a/projects/packages/premium-analytics/widgets/stories/widget-dashboard-with-widget.tsx +++ b/projects/packages/premium-analytics/widgets/stories/widget-dashboard-with-widget.tsx @@ -188,6 +188,14 @@ export function WidgetDashboardWithWidget( { * wp-admin viewport. Without a definite height the page collapses to its * content height and the fixed-row-height grid resizes it back on every * vertical widget resize, so the two oscillate and the grid flickers. + * + * `isolation: isolate` keeps dashboard-internal z-indexes (widget + * headers, resize handles) inside this box's stacking context. The + * settings drawer has no z-index of its own (`--wp-ui-drawer-z-index` + * defaults to `initial`), so without the isolation those `z-index: 1` + * elements escalate to the document level and paint over the + * body-portaled drawer — in the real dashboard the wp-admin shell + * provides this containing stacking context. */ }