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

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

Open
melange396 opened this issue Feb 5, 2024 · 1 comment
Open

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

melange396 opened this issue Feb 5, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@melange396
Copy link
Contributor

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:

{:else if sensor.timeFrame.max < date.value}
{#await checkSensorData(sensor, date, region) then hasData}
{#if !hasData}
<div data-uk-alert class="uk-alert-warning">
The indicator "{sensor.name}" is not available for {formatDateYearDayOfWeekAbbr(date.value)}, yet. The latest
known data is available on
<a href="?date={formatAPITime(sensor.timeFrame.max)}" on:click={switchDate}
>{formatDateYearDayOfWeekAbbr(sensor.timeFrame.max)}</a
>.
</div>
{/if}
{/await}
{/if}

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

@melange396
Copy link
Contributor Author

I closed #1200 as a duplicate of this, but it has good descriptions/detail on the problem and should be kept in mind.

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