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

Notify when no datasets are available for download #1803

Closed
joverlee521 opened this issue Jul 30, 2024 · 0 comments · Fixed by #1804
Closed

Notify when no datasets are available for download #1803

joverlee521 opened this issue Jul 30, 2024 · 0 comments · Fixed by #1804
Labels
bug Something isn't working

Comments

@joverlee521
Copy link
Contributor

joverlee521 commented Jul 30, 2024

Prompted by nextstrain/auspice.us#93

The download Auspice JSON feature depends on fetching the original JSON by parsing the pathname.
It silently skips invalid datasets so users are not notified if the dataset is not available:

for (const datasetName of getDatasetNamesFromUrl(window.location.pathname)) {
if (!datasetName) continue; // e.g. no 2nd tree

Possible solutions

  1. Dispatch error notification that the dataset is not available for download if all dataset names are invalid.
  2. Hide the download Auspice JSON button if we cannot parse the dataset name from the URL pathname.
@joverlee521 joverlee521 added the bug Something isn't working label Jul 30, 2024
joverlee521 added a commit that referenced this issue Jul 31, 2024
An extra guard against empty dataset names during Auspice JSON downloads
Related to <#1803>
joverlee521 added a commit that referenced this issue Jul 31, 2024
An extra guard against empty dataset names during Auspice JSON downloads
Related to <#1803>
joverlee521 added a commit that referenced this issue Aug 6, 2024
An extra guard against empty dataset names during Auspice JSON downloads
Related to <#1803>
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

Successfully merging a pull request may close this issue.

1 participant