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. */ }