-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Media - Add large and medium image sizes #18997
Conversation
Generated by 🚫 dangerJS |
Podfile
Outdated
# pod 'WordPressKit', :git => 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', :tag => '' | ||
# pod 'WordPressKit', :git => 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', :branch => '' | ||
# pod 'WordPressKit', :git => 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', :commit => '' | ||
pod 'WordPressKit', :git => 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', :commit => '9d9efb43c3f502e98cfbe26fdd8ed11e2a04f02e' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚫 | Use the new Ruby 1.9 hash syntax. |
You can test the changes in Jetpack from this Pull Request by:
|
You can test the changes in WordPress from this Pull Request by:
|
4ca8ab9
to
4fefef4
Compare
# Conflicts: # Podfile # Podfile.lock
There was a problem hiding this 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 and verify the steps following the Testing Instructions on WordPress/gutenberg#42178. LGTM! 🚀
Hey @twstokes 👋 I was wondering if you would have some spare time to check out this PR, we've tested it in different scenarios and it's working as expected so we are looking for someone with native experience to check the code changes this PR is introducing. You've also done a core data migration before in the project, and you've worked with the Gutenberg Mobile team with media upload issues, that's why I'm pinging you first. I just want to make sure I'm following the right steps and not missing anything for these kinds of changes. Please let me know if you could check it out, if not that's ok, I could look for someone else, thank you in advance! |
👋 Hey @geriux! Will be glad to! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 @geriux! I've left some comments in the PR and observations below for your consideration. 🙇
I followed the testing steps here:
Simple Site
- Test Case 1 with gallery block ✅
- Test Case 1 with image block ✅
- Test Case 2 with gallery block ✅
- Test Case 2 with image block ✅
Self-hosted Site
- Test Case 1 with gallery block ✅
- Test Case 2 with image block ✅
- Test Case 1 with image block
⚠️ - Switching to thumbnail caused the image to disappear (see video below)
Self-hosted.Image.mp4
- Test Case 2 with gallery block
⚠️ - After the draft uploaded I went back to the gallery block and didn't see the Image Size option
Observations
- The image size for an image inside a Gallery Block can be set, but then overridden when the setting is changed at the gallery level without warning. This is an edge case and I'm assuming it's already been considered. 👍
Thank you so much for testing and your feedback @twstokes 🙇 I'll work on addressing the issues and your comments. |
# Conflicts: # Podfile # Podfile.lock
Hey @twstokes 👋 Thank you for the feedback and for testing, I applied some of the suggestions and also fixed the issue related to the image disappearing when changing the size. Let me know if you can give it another review/test. Thanks again! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋 @geriux! I'm going to approve this PR so you can choose whether my comments below should be addressed now or later.
Self-hosted + thumbnail mode
I tested setting images to thumbnail mode on a self-hosted site and they no longer disappeared. ✅
However, I did notice that when changing the quality of a gallery on the self-hosted site sometimes not all of the thumbnails would change. (see attached video) You can see that the first image in the second row still looks sharp.
This also happened after all the images were done processing and the app had been idle for around a minute. The site did not have Jetpack connected, if that makes any difference.
Thumbnail.MP4
Self-hosted + image size option on a draft post
I had the same results here as last time.
Test Case 2 with gallery block
Hey @twstokes thank you so much for testing again! I see why you're getting that issue, since you're using a self-hosted site without probably the Gutenberg plugin activated, it's loading the older version of the Gallery block, which has a lower usage. I've tested these scenarios with the Gutenberg plugin and the newer version of the Gallery block (that has nested blocks) and its working correctly. I'll merge this since these changes are based on the newest Gallery block. Thanks again! |
Related PRs:
Gutenberg Mobile PR
-> Gallery block improvements gutenberg-mobile#5007Gutenberg PR
-> [Mobile] - Gallery block - Add useGetMedia native variant WordPress/gutenberg#42178WordPressKit-iOS PR
-> MediaService - Add large and medium sizes WordPressKit-iOS#529This PR adds support for the
large
andmedium
sizes for images, this data is already available from both the REST API and XMLRPC but it is not stored until now. Having these images allows using a lower size within the editor which improves the performance once images are uploaded.Now once an image is uploaded from the editor, it will use the
large
size if available, if not it will fall back to themedium
size and if none are available it will use thefull
size. This change is done to the Gutenberg processors for the Image and Gallery block.For test instructions and screencast please check the Gutenberg PR description.
Regression Notes
It should only affect the Gutenberg editor media uploads.
Manual testing:
None, we do manual testing with media uploads from the editor.
PR submission checklist:
RELEASE-NOTES.txt
if necessary.