AlexsLemonade / refinebio-frontend

Frontend app for refine.bio
https://www.refine.bio
Other
7 stars 7 forks source link

Show more states besides processing on the one-click experiment download #888

Open arielsvn opened 4 years ago

arielsvn commented 4 years ago

Following up discussion in https://github.com/AlexsLemonade/refinebio-frontend/pull/886#issuecomment-607388072

This is what I was referring to:

2020-04-01 15 24 03

To reproduce you can do:

  1. Download one experiment using the one-click download button
  2. Wait until you receive the email so that the dataset is already processed
  3. Refresh the page

Since the dataset is already processed we don't show anything to the user.

@dvenprasad should we have a "Dataset Processed" badge too? We could have it link to the dataset page where users can download their dataset.

davidsmejia commented 4 years ago

I think the lightest lift would be adding another clause to to the useExperimentDataset to not delete until the dataset is no longer downloadable.

components/DownloadExperiment.js:60

      if (refreshedDataset.is_processed && !refreshedDataset.is_downloadable) {
        setDatasetToLocalStorage({ ...emptyDataset });
      } else if (!dataset.id) {
        setDatasetToLocalStorage({ ...refreshedDataset });
      }

And then we can do whatever with that information in the ProcessingExperiment component to show that it is done and can be downloaded from /datasets/dataset-id-number since it only displays with the entire dataset.