Skip to content

Premium Analytics: update widget packages and promote in-body controls to widget attributes - #50293

Merged
chihsuan merged 1 commit into
trunkfrom
update/premium-analytics-widget-packages-and-attributes
Jul 8, 2026
Merged

Premium Analytics: update widget packages and promote in-body controls to widget attributes#50293
chihsuan merged 1 commit into
trunkfrom
update/premium-analytics-widget-packages-and-attributes

Conversation

@chihsuan

@chihsuan chihsuan commented Jul 8, 2026

Copy link
Copy Markdown
Member

Closes WOOA7S-1667

Re-land of #50271, which was reverted in #50292.

Proposed changes

Why the original was reverted: the pnpm-lock.yaml in #50271 didn't just add the new premium-analytics pins — the install also re-resolved existing shared snapshots in place (@ariakit/react 0.4.29 → 0.4.32 and @base-ui/react 1.5.0 → 1.6.0 inside the @wordpress/dataviews@17.1.0 and @wordpress/ui@0.17.0 snapshot bodies). Those snapshots are shared by many other projects (forms, jetpack-mu-wpcom, my-jetpack, the Jetpack plugin, videopress, …), so their installs and built mirrors changed too, and the merge unexpectedly required a wpcom deploy.

How this re-land differs: the code diff is identical to #50271 (it reverts the revert). Only pnpm-lock.yaml was regenerated, starting from trunk's lockfile, so that it stays scoped to this package:

  • The only importer touched is projects/packages/premium-analytics.
  • All removed entries are packages only premium-analytics referenced (@wordpress/widget-dashboard@0.2.0, @wordpress/widget-primitives@0.2.0, @wordpress/grid@0.2.0, @wordpress/build@0.18.0).
  • All added entries are the new -next.v.202607070741.0 snapshot tree (including its own @wordpress/dataviews@17.1.2-next / @wordpress/ui@0.18.1-next, which is where the newer @base-ui/react@1.6.0 now lives).
  • Existing shared snapshots — including @wordpress/dataviews@17.1.0 and @wordpress/ui@0.17.0 and their @ariakit/react@0.4.29 / @base-ui/react@1.5.0 resolutions — are byte-identical to trunk, so no other project's install or built output changes.

What the change itself does (unchanged from #50271, see its description for full detail):

  • Updates premium-analytics to the @wordpress/widget-primitives / @wordpress/widget-dashboard 0.3.1-next and @wordpress/build 0.19.1-next development snapshots.
  • Replaces in-body selectors with high-relevance widget attributes rendered by the widget host: locations view mode (geoGranularity), top platforms mode (platformDimension), UTM Insights param (utmDimension), Emails metric (metric), and the Group by selectors in the Subscribers and Traffic charts (granularity).
  • Commerce widgets declare presentation: framed; widget attribute shapes are typed and exported once from widget.ts; render components compose host fields instead of re-declaring them.
  • Bundled dep bumps scoped to this package (admin-ui 2.5.0, dataviews 17.1.0, icons ^15, theme/ui 0.17.0) plus the design-token migration to the renamed @wordpress/theme 0.17 groups.

Related product discussion/links

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

No.

Testing instructions

  1. Verify the lockfile is scoped to premium-analytics — the only importer in the diff is projects/packages/premium-analytics, and no existing shared snapshot lines are modified:
git diff trunk...HEAD -- pnpm-lock.yaml | grep -E '^-' | grep -v '^---'

All removed lines belong to the old premium-analytics-only packages listed above; shared entries like @ariakit/react@0.4.29 and @base-ui/react@1.5.0 are untouched.

  1. Install and build (CI also validates the lockfile with a frozen install):
nvm use
pnpm install --frozen-lockfile
jetpack build --deps packages/premium-analytics
  1. Open the Premium Analytics dashboard in wp-admin and confirm it loads without console or PHP errors.

  2. Locations, Top platforms, UTM Insights, Emails, Subscribers chart, and Traffic chart: the old in-body selectors are gone; the equivalent controls appear as widget attributes on the widget host, and switching them updates the widget data (see the demo video on Premium Analytics: update widget packages and promote in-body controls to widget attributes #50271).

  3. Date range and comparison state still reach the widgets (Subscribers list reflects the picker).

@chihsuan chihsuan added [Status] In Progress Docs [Status] UI Changes Add this to PRs that change the UI so documentation can be updated. [Package] Premium Analytics labels Jul 8, 2026
@chihsuan chihsuan self-assigned this Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack or WordPress.com Site Helper), and enable the update/premium-analytics-widget-packages-and-attributes branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack update/premium-analytics-widget-packages-and-attributes
bin/jetpack-downloader test jetpack-mu-wpcom-plugin update/premium-analytics-widget-packages-and-attributes

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions

github-actions Bot commented Jul 8, 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!

@chihsuan
chihsuan marked this pull request as ready for review July 8, 2026 03:55
@chihsuan
chihsuan requested review from a team as code owners July 8, 2026 03:55
@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 · JS report

@chihsuan
chihsuan merged commit 12a2e3f into trunk Jul 8, 2026
100 of 101 checks passed
@chihsuan
chihsuan deleted the update/premium-analytics-widget-packages-and-attributes branch July 8, 2026 04:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Docs [Package] Premium Analytics [Status] UI Changes Add this to PRs that change the UI so documentation can be updated.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant