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

When you don't have enough data, and switch to 7 days and then back to larger data it shows an error that the data isn't available #184

Closed
bjackson27 opened this issue Jul 10, 2019 · 8 comments
Labels
P1 Medium priority Type: Bug Something isn't working
Milestone

Comments

@bjackson27
Copy link

bjackson27 commented Jul 10, 2019

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:
5e154a77a53dc159dd71b39ea1991787
I expect to get:
5e212abcb4c5fb8e7c92dff5cbfcc85a

Currently I get:
5e239c58c61eb62b904436db7d275509

I expect
5e2c4a6691ce5336456560b70247c020


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • "Gathering data" message should only be displayed for views where there's no data returned from the API.

Implementation Brief

Changelog entry

  • Fix bug where state of not having sufficient data for a Site Kit widget would sometimes incorrectly persist when switching the date range.

QA Brief

@bjackson27 bjackson27 added the Type: Bug Something isn't working label Jul 10, 2019
@marrrmarrr marrrmarrr added the P1 Medium priority label Jul 16, 2019
@marrrmarrr marrrmarrr removed their assignment Jul 16, 2019
@lucymtc lucymtc assigned lucymtc and unassigned lucymtc Jul 16, 2019
@felixarntz
Copy link
Member

Related: #447

Potentially this will already fix it.

@ThierryA
Copy link
Collaborator

Moving this to IB as it doesn't have an estimate

@eclarke1 eclarke1 modified the milestone: Sprint 24 May 19, 2020
@felixarntz
Copy link
Member

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.

@lilybonney lilybonney added this to the Sprint 29 milestone Aug 2, 2020
@tofumatt tofumatt self-assigned this Aug 4, 2020
@tofumatt
Copy link
Collaborator

tofumatt commented Aug 4, 2020

This does still happen with the new datepicker, at least on legacy pages that are using withData:

2020-08-04 20 24 03

@tofumatt
Copy link
Collaborator

tofumatt commented Aug 4, 2020

Just posting here to document what I'm finding, as this wasn't very intuitive to me. It looks like this setState call:

} else if ( handleDataSuccess ) {

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.

@tofumatt
Copy link
Collaborator

tofumatt commented Aug 4, 2020

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! 😄

@aaemnnosttv
Copy link
Collaborator

IB ✅ but the fix needs tweaking - will follow-up in code review.

@aaemnnosttv aaemnnosttv assigned tofumatt and unassigned felixarntz and aaemnnosttv Aug 5, 2020
@tofumatt tofumatt assigned aaemnnosttv and unassigned tofumatt Aug 5, 2020
@aaemnnosttv aaemnnosttv removed their assignment Aug 6, 2020
@eclarke1 eclarke1 removed the Next Up label Aug 10, 2020
@cole10up
Copy link

Tested

Installed latest SK release candidate, activated and setup.

Activated Analytics with on a site with not enough data:

image
image

Dashboard:
image
image
image

image

Adjusted the duration of the data for an existing site:

image
image
image
image

Passed QA ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 Medium priority Type: Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants