Skip to content

Premium Analytics: port Stats Clicks widget#50052

Open
dognose24 wants to merge 5 commits into
trunkfrom
add/wooa7s-1494-port-stats-module-clicks
Open

Premium Analytics: port Stats Clicks widget#50052
dognose24 wants to merge 5 commits into
trunkfrom
add/wooa7s-1494-port-stats-module-clicks

Conversation

@dognose24

@dognose24 dognose24 commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Fixes WOOA7S-1494

Proposed changes

  • Add the Premium Analytics Clicks widget as a self-contained registered widget.
  • Render clicked-link stats with the shared leaderboard UI, comparison deltas, loading, empty, and error states.
  • Add Storybook stories, Storybook stats mocks, unit tests, and a changelog entry for the new widget.

Related product discussion/links

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

No. This reads existing Jetpack Stats clicks data through the existing Premium Analytics stats data layer.

Testing instructions

  • Run pnpm --dir projects/packages/premium-analytics test -- --runTestsByPath widgets/clicks/__tests__/clicks.test.tsx --runInBand.
  • Run pnpm --dir projects/packages/premium-analytics typecheck.
  • Open Storybook and visit Packages/Premium Analytics/Widgets/Clicks.
  • Verify the Default, WithComparison, LoadingState, ErrorState, EmptyState, WithMockRows, and WidgetDashboardWithWidget stories render as expected.
  • Run jetpack test js packages/premium-analytics (skips because packages/premium-analytics does not define a test-js script in composer.json).
  • I did not verify the widget in a browser-backed Storybook session locally.

@dognose24 dognose24 added Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Status] In Progress labels Jun 29, 2026
@dognose24 dognose24 self-assigned this Jun 29, 2026
@github-actions

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


Premium Analytics plugin:

No scheduled milestone found for this plugin.

If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack.

@jp-launch-control

jp-launch-control Bot commented Jun 29, 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 dognose24 changed the title Premium Analytics: add Clicks widget Premium Analytics: port Stats Clicks widget Jun 29, 2026
@dognose24 dognose24 marked this pull request as ready for review June 29, 2026 15:39
@dognose24 dognose24 requested review from a team as code owners June 29, 2026 15:39
@dognose24 dognose24 added [Status] Needs Review This PR is ready for review. [Status] UI Changes Add this to PRs that change the UI so documentation can be updated. [Tests] Includes Tests [Plugin] Premium Analytics and removed [Status] In Progress labels Jun 29, 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.

I did not verify the widget in a browser-backed Storybook session locally.

Would you be able to verify? 😅

Two things show up in the rendered widget that are worth fixing first:

  1. The leaderboard isn't sorted (the 3K developer.wordpress.org/reference row renders third.)
  2. The "opens in new tab" arrow is orphaned onto its own line under each label

Also left a few non-blocking notes.

Comment thread projects/packages/premium-analytics/widgets/clicks/style.module.css Outdated
Comment thread projects/packages/premium-analytics/widgets/clicks/render.tsx Outdated
Comment thread projects/packages/premium-analytics/widgets/clicks/render.tsx Outdated
@dognose24 dognose24 force-pushed the add/wooa7s-1494-port-stats-module-clicks branch from b18a36c to 71fdc63 Compare June 30, 2026 05:25
@dognose24 dognose24 force-pushed the add/wooa7s-1494-port-stats-module-clicks branch from 71fdc63 to 845c035 Compare June 30, 2026 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Changes to an existing feature — removing, adding, or changing parts of it [Package] Premium Analytics [Plugin] Premium Analytics [Status] Needs Review This PR is ready for review. [Status] UI Changes Add this to PRs that change the UI so documentation can be updated. [Tests] Includes Tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants