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

rapid navigation across as of dates can result in misaligned data #19

Open
elray1 opened this issue Dec 6, 2022 · 2 comments
Open

rapid navigation across as of dates can result in misaligned data #19

elray1 opened this issue Dec 6, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@elray1
Copy link

elray1 commented Dec 6, 2022

if I load https://viz.covid19forecasthub.org/ and then rapidly navigate backwards in time, I can sometimes get to a place where the forecasts look "weird" (screenshot attached).

image

My best guess about why is that multiple data fetch requests were issued and then resolved out of order. For instance, in this plot I think the displayed forecasts are from an earlier as of date than the displayed "as of truth data", and that's resulting in the graphic glitches. It seems like we might want to implement a check around here that verifies that the data fetched in the Promise that is now resolving match the current settings in the app state before updating the plot. That is, we only update the aspects of the plot based on this data fetch if the app state didn't change between the time the data fetch was issued and the time it resolved.

@elray1 elray1 added the bug Something isn't working label Jan 9, 2023
@matthewcornell
Copy link
Member

@elray1 Any tips for recreating this consistently? I haven't had much luck. Is there a particular pattern of <- and -> arrows? Is it more likely to happen when moving left into non-cached states? Thanks.

@elray1
Copy link
Author

elray1 commented May 23, 2023

I am still getting this kind of thing occasionally if I just hold down the left arrow key; no specific guidance.

Separately, but I think essentially due to the same fundamental issue about queries not necessarily being executed and returning results in a reliable order, I got to the following plot where the current truth line is for a different location than the forecasts and the "as of truth". To get here, I gave the "Unit" drop-down menu focus and then used the left/right arrow keys to simultaneously navigate across locations and time points.
image

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

No branches or pull requests

2 participants