Conversation
This avoids showing the option when it won't do anything.
There was a problem hiding this comment.
Here are some suggested test cases for this PR.
WordPress iOS:
- Simultaneous uploads - steps
- Image block - Insert image from device (failing) - steps
- Image block - Insert image from device (cancel) - steps
- Image block - Add Caption - steps
- Image block - Close/Re-open post with an ongoing image upload - steps
- Image block - Close post with an ongoing image upload - steps
- Image block - Switch to classic editor with an image block in page - steps
WordPress Android:
- Simultaneous uploads - steps
- Image block - Insert image from device (failing) - steps
- Image block - Insert image from device (cancel) - steps
- Image block - Add Caption - steps
- Image block - Close/Re-open post with an ongoing image upload - steps
- Image block - Close post with an ongoing image upload - steps
- Image block - Switch to classic editor with an image block in page - steps
If you think that suggestions should be improved please edit the configuration file here. You can also modify/add test-suites to be used in the configuration.
If you are a beginner in mobile platforms follow build instructions.
| onChange={ this.onSetNewTab } | ||
| /> | ||
| { // eslint-disable-next-line no-undef | ||
| __DEV__ && |
There was a problem hiding this comment.
So it seems those image added via url don't have an id property, maybe it would be clearer to use id as a condition instead since it refers to an id inside the WordPress Media library,
There was a problem hiding this comment.
That's the ideal scenario, but we can also get networking errors fetching the image object. Specially those mystery 401 errors that sometimes we get on specific images on self-hosted.
There are some experiments to have (some kind of) authentication on self hosted: wordpress-mobile/WordPressKit-iOS#202 , until then I'd prefer to go with checking if the object is present.
Tug
left a comment
There was a problem hiding this comment.
Product reviewed on Android. This LGTM 👍
|
Thank you! |
This PR fixes point 3 of wordpress-mobile/gutenberg-mobile#1593
gutenberg-mobileside PR: wordpress-mobile/gutenberg-mobile#1669When the image object is not present, the Image Size option won't be present in the Image Options.
The Image object is fetched on a network call for images stored in the WP Media Library. For images added via link, this object is never fetched.
Other cause of the object being missing is network call errors.
With this change we are looking to avoid the case when the ImageSize is displayed in the UI, but it does nothing.
To Test: