[Stats Refresh] Periods loading view#11634
Conversation
|
Hey @danielebogo . I think we need to show the loading view when the period is changed, and when the date changes (via the date selector). Some of the queries take a bit to run, especially the one for the overview card (aka What do you think? |
|
Bumping this to |
# Conflicts: # WordPress/Classes/ViewRelated/Stats/Insights/SiteStatsInsightsTableViewController.swift
|
Hey @ScoutHarris this is ready for another round! |
|
Hey @danielebogo . This is shaping up nicely! However, I noticed the loading view is removed before the stats are finished loading.
Which seemed strange. Until I discovered
This is much easier to notice for longer periods, like months and years, where the summary query takes longer (to note, without cached data). For those periods, changing the date via the date bar, you should be able to repro it easily enough. |
|
Hey @ScoutHarris ! Thanks for the hint about the missed flag! I fixed it!
I fixed the way we check the cached data and the way the loading view is handled. I separate the logic from the Let me know what you think! |
ScoutHarris
left a comment
There was a problem hiding this comment.
Huzzah!!
I fixed the way we check the cached data and the way the loading view is handled. I separate the logic from the onChange block (which is still there) because the new one is called only when it's required.
Oh this is much better. Thank you!!
![]()
|
Thanks @ScoutHarris ! |
Refs. #10380
This PR adds the loading view in
SiteStatsPeriodTableViewControllerThe behaviour is the same implemented here
Error Handling
I will push another PR for the error handling. This because it requires some change on the Store.
To test:
• From My Sites select a site and open its dashboard
• Select Stats to open the Stats section.
• Select one of the tab period tab Days, Weeks, Months, Years.
• You should see the loading view
• The loading view should disappear as soon the data is loaded
Update release notes:
RELEASE-NOTES.txt.