-
Notifications
You must be signed in to change notification settings - Fork 26
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
Improve upload UI #5081
Improve upload UI #5081
Conversation
While working on this issue I came across the following question(s):
Why isn't the case that the dataset needs a conversion included in the onboarding case? Additionally, why do we have the webknossos/frontend/javascripts/admin/dataset/dataset_add_view.js Lines 56 to 70 in a73fde3
webknossos/frontend/javascripts/admin/dataset/dataset_upload_view.js Lines 160 to 167 in a73fde3
|
@philippotto Could you please check out the new "reordered" UI? |
Awesome stuff! Glad you got the lightweight wkw-detection within the zip to work 👍 The changes look very good to me overall, too. I only have some slight remarks:
|
This is kinda tricky as our antd does not allow to render custom upload list items and only to set an image thumbnail url. Thus I copied the folder svg from antd into the
|
@philippotto Could you please check out my questions above (first post in this PR)? 🛩️ |
The current code only checks for broken zip files and not for unallowed file types in the zip-folder. |
Sorry, I wasn't really clear: I meant that the file type of the dropped file should be checked (not the content of the archive). For example, dropping a Regarding the actual archives content, it should be enough to simply watch out for wkw files. If there aren't any, we know that the cuber should be used (and that will decide which types are supported). |
In my local setup, I just noticed that in the initial onboarding no datastore is available and therefore a dataset cannot be uploaded.
|
Great stuff! Looks quite good to me, but I have some design suggestions which I summarized in this screenshot: Mainly, I changed the flexbox to column and adapted the font size, text and margins. Please also remove the empty footer (visible because it has a border). Also: shouldn't it be I achieved the screenshot by fiddling around with the HTML. The final HTML looked like this (should be easy to integrate into react).
|
Co-authored-by: Philipp Otto <[email protected]> Co-authored-by: Florian M <[email protected]>
…os into improve-upload-ui
I just applied the feedback 🚀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! This feels really great 💯 🥇
I have one final suggestion regarding the "Allowed Teams" field, however, I'm not 100% sure about it. I'll create a thread in slack and ping you.
…os into improve-upload-ui
Co-authored-by: Philipp Otto <[email protected]>
@philippotto I just implemented your suggestion: The default team of the organization the user is in will now be initially selected in the upload view. Could you please also check this change? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome 🕺 🕺 🕺
@philippotto I just did some final testing and found a bug introduced by the auto-selection of the user's team on a demo instance. Could you please give this a final check together with norman's changes? I do not want to have missed any cases that might crash the upload UI, as it is critical for new users. That would be very helpful. |
… before the next screen is shown
Good that you found this!
I just gave it a final check and everything worked fine :) If this is deployed on wk.org, we do an additional check just to be sure. While testing I noticed that there is some delay between the upload and the "whats-next-screen". The delay is caused because the back-end needs a second to do the "import" etc. I think, this is fine right now, but the UI said that the upload is at 100%, which could make the user think that nothing will happen now. I just pushed a small workaround for this by clamping the progress value to 99.9%. I think, that's fair for now. Do you agree? If so, feel free to merge & deploy :) |
Thanks 🙏 😄
Yeah that makes sense. I think your solution is fine. Alternatively, we could change the text from "Uploading Dataset" to "Successfully Uploaded Dataset " and then add a second Progress bar below with the text "Importing dataset . This would make clear, that the uploading worked and the backend now works on the importing stuff. I do not have a strong tendency to one of the solutions and I do not know how good my suggestions looks and whether it might be more confusion that explaining what going on to the user. What do you think @philippotto? |
Yes, I agree that this would be a bit better and more precise. I think I saw a hardcoded sleep of 3 seconds in the code. We could use that to update the new progressbar so that it goes from 0 to 100 in these 3 seconds. If you are up for it, feel free to implement this. However, if you don't have the time right now (i.e., this week), I'd suggest to merge the PR without it so that this can land in this week :) |
I’d encourage you to postpone small cosmetic changes like this one to a follow-up PR. |
This PR reworks the Upload UI and additionally adds the check, whether a dataset needs to be converted to the front end. Therefore the user only has to set the dataset scale if necessary.
URL of deployed dev instance (used for testing):
Steps to test (local):
Open the dataset upload ui via the dashboard.
Upload a new dataset in zip format.
Only if multiple datastores are available, the user can select a datastore to which the dataset should be uploaded.
Additionally, the user should only be required to enter the dataset scale, if the format of the dataset is not wkw.
Upon starting the upload a modal should open up, displaying the uploading process or errors.
After the upload finished, the content of the modal should change and suggest the user to either view the dataset, go back to the dashboard or go to the settings of the uploaded dataset. Each of those links should work as expected.
Additionally, after the upload finished successfully the modal should now be closable by using the ok button that was previously disabled.
Another to test is whether the checking of the zip file content for a wkw file takes too much memory. In my test cases, this never was a problem.
Issues:
[ ] Updated (unreleased) migration guide if applicable[ ] Updated documentation if applicable[ ] Adapted wk-connect if datastore API changes[ ] Needs datastore update after deployment