Add a dedicated screen for uploading media
[!Note] This PR is built on top of https://github.com/wordpress-mobile/WordPress-iOS/pull/24655.
Description
This PR adds a new screen, "Uploading Media", which is presented after the user selects photos/documents to upload. This modal is not dismissible until all uploads are completed.
Users can stop and restart the uploads on this screen. However, this may not work correctly at this time until https://github.com/Automattic/wordpress-rs/pull/794 (which resolves an issue with uploading media) is merged.
https://github.com/user-attachments/assets/4bbe6f45-6d2e-4555-a669-e4cb9796ae84
Testing instructions
Quality Gate passed
Issues
4 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
| App Name | Jetpack | |
| Configuration | Release-Alpha | |
| Build Number | 28127 | |
| Version | PR #24656 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | 573512425ec2ace93ee7a74e541938f957668a99 | |
| Installation URL | 7jrshvf96ej5g |
📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
| App Name | WordPress | |
| Configuration | Release-Alpha | |
| Build Number | 28127 | |
| Version | PR #24656 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | 573512425ec2ace93ee7a74e541938f957668a99 | |
| Installation URL | 098pjsei7t8c0 |
This modal is not dismissible until all uploads are completed.
With the current UI/UX, the upload progress is displayed directly on the "Media" screen, which seems quite optimal: you select media for upload and are free to check out other screens, such as Reader or Stats, while it's uploading. You don't want to be stuck on a blocking modal. What is the reasoning behind making it blocking?
It can be useful to show the overall upload status somewhere below like so:
Btw, there is an existing PostMediaUploadsViewController that could be generalized, or at least some of its components could. It looks like this and it automatically observes Media items and let's you cancel/retry the uploads:
What is the reasoning behind making it blocking?
Jeremy talked about this in the meetup. The main idea is no background uploads. My understanding is that a blocking UI gives the impression that users have to wait on this screen; there might be a lower chance that they'll switch to other apps. So, the upload will be more reliable.
there is an existing PostMediaUploadsViewController that could be generalized
I didn't know that. I can have a look.
The main idea is no background uploads.
My recollection is that it was mentioned in the context of "syncing" posts, which we have no API for, and similar topics. Uploading media is a pretty clear scenario where you actually do want background uploads. Ideally, it would be using background URLSession so that the uploads continue even if the app is terminated.
there might be a lower chance that they'll switch to other apps. So, the upload will be more reliable.
I think it's just as likely they'll be annoyed by it and will background the app to wait until the upload finishes, which is the opposite of what you want and will not help, unless they app can handle background uploads.
the upload will be more reliable.
Are they currently unreliable? In the worst-case scenario, the app gets terminated during the upload, and it just restarts when you reopen it. Not sure how well it's implemented atm, but it's a pretty basic scenario to cover.