Skip to content

[Modal Layout Picker] Create Modal window for Modal Layout Picker#12482

Merged
antonis merged 35 commits intodevelopfrom
issue/2419-MLPContainer
Aug 7, 2020
Merged

[Modal Layout Picker] Create Modal window for Modal Layout Picker#12482
antonis merged 35 commits intodevelopfrom
issue/2419-MLPContainer

Conversation

@antonis
Copy link
Copy Markdown
Contributor

@antonis antonis commented Jul 20, 2020

Fixes: wordpress-mobile/gutenberg-mobile#2419

Related PRs:

Description

Adds feature flags and a container view for the Modal Layout Picker

To test:

Classic Editor and Gutenberg Editor with Modal Layout Picker Enabled.

  • Create a new page from My Site
    • Create a new page by clicking on the Floating Toolbar Button on the My Site Page then select "Site Page"
    • Expect to see the modal layout picker container
    • Select "Create Blank Page"
    • Expect to see the page editor
  • Create a new page from Pages.
    • Create a new page by clicking on the fab icon on the Pages screen.
    • Expect to see the modal layout picker container
    • Select "Create Blank Page"
    • Expect to see the page editor
  • Create a new page from Pages when the site has no pages.
    • Create a new page by clicking on the 'Create a page' button.
    • Expect to see the modal layout picker container
    • Select "Create Blank Page"
    • Expect to see the page editor

On the Modal Layout Picker

  • Selecting the back icon at the top left should close the modal without creating a page.
  • Swiping down around the "Grip" in the top middle of the modal should close the modal without creating a page.
  • Scrolling up in the stubbed rows should collapse the header
  • Toggle Dark mode and check the style seems consistent with other views

Screenshots:

Scroll action Landscape
device-2020-08-05-093237 device-2020-08-04-134723

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Jul 20, 2020

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Jul 20, 2020

Warnings
⚠️ PR is not assigned to a milestone.
⚠️ PR has more than 500 lines of code changing. Consider splitting into smaller PRs if possible.

Generated by 🚫 dangerJS

@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Jul 20, 2020

You can test the changes on this Pull Request by downloading the APK here.

@antonis
Copy link
Copy Markdown
Contributor Author

antonis commented Jul 22, 2020

After the Consolidation of the Gutenberg initialProps handling a refactoring is needed in the way the MLP configuration is passed

@antonis antonis force-pushed the issue/2419-MLPContainer branch from ca61403 to 206265b Compare July 22, 2020 08:39
@antonis antonis added [Status] Needs Design Review A designer needs to sign off on the implemented design. [Type] Enhancement labels Jul 22, 2020
@antonis antonis force-pushed the issue/2419-MLPContainer branch from 24a6d78 to 933ea55 Compare July 22, 2020 11:59
@antonis antonis force-pushed the issue/2419-MLPContainer branch from 933ea55 to b23d080 Compare July 22, 2020 12:20
@antonis
Copy link
Copy Markdown
Contributor Author

antonis commented Jul 22, 2020

Hello @iamthomasbishop 👋 ,

I've completed a first version of the MLP container. Please let me know if you have any design feedback on the attached screenshots or the the APK here.
I tried to use the existing text styles of the App. Please provide more information on this to fully align with the provided designs.
Thank you in advance :)

@antonis antonis requested a review from chipsnyder July 22, 2020 12:52
…ainer_after

# Conflicts:
#	libs/gutenberg-mobile
@mchowning
Copy link
Copy Markdown
Contributor

This has been updated with the Consolidation of the Gutenberg initialProps handling and should not be merged till gutenberg/after_release_1.33.0 is merged

👋 @antonis ! I think if you retarget this PR to the gutenberg/after_release_1.33.0 branch that would both make the diff on this PR a lot smaller and it would allow you to merge this PR before gutenberg/after_release_1.33.0 gets merged to develop. If you did that and gutenberg/after_release_1.33.0 got merged before this PR was merged you could just retarget it back to develop again (I think Github actually might do that for you automatically when the branch you are targeting gets merged). This certainly isn't critical, it's just a suggestion.

@antonis antonis changed the base branch from develop to gutenberg/after_release_1.33.0 July 22, 2020 17:06
@antonis
Copy link
Copy Markdown
Contributor Author

antonis commented Jul 22, 2020

I think if you retarget this PR to the gutenberg/after_release_1.33.0 branch that would both make the diff on this PR a lot smaller and it would allow you to merge this PR before gutenberg/after_release_1.33.0 gets merged to develop.

That sound good. I made the change.
Thank you for the prompt feedback @mchowning :)

@iamthomasbishop
Copy link
Copy Markdown

iamthomasbishop commented Jul 23, 2020

Hey @antonis 👋 Took the build for a spin, and it's coming along nicely. Not seeing any big issues, but here are my notes.

Sheet surface

I'm not sure if this is intentional or not, but I noticed when you're scrolled to the top of the view and pull down softly, we have a snap point where the sheet gets docked at ~2/3 height (video example). We probably only need 2 heights — full-screen and closed.

I'm not sure if this something we can control, but when you scroll to the bottom of the sheet and get the usual "ripple" effect (the blue "wave" that shows when you scroll to the end of a container), there looks to be a ~16dp gap between that and the top edge of the footer bar. (video example)

Collapsed app bar style

The text label on the app bar when it's in a collapsed state doesn't look centered. (screenshot)

Title/subtitle

The sizing of the title and subtitle look a little small — I believe the title should be set in Headline 4 and the subtitle in Body 1, but it's hard to tell what the current values are in this build — would you mind confirming?

Is there any way we can use the system-default serif font (Noto Serif)? My original mockups used the bold weight because that's what we were leaning towards using for headlines across the app, but I'll have to check in to see if that's the final decision.

The spacing between the app bar and title also look a little tight — can you confirm how much space is between these (I believe it should be 16, although IIRC the line-height of the labels might be slightly different, which would result in a slight diff)?

The spacing between the title and subtitle look a bit too much, but this might be an optical illusion bc of the too-small spacing mentioned above (this also should be 16).

Status bar color

Would it be possible to adapt the status bar to a light variation (white background, dark text) when the sheet is fully open? For reference, we're also using this style on post/page preview.

@iamthomasbishop
Copy link
Copy Markdown

@antonis an update regarding my comment on font-weight of the headings:

Is there any way we can use the system-default serif font (Noto Serif)? My original mockups used the bold weight because that's what we were leaning towards using for headlines across the app, but I'll have to check in to see if that's the final decision.

We are using the bold weight of Noto Serif for headings as I thought, so we can use that for this sheet 😄

@antonis
Copy link
Copy Markdown
Contributor Author

antonis commented Aug 6, 2020

Hello @ashiagr 👋 ,
thank you for your feedback. I really appreciate it :)

On your observations:

  • On transitioning from landscape to portrait, title was not displayed until I significantly scrolled down (it didn't happen consistently - just once in a while). Let me know if it is an expected behaviour.

I reproduced this behavior and fixed this.

  • Wondering if we could use CollapsingToolbarLayout inside a bottom sheet for a smoother title transitioning. Let me know if you already considered it or encountered any challenges. Here's a related SO discussion.

I agree with you on this. An implementation based on CoordinatorLayout and CollapsingToolbarLayout would be much simpler and cleaner. When I started the implementation I tried this direction but it proved tricky inside the BottomSheetDialogFragment. I spend again a few hours on this today since the SO link was quite helpful but I got to a point where I got inconsistent behavior since the BottomSheetDialogFragment combined with the nested (part of a next PR) RecyclerViews make this quite complex. I decided that at this point it might be better to proceed with the current solution and revisit this in a next PR as an optimisation effort. Wdyt?

@ashiagr
Copy link
Copy Markdown
Contributor

ashiagr commented Aug 6, 2020

I reproduced this behavior and fixed this.

Thanks, I confirm it is fixed now 🎉.

at this point it might be better to proceed with the current solution and revisit this in a next PR as an optimisation effort. Wdyt?

Thanks for giving it a try 🙇‍♀️. I agree with your suggestion, let's proceed with the current solution. Using CollapsingToolbarLayout might not a be a straightforward solution. Whenever (and if) you decide to retry let me know. I'll be happy to pair on this any time after approx. two weeks.

Copy link
Copy Markdown
Contributor

@ashiagr ashiagr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed on Slack, approving this PR as this new feature is only enabled for wasabi + jalapeno builds and won’t affect the alpha/beta releases.

Feel free to merge after resolving the conflict.

# Conflicts:
#	WordPress/build.gradle
@antonis antonis merged commit 7f7fd44 into develop Aug 7, 2020
@antonis
Copy link
Copy Markdown
Contributor Author

antonis commented Aug 7, 2020

A new build time configuration MODAL_LAYOUT_PICKER enables this feature.
At this point it is only enabled in wasabi and jalapeno flavors and won't affect alpha, beta and release build

@antonis antonis deleted the issue/2419-MLPContainer branch August 7, 2020 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Status] Needs Design Review A designer needs to sign off on the implemented design. [Type] Enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants