WP Dashboard: Update the popular pages widget to correctly display the gathering data state.
See original GitHub issueFeature Description
Following on from the work in #4711, on the WP Dashboard, when the Analytics widgets Unique Visitors and Avg. Time on Page are showing the gathering data… text, the blue Analytics Gathering Data CTA should not be displayed.
See related comments on the PR for #4711 for more information.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- These changes are only relevant when the
zeroDataStatesfeature flag is enabled. - The
WPDashboardPopularPagescomponent should display the gathering data state correctly when theisGatheringDatareturns true for the Analytics module. - In order to reproduce this scenario, follow the QA Brief in #4711.
Implementation Brief
- In the
assets/js/components/wp-dashboard/WPDashboardPopularPages.jsfile:- Get the
zeroDataStatesfeature flag. - Update the condition that returns the
WidgetReportZeroelement to do so only when thezeroDataStatesfeature flag is not enabled. https://github.com/google/site-kit-wp/blob/372a83b9ac570045311cefa1397c0b6f4230c454/assets/js/components/wp-dashboard/WPDashboardPopularPages.js#L114-L116 - Add the
gatheringData={ isGatheringData }property to theReportTableelement.
- Get the
Test Coverage
- N/A
QA Brief
- Using the tester plugin, force the “gathering data” state.
- Activate the “zeroDataStates” feature flag
- Go to the main WordPress dashboard
- Verify that the “Analytics” widgets show the “gathering data…” text instead of the blue CTA.
- Disable the “zeroDataStates” feature flag
- Verify that the blue CTA is displayed.
Changelog entry
- Update gathering data UI in WordPress Dashboard widget.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (2 by maintainers)
Top Results From Across the Web
Dashboard Screen – WordPress.org Forums
This widget shows the upcoming scheduled posts, recently published posts, and the most recent comments on your posts–and allows you to moderate them....
Read more >Jetpack Stats and Insights – WordPress.com Support
Jetpack Stats and Insights includes a bunch of nifty graphs, charts, and data to show you how many visits your site gets, which...
Read more >How to Add a Stats Dashboard On Your WordPress Site
On your main WordPress dashboard screen, MonsterInsights adds a widget that shows stats about your site's performance. You can quickly view ...
Read more >How to Set Up WordPress Visitor Tracking - Beginner's Guide
The MonsterInsights dashboard widget allows you to have a quick glance at your website reports. To view your full reports, visit Insights » ......
Read more >WordPress Analytics Using The WP Statistics Plugin - YouTube
To install this plugin please log into your WordPress dashboard, ... displayed since it will be doing WordPress data gathering constantly.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

ACs here look great, so moving this to IB 👍🏻
Approval ✅
Aside: I opened #4990 to complete some missing Storybook coverage around this area.