[Modal Layout Picker] Request scaled Thumbnail images#13077
Merged
Conversation
|
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
|
You can test the changes on this Pull Request by downloading the APK here. |
antonis
commented
Oct 8, 2020
| * Shows the MLP | ||
| * @param supportedBlocks the supported blocks to filter fetched layouts (by default no filtering occurs) | ||
| * @param previewWidth the layout preview card width | ||
| * @param scale the screen density scale |
Contributor
Author
There was a problem hiding this comment.
scale is mainly used for iOS. We use the default value 1.0 and pass the rendered pixels per device in previewWidth
3 tasks
# Conflicts: # WordPress/src/main/java/org/wordpress/android/ui/main/WPMainActivity.java # WordPress/src/main/java/org/wordpress/android/ui/pages/PagesFragment.kt # WordPress/src/main/java/org/wordpress/android/viewmodel/mlp/ModalLayoutPickerViewModel.kt # build.gradle
Tug
approved these changes
Oct 9, 2020
Contributor
Tug
left a comment
There was a problem hiding this comment.
Followed testing instructions, I can confirmed the requests are working as intended 👍
# Conflicts: # WordPress/src/main/java/org/wordpress/android/ui/mlp/ModalLayoutPickerFragment.kt # WordPress/src/main/java/org/wordpress/android/viewmodel/mlp/ModalLayoutPickerViewModel.kt # build.gradle
malinajirka
approved these changes
Oct 16, 2020
Contributor
malinajirka
left a comment
There was a problem hiding this comment.
I have reviewed the code and it LGTM. I haven't tested the changes since they were already tested by Tug.
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#2445
Related PRs:
API Call: wordpress-mobile/WordPress-FluxC-Android#1710
Depends on: #13022
Description
This PR is part of the effort to rework the Starter Page Template Picker for new pages. This part of the initiative will focus on modifying the API call /wpcom/v2/sites/{site}/block-layouts to include the parameters defined in wordpress-mobile/gutenberg-mobile#2416 that will allow the resulting data to include thumbnail URLs that have been optimized for the requesting client.
To test:
Layout Picker should show when creating a new page from My Site or Site Pages the Modal Layout Picker appears.
WPCom Site
previewparameter return with data like:Self-Hosted Site
previewparameter return with data like:Note: Caching of the API call will be implemented with wordpress-mobile/gutenberg-mobile#2456
PR submission checklist:
RELEASE-NOTES.txtif necessary.