[Modal Layout Picker] Populate UI for WPCOM sites with data from the API#12932
[Modal Layout Picker] Populate UI for WPCOM sites with data from the API#12932malinajirka merged 15 commits intodevelopfrom
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. |
2097ba4 to
fee7e4c
Compare
fee7e4c to
c2a1106
Compare
c2a1106 to
0a6f644
Compare
# Conflicts: # build.gradle
There was a problem hiding this comment.
Thanks @antonis!
It looks good overall. I've left a couple of in-code comments. I also tested the app and I encounter a couple of scenarios about which I'm not sure about - I think they are expected, but just to be sure.
- Should we perhaps always scroll to the top when the user changes a filter? It feels a bit weird when I'm scrolled to the bottom that items appear at the top of the list, wdyt?
- I can select layouts when the image hasn't finished loading yet. I think this is fine, just wanted to double check it's expected.
- I can select only one layout per category on some of my sites - is this expected?
WordPress/src/main/java/org/wordpress/android/viewmodel/mlp/ModalLayoutPickerViewModel.kt
Outdated
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/viewmodel/mlp/ModalLayoutPickerViewModel.kt
Outdated
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/viewmodel/mlp/ModalLayoutPickerViewModel.kt
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/viewmodel/mlp/ModalLayoutPickerViewModel.kt
Outdated
Show resolved
Hide resolved
Generated by 🚫 dangerJS |
|
Hello @malinajirka 👋 , thank you for reviewing this 🙇
I agree that it feels more natural this way. Fixed with c5c5ebd
I was thinking of this too, but left it this way since the user may be able to preview the layout even if the thumbnail has not loaded.
The data are loaded from the server for each site. I guess this is normal but I will double check. Note that in a next PR I will filter out layouts that are not applicable so this "one layout per category" may be a common case. |
# Conflicts: # WordPress/src/main/java/org/wordpress/android/ui/mlp/ModalLayoutPickerFragment.kt
|
Thanks @antonis! I've left one comment but the changes look great otherwise. I tried to move the execution to a bg thread, but the app didn't work as expected. So I'll wait for your fixes and test it after. Thanks!
We are targeting develop in this PR, is it intentional? |
|
Hello @malinajirka 👋 ,
Yes. This feature is disabled with |
malinajirka
left a comment
There was a problem hiding this comment.
Yes. This feature is disabled with BuildConfig.MODAL_LAYOUT_PICKER by default (enabled only for wasabi and jalapeno)
:D I should wake up before I post comments next time :P.
Thanks for all the changes @antonis! LGTM



Fixes: wordpress-mobile/gutenberg-mobile#2443
Related PRs:
Description
This PR populates the MLP UI with data fetched from
/wpcom/v2/sites/{site}/block-layouts. It also implements a loading state where a view skeleton is displayed and a simple error state.To test:
Layout Picker should show when creating a new page from My Site or Site Pages the Modal Layout Picker appears.
Regular Flow
Slow Network
No Network
Screenshots:
PR submission checklist:
RELEASE-NOTES.txtif necessary.