Skip to content

WOOA7S-1769: Premium Analytics: Remove the plan usage widget - #53361

Open
Nikschavan wants to merge 2 commits into
wooa7s-1769-stats-settings-tab-chipsfrom
wooa7s-1769-remove-plan-usage-widget
Open

Nikschavan wants to merge 2 commits into
wooa7s-1769-stats-settings-tab-chipsfrom
wooa7s-1769-remove-plan-usage-widget

Conversation

@Nikschavan

@Nikschavan Nikschavan commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

Part of WOOA7S-1769

Stacked on #53357, so this PR targets that branch. Please review and merge it after #53357.

Proposed changes

Nothing changes for site owners: the widget was never registered on any site, so a saved layout that still holds a jpa/plan-usage instance behaves as it does today.

Related product discussion/links

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

No.

Testing instructions

Use a site with Jetpack and Premium Analytics from this branch (Jetpack Beta Tester pointed at wooa7s-1769-remove-plan-usage-widget), connected, with Stats on, and log in as an administrator.

  • Go to Stats v2 › Settings. "Your current plan" still shows the views used against the limit, when the cycle restarts and Upgrade.
  • Open Page options › Customize on Traffic and open the widget inserter. There is no plan usage widget, the same as on trunk.

I ran the Premium Analytics JS and PHP suites locally. I did not check this branch in a browser.

@github-actions

github-actions Bot commented Oct 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), and enable the wooa7s-1769-remove-plan-usage-widget branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack wooa7s-1769-remove-plan-usage-widget

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 Oct 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!

@jp-launch-control

jp-launch-control Bot commented Oct 8, 2026 •

Copy link
Copy Markdown

Code Coverage Summary

No summary data is available for parent commit 9986569, so cannot calculate coverage changes. 😴

If that commit is a feature branch rather than a trunk commit, this is expected. Otherwise, this should be updated once coverage for 9986569 is available.

Full summary · PHP report · JS report

@Nikschavan
Nikschavan marked this pull request as ready for review October 8, 2026 15:17
Copilot AI balanced review requested due to automatic review settings October 8, 2026 15:17
@Nikschavan
Nikschavan requested a review from a team as a code owner October 8, 2026 15:17
@Nikschavan
Nikschavan added this pull request to stack #53368 October 8, 2026 15:17
@Nikschavan Nikschavan added [Status] Needs Review This PR is ready for review. and removed [Status] In Progress labels Oct 8, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The unused widget and its references are removed consistently while the Settings card retains the required behavior and coverage.

0 open findings

What changed in this PR

Removes the unused plan-usage widget now that plan usage is owned by the Settings tab introduced in #53357.

Changes:

  • Deletes the widget implementation, metadata, styles, stories, tests, and mocks.
  • Localizes plan-usage helpers beside the Settings card.
  • Removes obsolete registration holds and test assertions.
File Description
widgets/​plan-usage/​widget.ts Removes widget definition.
widgets/​plan-usage/​widget.json Removes widget manifest.
widgets/​plan-usage/​style.module.css Removes widget styling.
widgets/​plan-usage/​stories/​plan-usage-widget.stories.tsx Removes widget stories.
widgets/​plan-usage/​render.tsx Removes widget renderer.
widgets/​plan-usage/​package.json Removes widget package metadata.
widgets/​plan-usage/​__tests__/​plan-usage.test.tsx Removes superseded widget tests.
tests/​php/​Widget_Availability_Test.php Removes plan-usage availability cases.
tests/​php/​Dashboard_Layout_Test.php Removes obsolete layout assertion.
tests/​groups/​widgets-shared-route-mock-part1.test.tsx Removes deleted test import.
src/​widget-type-support.php Removes the widget holdback policy.
src/​default-dashboard-sections.php Updates obsolete layout commentary.
routes/​dashboard/​components/​stats-settings/​use-plan-usage.ts Narrows the local hook result.
routes/​dashboard/​components/​stats-settings/​plan-usage.ts Localizes usage-card helpers.
routes/​dashboard/​components/​stats-settings/​plan-usage-card.tsx Uses colocated helpers and hook.
packages/​widgets-toolkit/​src/​stories/​mocks/​register-report-mocks.ts Removes widget endpoint mocking.
packages/​widgets-toolkit/​src/​stories/​mocks/​data/​plan-usage.ts Removes widget mock fixtures.
packages/​widgets-toolkit/​src/​stories/​mocks/​data/​index.ts Removes mock exports.
packages/​widgets-toolkit/​src/​index.ts Removes public helper exports.
packages/​widgets-toolkit/​src/​hooks/​index.ts Removes hook export.
packages/​widgets-toolkit/​src/​helpers/​index.ts Removes helper exports.
changelog/​wooa7s-1769-remove-plan-usage-widget Records the internal removal.

🧠 Review effort: Balanced


Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.

@Nikschavan
Nikschavan force-pushed the wooa7s-1769-remove-plan-usage-widget branch 2 times, most recently from db912c4 to 71c246c Compare October 9, 2026 06:45
@Nikschavan
Nikschavan force-pushed the wooa7s-1769-remove-plan-usage-widget branch from 71c246c to ed06353 Compare October 9, 2026 17:00
No site showed it, and plan usage now lives on the dashboard's Settings tab, so its helpers move next to the Settings card instead of widening the widgets-toolkit API. The widget's tests move to the card.
Remove the widget picker note from the Traffic layout comment, the unused isFetching from usePlanUsage, and make the changelog entry an internal comment since no site showed the widget.
@Nikschavan
Nikschavan force-pushed the wooa7s-1769-remove-plan-usage-widget branch from ed06353 to 934c138 Compare October 9, 2026 17:03

This branch has not been deployed

No deployments
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.

2 participants