Repository navigation
WOOA7S-1769: Premium Analytics: Remove the plan usage widget - #53361
Nikschavan wants to merge 2 commits into
Conversation
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
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:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
There was a problem hiding this comment.
🟢 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.
db912c4 to
71c246c
Compare
71c246c to
ed06353
Compare
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.
ed06353 to
934c138
Compare
Part of WOOA7S-1769
Stacked on #53357, so this PR targets that branch. Please review and merge it after #53357.
Proposed changes
jpa/plan-usage) was held back on every site, and WOOA7S-1769: Premium Analytics: Add a Settings tab to the dashboard #53357 moves plan usage to the dashboard's Settings tab, so the widget no longer has a place to show. WOOA7S-1769: Premium Analytics: Add a Settings tab to the dashboard #53357 had moved its helpers intowidgets-toolkitand exported them so the widget and the Settings card could share them, which added three public names (getOverLimitMessage,getPlanUpgradeUrl,usePlanUsage) for one real caller.widgets-toolkitAPI is back to what trunk has.Nothing changes for site owners: the widget was never registered on any site, so a saved layout that still holds a
jpa/plan-usageinstance 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.I ran the Premium Analytics JS and PHP suites locally. I did not check this branch in a browser.