[Modal Layout Picker] Create Layout Picker sections and thumbnail UI using static data#12564
[Modal Layout Picker] Create Layout Picker sections and thumbnail UI using static data#12564malinajirka merged 36 commits intodevelopfrom
Conversation
| package org.wordpress.android.ui.mlp | ||
|
|
||
| // | ||
| // TODO: THIS SHOULD BE MOVED IN RN BRIDGE? |
There was a problem hiding this comment.
I put it in the bridge for the iOS side that way ideally we can find a way to share these static layouts in the future.
|
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
Generated by 🚫 dangerJS |
|
You can test the changes on this Pull Request by downloading the APK here. |
|
Hello @iamthomasbishop 👋 , |
There was a problem hiding this comment.
Hey @antonis, great work here too I only found a couple of small issues while testing.
Selection is maintained after closing the view
It seems like the selection is preserved if I leave and come back.
- Open the layout picker
- Select a layout
- Select the up button
- Come back
Notice: The layout is still selected.
Scroll position going down and back up
- Scroll horizontally in a category (such as the first row)
- Scroll to the bottom
- Come back to the top
Notice the first row is reset to the default scroll position
Looking at the Google Play store if I do the same thing they keep track of the scroll position. I've noticed other apps like Netflixs will do this as well. What are your thoughts on cloning that behavior?
…c_data # Conflicts: # WordPress/src/main/java/org/wordpress/android/viewmodel/mlp/ModalLayoutPickerViewModel.kt
…c_data # Conflicts: # WordPress/src/main/java/org/wordpress/android/ui/mlp/ModalLayoutPickerFragment.kt
|
Hey @chipsnyder 👋 , |
…c_data # Conflicts: # WordPress/src/main/java/org/wordpress/android/ui/mlp/ModalLayoutPickerFragment.kt
| * NOTE: This implementation will be deprecated and the layouts for self hosted sites will be provided by a new | ||
| * public API endpoint (/common-block-layouts) | ||
| */ | ||
| object GutenbergPageLayoutFactory { |
There was a problem hiding this comment.
@chipsnyder My assumption is that this layout factory implementation will be used only temporarily for testing this PR and the new endpoint @enejb is creating will replace it.
Thus there is no need to move this in RN Bridge at this point.
# Conflicts: # WordPress/src/main/java/org/wordpress/android/modules/AppComponent.java
malinajirka
left a comment
There was a problem hiding this comment.
Really great job @antonis!
I've tested the app and it works great. The only thing I noticed is that we lose horizontal scroll position on an orientation change (I'm not sure it's worth fixing though).
I've left some in-code comments. Most of them are very minor. The only one I'd consider a bit more important is the one regarding LayoutSelectionListener - listener implementing lifecycleOwner and livedata seems very strange to me. Let me know what you think ;). Thanks
WordPress/src/main/java/org/wordpress/android/ui/mlp/GutenbergPageLayouts.kt
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/ui/mlp/LayoutsAdapter.kt
Outdated
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/ui/mlp/LayoutsAdapter.kt
Outdated
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/ui/mlp/LayoutsAdapter.kt
Outdated
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/ui/mlp/ModalLayoutPickerFragment.kt
Outdated
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/ui/mlp/ModalLayoutPickerListDiffCallback.kt
Outdated
Show resolved
Hide resolved
WordPress/src/main/java/org/wordpress/android/ui/mlp/ModalLayoutPickerListDiffCallback.kt
Outdated
Show resolved
Hide resolved
WordPress/src/main/res/drawable/ic_layout_selection_overlay.xml
Outdated
Show resolved
Hide resolved
|
@antonis Apologies on the delays for design review, and I hope this is the right place to drop review notes -- if not, let me know and I will drop them in the appropriate place 😄 I've taken the latest build linked above for a spin, and jotted down some notes and feedback. It's feeling pretty close already and I'll give it another run tomorrow, but here are my notes:
Thanks for all of the great work on this thus far! 👏 |
|
@antonis We might want to consider fixing the design-review issues in a separate PR(s). I'm a bit worried it might get out of hands. This PR is too big from the beginning - we usually create multiple PRs and we merge them into a working branch. When all the PRs are reviewed by developer(s) and ready to go - we ask for a design review. It's way easier to review for developers - each PR has a single focus. And when the whole feature is working the designer can jump in. Another benefit is that we don't have developer and design comments within a single PR as it's a bit difficult to get oriented in for all parties. |
I agree @malinajirka . I try to cover the technical fixes on this and get it merged. I can follow up on the design fixes separately and fix them in another PR. |
|
@antonis @malinajirka Totally fine to break this work up as necessary. I was under the impression that this was awaiting design review, so I wanted to share my notes and feedback based on the current state -- to be clear, I don't expect all of the above things I mentioned to be addressed immediately, or even as part of this specific PR. Please feel free to ping me when ready for another round of design review. |

Fixes: wordpress-mobile/gutenberg-mobile#2436
Related PRs:
Description
This PR implements the presentation of static layout data as part of the effort to rework the Starter Page Template Picker for new page.
In detail it implements the following:
To test:
Layout Picker should show when creating a new page from My Site or Site Pages the Modal Layout Picker appears.
Note: For demo/testing purposes, the categories repeat the same layout 30 times because the static data only has one layout per category.
General Navigation
Preview Images
Selecting a Layout
Screenshots:
PR submission checklist:
RELEASE-NOTES.txtif necessary.