cmu-delphi / www-covidcast

Front end for interactive visualizations powering the COVIDcast website.
https://delphi.cmu.edu/covidcast/
MIT License
13 stars 2 forks source link

"latest known data" link does not preserve context #1241

Open melange396 opened 8 months ago

melange396 commented 8 months ago

When viewing the COVIDcast Dashboard page for a particular indicator when that indicator does not have "up to date" data, a widget is displayed to inform the user of this fact and to provide an accelerator link to the most recent day with available data. For example, when you view this page for the "COVID Deaths" indicator in Alabama with a date far in the future (here the date used is in 2099, which simulates the experience of looking up a lagged signal at the current time), you see a message like The indicator "COVID Deaths" is not available for Wed, Jan 21 2099, yet. The latest known data is available on Sun, Jan 21 2024.. The date at the end of the message is clickable, and it does take you to a view for the referenced date, BUT it loses the "indicator" (aka "sensor") that was being viewed and instead shows a "default" indicator (which corresponds to the indicator at the top of the list, currently "Symptom Searches (Smell and Taste) on Google"), and it loses the region being viewed and defaults to the USA national view.

The relevant code that needs to be fixed appears to be: https://github.com/cmu-delphi/www-covidcast/blob/8255f7a30126d3a37634dff2e8914095e524071c/src/blocks/IndicatorWarning.svelte#L35-L47

This was encountered on a recent version of the Google Chrome web browser.