Skip to content

Premium Analytics: Keep settings drawer above widget chrome in stories - #50350

Merged
dognose24 merged 1 commit into
trunkfrom
codex/storybook-drawer-stacking
Jul 9, 2026
Merged

Premium Analytics: Keep settings drawer above widget chrome in stories#50350
dognose24 merged 1 commit into
trunkfrom
codex/storybook-drawer-stacking

Conversation

@dognose24

Copy link
Copy Markdown
Contributor

Fixes a Storybook-only stacking bug noticed while testing #50328.

Proposed changes

  • Add isolation: isolate to the outer box of the shared WidgetDashboardWithWidget story helper. The widget settings drawer carries no z-index of its own (--wp-ui-drawer-z-index defaults to initial, per the @wordpress/ui Drawer contract), so dashboard-internal z-index: 1 elements (widget headers, resize handles) escalated to the document level and painted over the body-portaled drawer. Isolating the helper's stacking context keeps them contained — the same containment the wp-admin shell provides on the real dashboard, which is why the product surface was unaffected.

Related product discussion/links

Does this pull request change what data or activity we track or use?

No. Storybook story helper only; no runtime code is touched.

Testing instructions

  • Run Storybook (pnpm run storybook:dev from projects/js-packages/storybook).
  • Open any WidgetDashboardWithWidget story (e.g. Packages/Premium Analytics/Widgets/Locations or TopPlatforms).
  • Click the widget's settings (⋯) trigger: the settings drawer should slide in above the widget, not behind its header.
  • Confirm the wide-dashboard behavior still works: set a dashboardWidth wider than the preview and check the canvas scrolls horizontally while the drawer stays anchored to the viewport edge.

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 <noreply@anthropic.com>
@dognose24
dognose24 requested review from a team as code owners July 9, 2026 03:45
@dognose24 dognose24 self-assigned this Jul 9, 2026
@dognose24

This comment has been minimized.

@claude

This comment has been minimized.

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖


Follow this PR Review Process:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!

@jp-launch-control

jp-launch-control Bot commented Jul 9, 2026

Copy link
Copy Markdown

Code Coverage Summary

This PR did not change code coverage!

That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷

Full summary · PHP report

@dognose24

Copy link
Copy Markdown
Contributor Author

🤖 Review-cycle summary — 6f30df3d

2 rounds; CI green; claude[bot] LGTM with no changes requested; no human comments pending.

Cycle detail

Commits added during the cycle: none — the initial commit passed review as-is.

Review outcome: claude[bot] independently verified the stacking analysis (drawer z-index initial vs widget chrome z-index: 1), endorsed isolation: isolate over forcing --wp-ui-drawer-z-index as the approach faithful to the product structure, and confirmed the wide-dashboard horizontal scroll behavior is unaffected.

CI: all required checks passing (mergeStateStatus: CLEAN).

@dognose24 dognose24 added [Status] Needs Team Review Obsolete. Use Needs Review instead. and removed [Status] In Progress labels Jul 9, 2026

@chihsuan chihsuan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix!

@dognose24
dognose24 merged commit 41bc0ec into trunk Jul 9, 2026
80 checks passed
@dognose24
dognose24 deleted the codex/storybook-drawer-stacking branch July 9, 2026 04:34
@github-actions github-actions Bot removed the [Status] Needs Team Review Obsolete. Use Needs Review instead. label Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants