Skip to content

Premium Analytics: keep widget-dashboard story settings drawer on-screen#50070

Open
chihsuan wants to merge 1 commit into
trunkfrom
fix/wooa7s-1631-widget-dashboard-story-settings-drawer
Open

Premium Analytics: keep widget-dashboard story settings drawer on-screen#50070
chihsuan wants to merge 1 commit into
trunkfrom
fix/wooa7s-1631-widget-dashboard-story-settings-drawer

Conversation

@chihsuan

@chihsuan chihsuan commented Jun 30, 2026

Copy link
Copy Markdown
Member

Proposed changes

In the shared WidgetDashboardWithWidget Storybook story, opening a widget's settings (⚙ gear → drawer) looked broken — the drawer rendered off the visible canvas. The setting itself works (verified live preview + Save); only the drawer was off-screen.

  • Why: the host Drawer is position: fixed; right: 0, portaled to <body>, so it anchors to the iframe viewport. The story wrapped the dashboard in one width: dashboardWidth; max-width: 100% div, so at the 1644px desktop preset the grid overflows the document horizontally whenever the preview canvas is narrower — pushing the drawer past the visible pane.
  • How: wrap the dashboard in a canvas-width scroll box (outer width: 100%; overflow-x: auto + inner width: dashboardWidth) so the body never overflows and the drawer stays on-screen; the wide layout is still reachable by scrolling.
  • What: widgets/stories/widget-dashboard-with-widget.tsx only.

Storybook-harness fix; real wp-admin renders full-width, so product behavior is unchanged.

Related product discussion/links

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

No.

Testing instructions

  • Run the Premium Analytics Storybook (storybook:dev, port 50240).
  • Open Widgets → SubscribersList → Widget Dashboard With Widget (any widget with a settings attribute).
  • With the sidebar + addon panel open (canvas < 1644px), hover the widget → click the ⚙ gear.
  • The settings drawer should appear on-screen with its field + Cancel/Save (off-screen before this fix).
Screen.Recording.2026-06-30.at.3.44.58.PM.mov

@github-actions

github-actions Bot commented Jun 30, 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!

@github-actions github-actions Bot added the [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. label Jun 30, 2026
@chihsuan chihsuan self-assigned this Jun 30, 2026
@chihsuan chihsuan added [Status] Needs Review This PR is ready for review. and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. labels Jun 30, 2026
@jp-launch-control

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

@github-actions github-actions Bot added [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. and removed [Status] Needs Review This PR is ready for review. labels Jun 30, 2026
@chihsuan chihsuan added [Status] Needs Review This PR is ready for review. and removed [Status] Needs Author Reply We need more details from you. This label will be auto-added until the PR meets all requirements. labels Jun 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant