Skip to content

Premium Analytics: expose the Locations widget kind through the SDK - #53534

Merged
retrofox merged 3 commits into
trunkfrom
update/pa-sdk-locations-kind
Oct 13, 2026
Merged

retrofox merged 3 commits into
trunkfrom
update/pa-sdk-locations-kind

Conversation

@retrofox

Copy link
Copy Markdown
Contributor

Part of WOOA7S-2282 and WOOA7S-2263. Stacked on #53533.

Proposed changes

The SDK contract declares Locations with precise props, and the facade exports it from the widgets toolkit:

  • LocationRowInput: id (the ISO country code on the world map, the region's name inside a country), label, value and previousValue.
  • LocationsProps: rows, status, error, empty, format, country (omit for the world map) and maxRows. The kind derives the map, the list with flags, the shares, the deltas and the states.

conformance.ts probes it: a facade that stops accepting the declared props fails the typecheck (checked with a value: string mutant). WIDGET_API_VERSION moves to 1.11.0, after the 1.10.0 Columns took, and the contract notes say what it adds.

The move of Visitors by location into jetpack-woocommerce-stats follows.

Related product discussion/links

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

No.

Testing instructions

cd projects/packages/premium-analytics && pnpm run typecheck

The contract typecheck covers the facade and the probe. On a built site nothing changes: the WooCommerce Stats package keeps registering its widgets, its contract floor being below 1.11.0, and GET /wp-json/wpcom/v2/widget-modules serves the same records.

@retrofox retrofox added Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] In Progress Docs [Package] Premium Analytics [JS Package] Premium Analytics Sdk labels Oct 13, 2026
@retrofox retrofox self-assigned this Oct 13, 2026
@retrofox
retrofox added this pull request to stack #53535 October 13, 2026 10:43
@github-actions

github-actions Bot commented Oct 13, 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), and enable the update/pa-sdk-locations-kind branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack update/pa-sdk-locations-kind

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

@retrofox retrofox added [Status] Needs Review This PR is ready for review. and removed [Status] In Progress labels Oct 13, 2026
@retrofox
retrofox marked this pull request as ready for review October 13, 2026 10:44
@retrofox
retrofox requested a review from a team as a code owner October 13, 2026 10:44
@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 Oct 13, 2026 •

Copy link
Copy Markdown

Code Coverage Summary

Coverage changed in 1 file.

File Coverage Δ% Δ Uncovered
projects/packages/premium-analytics/packages/sdk/src/conformance.ts 0/7 (0.00%) 0.00% 1 ❤️‍🩹

Full summary · PHP report · JS report

@retrofox
retrofox force-pushed the update/pa-sdk-locations-kind branch from d98119c to 3ce22c0 Compare October 13, 2026 11:21
@retrofox
retrofox force-pushed the update/pa-sdk-locations-kind branch from 85cb975 to 84eb53b Compare October 13, 2026 15:24
Base automatically changed from update/pa-locations-widget-kind to trunk October 13, 2026 15:51
@retrofox
retrofox force-pushed the update/pa-sdk-locations-kind branch from 84eb53b to 0cff370 Compare October 13, 2026 15:51
@retrofox
retrofox merged commit 7c49b47 into trunk Oct 13, 2026
91 checks passed
@retrofox
retrofox deleted the update/pa-sdk-locations-kind branch October 13, 2026 16:43
@github-actions github-actions Bot added [Status] UI Changes Add this to PRs that change the UI so documentation can be updated. and removed [Status] Needs Review This PR is ready for review. labels Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Docs Enhancement Changes to an existing feature — removing, adding, or changing parts of it [JS Package] Premium Analytics Sdk [Package] Premium Analytics RNA [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