Skip to content

Commit c467cc4

Browse files
chihsuanmatticbot
authored andcommitted
WOOA7S-1523: Port Stats Plan usage widget (#50301)
* Premium Analytics: add Plan usage widget ported from Calypso Stats * fix: format Plan usage figures via formatMetricValue; tidy over-limit tests * feat: show refetch overlay on plan usage widget * fix: type plan usage views_limit and over_limit_months as nullable * feat: restyle plan usage as Stats-style meter with upgrade note and header help * refactor: render plan usage states through WidgetState * test: add forced loading/error/unavailable stories for plan usage * fix: correct plan usage billable-views label, zero-limit guard, and dead upgrade link * fix: port upstream billable-views help copy; simplify plan usage story widgetType * feat: suppress plan-usage over-limit warning on VIP sites * test: add over-limit and VIP-suppression stories for plan usage * fix: use upstream "views" wording in plan-usage meter label Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/29238239309 Upstream-Ref: Automattic/jetpack@e865968
1 parent a59b632 commit c467cc4

7 files changed

Lines changed: 20 additions & 2 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ This is an alpha version! The changes listed here are not final.
2121
- Add CSV export for the over-time analytics reports: gross sales, net sales, average order value, average items per order, refunds, conversion rate, visitors, taxes over time, coupon use, and orders fulfilled.
2222
- Add file-downloads widget porting the Jetpack Stats File downloads module into Premium Analytics.
2323
- Add jpa/devices (screen-size semi-circle) and jpa/top-platforms (browser/OS leaderboard) widgets.
24+
- Add Plan usage widget porting the Stats plan usage section into Premium Analytics.
2425
- Add site-sync package (useSyncStatus hook) and configure apiFetch auth in init.
2526
- Add the CSV report export pipeline: report registry, proxy data fetcher, comparison-period merge strategies (index- and id-based), and the CSV generator.
2627
- Add the CSV report export REST endpoint with download and email (Action Scheduler) delivery, plus the Orders Over Time report.

‎build/modules/data/index.min.js.map‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?php return array('dependencies' => array('react', 'react-dom', 'react-jsx-runtime', 'wp-compose', 'wp-date', 'wp-element', 'wp-i18n', 'wp-primitives', 'wp-private-apis', 'wp-theme'), 'module_dependencies' => array(array('id' => '@jetpack-premium-analytics/data', 'import' => 'static'), array('id' => '@jetpack-premium-analytics/widgets-toolkit', 'import' => 'static'), array('id' => '@wordpress/a11y', 'import' => 'static')), 'version' => 'dd3c38b9dfde92c00d57');

‎build/widgets/plan-usage/render.min.js‎

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?php return array('dependencies' => array('react-jsx-runtime', 'wp-element', 'wp-i18n', 'wp-primitives'), 'version' => 'a08ea666a2fe7a54069f');

‎build/widgets/plan-usage/widget.min.js‎

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎build/widgets/registry.php‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,19 @@
371371
'keywords' => null,
372372
'textdomain' => null,
373373
),
374+
array(
375+
'name' => 'jpa/plan-usage',
376+
'dir_name' => 'plan-usage',
377+
'title' => 'Plan usage',
378+
'description' => 'How your billable views compare to your plan\'s monthly limit.',
379+
'help' => null,
380+
'has_render' => true,
381+
'has_widget' => true,
382+
'presentation' => 'framed',
383+
'category' => 'stats',
384+
'keywords' => null,
385+
'textdomain' => null,
386+
),
374387
array(
375388
'name' => 'jpa/posting-activity',
376389
'dir_name' => 'posting-activity',

0 commit comments

Comments
 (0)