NCEAS / metacatui

MetacatUI: A client-side web interface for DataONE data repositories
https://nceas.github.io/metacatui
Apache License 2.0
42 stars 27 forks source link

Disable Submit button until all files are done uploading #662

Closed laurenwalker closed 3 years ago

laurenwalker commented 6 years ago

Right now you can click submit and have the package save to the server while files are still uploading. This is not ideal and can cause issues. We should disable the button when any object in the package has a "p" uploadStatus for in progress.

laijasmine commented 3 years ago

For curated repositories like the ADC do we want to redirect users contact support if they are uploading large files (or if they have a slower internet connection) for alternative methods. Submitters might get frustrated if they can't submit but didn't realize that larger files will take longer

csjx commented 3 years ago

I expect that we just need more feedback to the user @laijasmine, and I would assume they are aware of their upload speeds. I'd rather see them upload via the UI than out-of-band when possible. If we disable the Submit button during file uploads, I'm wondering if we could give more feedback by providing an overall upload progress bar (stating e.g. 3 of 20 files uploaded) next to the disabled Submit button, and a tooltip on the button saying something like Please wait while files finish uploading or the like.

laurenwalker commented 3 years ago

I like those ideas, Chris

laijasmine commented 3 years ago

Is it possible to prioritize this issue? We've been running into this problem more frequently at the Arctic Data Center now and it sometimes requires a significant time to fix if it is a more complex dataset.

laurenwalker commented 3 years ago

@laijasmine Yes, I've bumped it up to the Current pipeline. Thanks

laijasmine commented 3 years ago

Thank you Lauren!

laurenwalker commented 3 years ago

This has been resolved in the above referenced commit. THe Save button will now be disabled and show a message that "Waiting for X files to upload..." until files are both loaded into memory in the browser and also uploaded to the server. See screen record gif:

screencast

amoeba commented 3 years ago

Looks great @laurenwalker. One minor thing: I noticed from the above GIF that, when it gets to one file remaining, the text says "1 files" where I think "1 file" might be better.

laurenwalker commented 3 years ago

Good point, I just pushed a change for that