Gutenberg - Media Inserter - Check for internet connection#14140
Merged
Gutenberg - Media Inserter - Check for internet connection#14140
Conversation
houndci-bot
reviewed
May 19, 2020
WordPress/Classes/ViewRelated/Gutenberg/GutenbergMediaInserterHelper.swift
Outdated
Show resolved
Hide resolved
|
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
chipsnyder
approved these changes
May 19, 2020
Contributor
chipsnyder
left a comment
There was a problem hiding this comment.
LGTM!
I was able to hit an edge case where I killed the connect right when the upload finished. The image made it to the server; however, the editor showed a failed message. However, this seems like a separate issue.
Contributor
Author
|
Thanks for the review @chipsnyder ! |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes wordpress-mobile/gutenberg-mobile#2106
When uploading media from the block editor without internet connection, the placeholder will hang instead of showing the retry message. This affects any block that handles media upload,
Image,Video,Media & Text, andCover.This PR adds an internet connection check in the
thumbnailReadystate to avoid showing the progress bar when it is not uploading anything and display the retry message instead.For a bit more insight, when uploading media from the media library outside the editor it won't let the user upload anything without an internet connection. In this case, we do want to start the upload process but let the user know if it failed by having no connection.
To test
Image,Video,Media & TextorCover.PR submission checklist:
RELEASE-NOTES.txtif necessary.