Skip to content

Premium Analytics: port the Sales by coupon widget#49718

Draft
nerrad wants to merge 3 commits into
trunkfrom
add/wooa7s-1477-port-woo-widget-sales-by-coupon
Draft

Premium Analytics: port the Sales by coupon widget#49718
nerrad wants to merge 3 commits into
trunkfrom
add/wooa7s-1477-port-woo-widget-sales-by-coupon

Conversation

@nerrad

@nerrad nerrad commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Fixes: WOOA7S-1477

Proposed changes

  • Ports the Sales by coupon widget into the Premium Analytics customizable dashboard.
  • Registers the jpa/sales-by-coupon widget and renders the shared sales by coupon widget inside WidgetRoot using dashboard-level report params.
  • Adds a Storybook dashboard story for the widget.
  • Retargets the PR to trunk; the shared dashboard/package scaffolding is already present there, so this diff is limited to the Sales by coupon widget port.

Storybook screenshot

Captured from the local Storybook widget dashboard story.

Sales by coupon Storybook screenshot

Related product discussion/links

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

No.

Testing instructions

  • pnpm install --frozen-lockfile
  • pnpm --filter @automattic/charts build
  • pnpm --filter @automattic/number-formatters build
  • pnpm --filter @automattic/jetpack-wp-build-polyfills build
  • pnpm exec eslint projects/packages/premium-analytics/widgets/sales-by-coupon/render.tsx projects/packages/premium-analytics/widgets/sales-by-coupon/stories/sales-by-coupon-widget.stories.tsx projects/packages/premium-analytics/widgets/sales-by-coupon/widget.ts projects/packages/premium-analytics/widgets/stories/widget-dashboard-with-widget.tsx --max-warnings=0
  • pnpm --filter @automattic/jetpack-premium-analytics typecheck
  • pnpm --filter @automattic/jetpack-premium-analytics build
  • pnpm --dir projects/js-packages/storybook run storybook:build
  • Verified the Storybook story packages-premium-analytics-widgets-salesbycoupon--widget-dashboard-with-widget in a browser smoke test: title rendered, chart SVG rendered, coupon labels rendered, and no NaN/undefined output.

@github-actions

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 Jun 17, 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

@louwie17 louwie17 force-pushed the update/pa-introduce-customize-dashboard branch from 7ff7f71 to 22e10a7 Compare June 19, 2026 12:21
@nerrad nerrad force-pushed the add/wooa7s-1477-port-woo-widget-sales-by-coupon branch from 5921383 to 2b6d367 Compare June 23, 2026 16:05
@nerrad nerrad changed the base branch from update/pa-introduce-customize-dashboard to trunk June 23, 2026 16:06
@nerrad nerrad force-pushed the add/wooa7s-1477-port-woo-widget-sales-by-coupon branch from a23f6c9 to bc5d7fc Compare June 25, 2026 01:59
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.

1 participant