Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stats: Fix loading state on summarized views. #11602

Merged
merged 1 commit into from
Feb 27, 2017
Merged

Conversation

timmyc
Copy link
Contributor

@timmyc timmyc commented Feb 25, 2017

Currently when viewing a stats summary page that supports Summarized views, navigating between the different summary periods does not properly toggle the loading indicator. This results in a message saying no data was found be displayed while the API request completes.

The fix here is to set loaded to false when the query prop changes on the component.

Thanks to @supernovia for the bug report

Before
no-data

After
no-data-after

To Test

  • Open a site stats page
  • Click on Posts & Pages to access the summary view
  • Select the All Time view, note the loading indicator is shown while the data is being requested

@timmyc timmyc added [Feature] Stats Everything related to our analytics product at /stats/ [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Feb 25, 2017
@matticbot
Copy link
Contributor

@matticbot matticbot added the [Size] S Small sized issue label Feb 25, 2017
Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@timmyc timmyc merged commit 97ba93b into master Feb 27, 2017
@matticbot matticbot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Feb 27, 2017
@timmyc timmyc deleted the fix/stats/summary-loading branch February 27, 2017 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Stats Everything related to our analytics product at /stats/ [Size] S Small sized issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants