Skip to content

Conversation

crazytonyli
Copy link
Contributor

Note

This PR is built on top of #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 Automattic/wordpress-rs#794 (which resolves an issue with uploading media) is merged.

Simulator.Screen.Recording.-.iPhone.16.-.2025-07-07.at.22.15.13.mp4

Testing instructions

@crazytonyli crazytonyli added this to the 26.1 milestone Jul 7, 2025
@crazytonyli crazytonyli requested a review from kean July 7, 2025 10:23
Copy link

sonarqubecloud bot commented Jul 7, 2025

@wpmobilebot
Copy link
Contributor

App Icon📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack
ConfigurationRelease-Alpha
Build Number28127
VersionPR #24656
Bundle IDcom.jetpack.alpha
Commit5735124
Installation URL7jrshvf96ej5g
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@wpmobilebot
Copy link
Contributor

App Icon📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress
ConfigurationRelease-Alpha
Build Number28127
VersionPR #24656
Bundle IDorg.wordpress.alpha
Commit5735124
Installation URL098pjsei7t8c0
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@kean
Copy link
Contributor

kean commented Jul 7, 2025

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:

Screenshot 2025-07-07 at 7 20 17 PM

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:

Screenshot 2025-07-07 at 7 26 56 PM

@crazytonyli
Copy link
Contributor Author

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.

@kean
Copy link
Contributor

kean commented Jul 8, 2025

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.

@crazytonyli crazytonyli marked this pull request as draft July 28, 2025 23:00
@crazytonyli crazytonyli removed this from the 26.1 milestone Jul 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants