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

Upload wizard: Remove "Please wait" if possible and do the task in background #4704

Closed
nicolas-raoul opened this issue Nov 14, 2021 · 11 comments · Fixed by #5570
Closed

Upload wizard: Remove "Please wait" if possible and do the task in background #4704

nicolas-raoul opened this issue Nov 14, 2021 · 11 comments · Fixed by #5570

Comments

@nicolas-raoul
Copy link
Member

Making the user wait is never great.
Is this wait really indispensible?
Couldn't we perform the same tasks in the background?
Screenshot_20211114-192943_Commons

@misaochan
Copy link
Member

AFAIK this is to check certain things that would impact the ability to upload at all (or the user's choice to upload), e.g. duplicate images and dark images. It may be possible to handle this in the background, but in that case the user would have started typing their caption and desc, only to be told that this image is a duplicate of one that already exists?

@nicolas-raoul
Copy link
Member Author

Thanks for the explanation!
So I guess the wait is unavoidable for the first picture.

How about for the second/third/etc pictures? :-)
Ideally the app would be able to detect darkness/duplicates/etc of picture N while the user is typing the caption of picture N-1?

Actually, I often have 20 pictures of the same thing under various angles, and just use the same caption for all of them. In that context, I would like to be able to press Next/Next/Next/... very quickly after entering a caption only for the first picture and pressing "Copy to subsequent media". So, ideally the darkness/duplicates/etc detections should all be queued and performed as soon as possible, which means that for instance all 20 pictures might have been processed already by the time I finish writing the caption.

@misaochan
Copy link
Member

I agree, that would be the ideal way to handle it. :)

@nicolas-raoul nicolas-raoul changed the title Remove "Please wait" if possible Upload wizard: Remove "Please wait" if possible and do the task in background Apr 17, 2023
@ShashwatKedia
Copy link
Contributor

@nicolas-raoul I would like to work on this :)

@ShashwatKedia
Copy link
Contributor

AFAIK this is to check certain things that would impact the ability to upload at all (or the user's choice to upload), e.g. duplicate images and dark images. It may be possible to handle this in the background, but in that case the user would have started typing their caption and desc, only to be told that this image is a duplicate of one that already exists?

Currently, the checks are performed only when the user clicks on the next button, which means that the user gets to know that image is a duplicate (or too dark or downloaded from internet, etc) only after typing the caption and desc (since the next button is disabled without the caption)

@ShashwatKedia
Copy link
Contributor

I think the ideal flow could be:

  1. As soon as the user uploads an image, first, the checks of only the 1st image are to be performed (meanwhile user is shown some explanation about why the progress bar is shown, instead of just a "please wait..").
  2. If all checks are passed, then the user can enter the caption and desc and click NEXT, while in the background, the checks for the next images are performed. Otherwise, problems with the current image are shown.
  3. On the NEXT button click, we check if the location for the image is added or not, and display a dialog if it is not added.
  4. Then, when the user skips/adds location and the next image's details are shown, we fetch the check results of that image and show to the user if any problems exist.
  5. If no problem exists (or user chooses to continue upload anyways), repeat step 3.

What are your thoughts on this @nicolas-raoul @misaochan

@ShashwatKedia
Copy link
Contributor

@nicolas-raoul I have worked on this issue, and after a lot of changes to the original logic, I could make the app calculate the quality of the images in the background and show any problems as soon as the images are loaded [Screencast]. Could you please confirm that this behaviour is what this issue aims for, so that I could proceed with the minor changes left to be implemented or any changes which might be required :)

@ShashwatKedia
Copy link
Contributor

@nicolas-raoul @misaochan Since there was no response from either of you, I took the liberty to solve this issue in the best possible way I could think of, hope that is not a problem :) Could you please take a look at the above PR?

@ShashwatKedia
Copy link
Contributor

@nicolas-raoul @sivaraam, sorry for pinging again, but there has been no reply/comment on my questions and changes for the past month, so am just confirming if this enhancement is still required :(

@sivaraam
Copy link
Member

Hi @ShashwatKedia ! Apologies about the delay in response. This would indeed be a worthy enhancement for the app. Thank you for taking the time to work on and improve the user experience of this flow! 🙂

I took a look at the screencast and the flow looks neat. It seems you've also handled the duplicate file detection that should be done after the user enters information which is good.

I'll try to take a look at your PR soon.

@misaochan
Copy link
Member

Sorry for the late response, @ShashwatKedia ! I agree that the new flow is better. :)

nicolas-raoul added a commit that referenced this issue Mar 27, 2024
…5570)

* Initial changes to the flow, merged conflicts

* Major changes to flow and logic

* Final major changes to the flow and merged conflicts

* Minor changes to thumbnail flow and merge conflicts

* Fixed ImageProcessingServiceTest

* Removed unnecessary file

* Some code cleanup and fixed UploadRepositoryUnitTest

* Minor javadoc changes and null checks

* Fixed UMDFragmentUnitTest

* Fixed and added new tests in UploadMediaPresenterTest

* Optimised code for no connection cases and minor code cleanup

* Minor bug fix

* Fixed minor bug

* Fixed a failing unit test

* Removed values-yue-hant

* Update UploadRepository.java

---------

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants