WordPress-iOS icon indicating copy to clipboard operation
WordPress-iOS copied to clipboard

Offline Mode: Integrate "Media Uploads" with a sync engine for drafts

Open kean opened this issue 1 year ago β€’ 4 comments

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

  1. Potential unintended areas of impact: Post Media
  2. What I did to test those areas of impact (or what existing automated tests I relied on): manual
  3. 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.txt if 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)

kean avatar Apr 26 '24 15:04 kean

Jetpack AlphaπŸ“² You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
App NameJetpack Alpha Jetpack Alpha
ConfigurationRelease-Alpha
Build Numberpr23103-d70876e
Version24.8
Bundle IDcom.jetpack.alpha
Commitd70876ea4bc99683bd204baaaf4a4450a98f5b4f
App Center Buildjetpack-installable-builds #8846
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

wpmobilebot avatar Apr 26 '24 15:04 wpmobilebot

WordPress AlphaπŸ“² You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
App NameWordPress Alpha WordPress Alpha
ConfigurationRelease-Alpha
Build Numberpr23103-d70876e
Version24.8
Bundle IDorg.wordpress.alpha
Commitd70876ea4bc99683bd204baaaf4a4450a98f5b4f
App Center BuildWPiOS - One-Offs #9800
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

wpmobilebot avatar Apr 26 '24 15:04 wpmobilebot

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.

dvdchr avatar Apr 29 '24 09:04 dvdchr

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.

kean avatar Apr 29 '24 15:04 kean

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 {

kean avatar May 04 '24 17:05 kean