Closed bjackson27 closed 4 years ago
Related: #447
Potentially this will already fix it.
Moving this to IB as it doesn't have an estimate
Let's check if this is still relevant after the latest changes to the date range selector. I prioritized this for the upcoming release since we should fix it if still a problem, but it could be that it already got fixed by now - in that case this should be closed.
This does still happen with the new datepicker, at least on legacy pages that are using withData
:
Just posting here to document what I'm finding, as this wasn't very intuitive to me. It looks like this setState
call:
Isn't properly "reset" when the date range changes, meaning the empty "Last 7 Days" request sets a zeroData
state in the component, which isn't reset when switching back to "Last 28 Days". Resetting that when the date range changes should fix things, just need to figure out where to do that appropriately here.
This one was much tougher to track down than implement, so PR is ready and the IB is set to review. Turns out: it was still happening! 😄
IB ✅ but the fix needs tweaking - will follow-up in code review.
Tested
Installed latest SK release candidate, activated and setup.
Activated Analytics with on a site with not enough data:
Dashboard:
Adjusted the duration of the data for an existing site:
Passed QA ✅
Noticed this on my site. I don't have any data from the last 7 days so when I switch to the last 7 days it rightly shows and error. When I switch back to 14, 28 or 90 days the error still displays.
Steps to recreate: 1) View dashboard (or module page) as normal 2) Switch to 7 day view - receive gathering stats message 3) Switch to 14, 28 or 90 day view - receive gathering stats message above the graph
Currently I get:
I expect to get:
Currently I get:
I expect
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
Implementation Brief
zeroData
in state any time new data is loaded.Changelog entry
QA Brief
sessionStorage
data to test it, ping me and I can send you some privately. The data I have been testing with needs to be anonymised so I don't want to post it here 😄