UX/UI issue on graphs when in Gathering Data state
See original GitHub issueBug Description
While testing #4697 I noticed an odd UX/UI behaviour. The gathering data… loads slightly early when the loading animation is running for the graphs i.e. All traffic and Search Traffic widgets. See note from Asvin on 4697 re. needing further investigation. Screencast here (this is on entity, but is the same on main dashboard).
The same issue occurs on any graphs on module pages.
Steps to reproduce
- Enable
zeroDataStatesfeature flag on the tester plugin. - Make sure you force data to ‘Gathering’ for search console and analytics.
- Go to the Site Kit dashboard and observe details above.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- The “gathering data” overlay for any Google charts should load at the same time as the charts itself.
- This may need to rely on some sort of “loaded” callback/hook from the charts JS library in order to work. If that does not exist or is otherwise infeasible, we will have to research another approach.
Implementation Brief
Update react-google-charts version
- Update NPM dependency
react-google-chartsto version4.0.0, which provides theonLoadprop.
Fix the chart
- In the
GoogleChartcomponent, pass theonLoadprop to theChartcomponent. - The
onLoadcallback should set some local component state, e.g.isChartLoaded. - Add
isChartLoadedto the condition to renderGatheringDataNotice. https://github.com/google/site-kit-wp/blob/3532d36abc6e50f61b7ce7aa63a0499a319b3a8f/assets/js/components/GoogleChart.js#L263-L264
Fix Storybook
- The new
react-google-chartsversion will break Storybook stories which display charts. - Removing the
scripttag that loadshttps://www.gstatic.com/charts/loader.jsin.storybook/preview-head.htmlappears to fix it. https://github.com/google/site-kit-wp/blob/3532d36abc6e50f61b7ce7aa63a0499a319b3a8f/.storybook/preview-head.html#L15 - Apply this fix, and ensure that all stories are fixed.
- Ensure the VRT suite passes.
Test Coverage
- No new tests needed.
QA Brief
- Follow the Steps to reproduce in the Bug Description.
- Verify the “gathering data” notice appears in sync with the chart loading.
- Check that Storybook stories with charts are still working, e.g.
- Line chart: https://google.github.io/site-kit-wp/storybook/develop/?path=/story/adsense-module-components-module-overview-widget--loaded
- Line chart in DataBlock Sparkline: https://google.github.io/site-kit-wp/storybook/develop/?path=/story/adsense-module-components-dashboard-summary-widget--loaded
- Line & pie charts: https://google.github.io/site-kit-wp/storybook/develop/?path=/story/analytics-module-components-dashboard-all-traffic-widget--loaded
Changelog entry
- Fix gathering data message appearing too early on chart components.
Issue Analytics
- State:
- Created 2 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Minding the Sharp Edges: UX Considerations with Graph Data ...
Above all, a UX designer needs to keep in mind that exposing graph data often comes at a very high price: performance and...
Read more >Data overload is not about human limitations; it's about design ...
The problem is not that there was too much data (or too many choices), but as the quote from Tufte states, a problem...
Read more >Dashboard Design UX Patterns Best Practices - Pencil & Paper
Make no mistake, data dashboard UX is tricky, but hopefully we can help. In this article we'll share the dashboard design UX best...
Read more >Turning Usability Testing Data into Action without Going Insane
UX and usability testing analysis is a critical skill. How do you go about collecting data and analyze results? Here's a way to...
Read more >UX Research Cheat Sheet - Nielsen Norman Group
Listen throughout the research and design cycle to help understand existing problems and to look for new issues. Analyze gathered data and ...
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

@wpdarren @techanvil @aaemnnosttv Thanks for catching and looking into this. Since it’s in the release and we don’t have much time left on the investigation, I’d suggest we cap this on Monday (somewhere around end of day Europe, start of the day US) if not completed by then and make a decision.
I’m a bit wary about the React chart update causing potentially further problems, as it has been a recurring issue for us that these updates haven’t been exactly smooth several times. Unless we’re confident this update isn’t causing other issues, I’d prefer reverting this from the
mainrelease branch and putting it back intodevelopinstead to give it more time for testing. The original problem that this issue solves is not severe enough to “justify” potential breakage.@techanvil would you please open a PR with your suggested workaround?
Worst case, we will revert this issue back and punt it to a future release.