Offline Mode: Integrate "Media Uploads" with a sync engine for drafts
There needed to be a way to somehow inform the user why the sync fails in case of a terminal error with media uploads.
- Integrate PostMediaUploadsView with draft sync engine
- Perform sync retries on terminal error but with longer delay (otherwise there is no retry mechanism)
To test:
- Mock one of the terminal media failures (e.g. change
var maxUploadSize: NSNumber?) - Follow the steps from the video:
https://github.com/wordpress-mobile/WordPress-iOS/assets/1567433/2df7a479-2d62-4f89-a984-eba5b1f4a81e
Regression Notes
- Potential unintended areas of impact: Post Media
- What I did to test those areas of impact (or what existing automated tests I relied on): manual
- What automated tests I added (or what prevented me from doing so): n/a
PR submission checklist:
- [ ] I have completed the Regression Notes.
- [ ] I have considered adding unit tests for my changes.
- [ ] I have considered adding accessibility improvements for my changes.
- [ ] I have considered if this change warrants user-facing release notes and have added them to
RELEASE-NOTES.txtif necessary.
Testing checklist:
- [ ] WordPress.com sites and self-hosted Jetpack sites.
- [ ] Portrait and landscape orientations.
- [ ] Light and dark modes.
- [ ] Fonts: Larger, smaller and bold text.
- [ ] High contrast.
- [ ] VoiceOver.
- [ ] Languages with large words or with letters/accents not frequently used in English.
- [ ] Right-to-left languages. (Even if translation isnβt complete, formatting should still respect the right-to-left layout)
- [ ] iPhone and iPad.
- [ ] Multi-tasking: Split view and Slide over. (iPad)
π² You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
| App Name | Jetpack Alpha |
|
| Configuration | Release-Alpha | |
| Build Number | pr23103-d70876e | |
| Version | 24.8 | |
| Bundle ID | com.jetpack.alpha | |
| Commit | d70876ea4bc99683bd204baaaf4a4450a98f5b4f | |
| App Center Build | jetpack-installable-builds #8846 |
π² You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
| App Name | WordPress Alpha |
|
| Configuration | Release-Alpha | |
| Build Number | pr23103-d70876e | |
| Version | 24.8 | |
| Bundle ID | org.wordpress.alpha | |
| Commit | d70876ea4bc99683bd204baaaf4a4450a98f5b4f | |
| App Center Build | WPiOS - One-Offs #9800 |
Hi @kean π , I'm bumping this PR's milestone to 24.9 since I'm starting code freeze. Feel free to re-target this to the release branch if this is a blocker or intended for 24.8.
I'm going to move the target back to 24.9 β it's not needed for the current release, and there are some enhancements still needed.
It's a bit unexpected for the warning icon to still be there after I take an action to cancel the upload. What do you think of showing a spinner?
I agree, and I think it's not the only scenario where the spinner is missing.
I changes the PostCoordinator code to always show it and to also do nothing if the worker doesn't exist or doesn't have an error:
if let worker = workers[post.objectID], worker.error != nil {