Skip to content
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

feat: Retry all failed uploads on manual retry #22240

Merged
merged 3 commits into from
Dec 27, 2023

Conversation

dcalhoun
Copy link
Member

Description

Retrying all failed media uploads when tapping the "Retry" button for a
single media item improves the UX and aligns with the Android product's
existing behavior.

Fixes wordpress-mobile/gutenberg-mobile#6408.

Testing Instructions

  1. Disable network connectivity for your device.
  2. Launch editor.
  3. Add a Gallery block.
  4. Add two or more images to the block.
  5. Enable network connectivity for your device.
  6. Tap one of the images.
  7. Tap "Retry."
  8. Verify all images retry uploads.

Regression Notes

  1. Potential unintended areas of impact
    Media upload for various block types.
  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    Inserted and attached media for various block types.
  3. What automated tests I added (or what prevented me from doing so)
    None, lack of familiarity with testing technology and lack of example unit
    tests.

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.

UI Changes testing checklist:

  • 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)

@dcalhoun dcalhoun added [Type] Enhancement Media Gutenberg Editing and display of Gutenberg blocks. labels Dec 16, 2023
Retrying all failed media uploads when tapping the "Retry" button for a
single media item improves the UX and aligns with the Android product's
existing behavior.
@dcalhoun dcalhoun force-pushed the feat/retry-all-failed-uploads-on-manual-retry branch from b41b0e7 to b75c597 Compare December 16, 2023 22:21
@dcalhoun dcalhoun force-pushed the feat/retry-all-failed-uploads-on-manual-retry branch from 603417d to a433e2a Compare December 16, 2023 22:28
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Dec 16, 2023

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 Numberpr22240-ed1d7f6
Version23.9
Bundle IDorg.wordpress.alpha
Commited1d7f6
App Center BuildWPiOS - One-Offs #8251
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Dec 16, 2023

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 Numberpr22240-ed1d7f6
Version23.9
Bundle IDcom.jetpack.alpha
Commited1d7f6
App Center Buildjetpack-installable-builds #7275
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@dcalhoun dcalhoun marked this pull request as ready for review December 17, 2023 00:17
@dcalhoun dcalhoun requested a review from derekblank December 17, 2023 00:18
@dcalhoun dcalhoun added this to the 24.0 milestone Dec 17, 2023
@peril-wordpress-mobile
Copy link

Warnings
⚠️ This PR is assigned to a milestone which is closing in less than 4 days Please, make sure to get it merged by then or assign it to a later expiring milestone

Generated by 🚫 dangerJS

@wpmobilebot
Copy link
Contributor

1 Warning
⚠️ This PR is assigned to the milestone 24.0. The due date for this milestone has already passed.
Please make sure to get it merged by then or assign it to a milestone with a later deadline.

Generated by 🚫 Danger

@derekblank derekblank modified the milestones: 24.0, 24.1 Dec 27, 2023
Copy link
Contributor

@derekblank derekblank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was able to test successfully using an internal build and observed that all failed uploads retried when one failed item was tapped. 🚀

As with other related PRs, removing the release note until we remove the debug/internal build flag.

@derekblank derekblank merged commit 24d9666 into trunk Dec 27, 2023
23 checks passed
@derekblank derekblank deleted the feat/retry-all-failed-uploads-on-manual-retry branch December 27, 2023 04:27
@guarani
Copy link
Contributor

guarani commented Jan 30, 2024

👋 I came across this while testing 24.1's features. Is it still possible to manually retry an image upload? When I turn the network back on, the uploads automatically resume (so there's no opportunity to retry manually). Was this superseded by #22282 which made the upload automatically resume after the network returns?

@derekblank
Copy link
Contributor

derekblank commented Jan 30, 2024

Is it still possible to manually retry an image upload?

Yes, it is still possible to manually retry an upload. Although the uploads will attempt to restart automatically, the upload failed state still exists. It's possible to trigger a failure by throttling the device connection to a weak 3G/4G -- we're working on improving the UX of that scenario in wordpress-mobile/gutenberg-mobile#6583 (with video examples of failed uploads and manual retry attempts). If you have any further feedback on the upload failures/retries, it is very welcome on that thread. And thanks for testing! 🙇

@dcalhoun
Copy link
Member Author

@guarani thank you for testing. Leveraging a proxy — like Charles Proxy — to temporarily force a server error might be a straightforward way to test manual retries, as it will not trigger automatic retries.

@guarani
Copy link
Contributor

guarani commented Jan 30, 2024

Thanks for the info folks! 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Gutenberg Editing and display of Gutenberg blocks. Media [Type] Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce a “Retry all” option in the bottom sheet displayed upon upload failure
4 participants