Skip to content

Add a dedicated screen for uploading media #24656

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

Open
wants to merge 2 commits into
base: media-upload-blocking-ui
Choose a base branch
from

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.

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