-
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
Create Modal Layout Picker Container for new Gutenberg pages and feature flag for development #14456
Conversation
Generated by 🚫 dangerJS |
Hey @iamthomasbishop I think on the "slower" scroll I would want it to set into fully open or fully collapsed at the end of the scroll but let me know. Here are a few GIFs but I think it's hard to tell the difference with out "feeling" it.
|
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
Nice work @chipsnyder — really cool to see this in action. The header transition feels a bit awkward, both with the toggle on and off. I think I would expect that the header would scroll 1:1 with the page and then become fixed once the large title is near the top of the sheet. Do we by any chance have access to the “standard” navigation bar transition that you see on most of Apple’s apps that have large titles, (a couple of examples: Apple Music, Notes, Mail)? If so, can we just follow that behavior? |
Yeah, I agree they both could use some refinement to feel just right.
Their transition is built into the navigation bar, so if we used that directly, our title would be left-aligned, and the subtitle or "prompt" would be above the title. That can give me more of a direction to go in for the refinement. When in large title mode and scrolling up the standard behavior with the title is:
For mimicking that behavior with a prompt text below the title (which Apple gets around by forcing it over the title), I feel like we would follow the same behavior by showing the smaller font title and then just scroll the subtitle off. Let me know if that doesn't sound like what you'd want but I can adjust my implementation to mirror this and make a new build for you to play with. |
Ok, that makes sense about the navigation bar, and I can live with left-aligning the title label.
Not quite sure what you mean by "above" here. Do you mean it'd be above the navigation bar on the z-index? Wouldn't the subtitle be on the main scrollable surface with the rest of the content? I think that's the behavior that you're referring to here 👇 , correct?
|
We discussed this in another thread but wanted to capture it here in case others had the same question. I actually meant on the y-axis so using the native controls we'd have:
The way it was in the build you originally played with I had everything in the scrollable area. I do think there is some room with the not "snappy" version to get more of that 1:1 scroll behavior you mention. I put together a build that has the native controls though so you can get a feel for that. With this approach though I cut out the "sticky" category bar because adding that in results in a need to handle the original question of "how do we want the scroll to feel." This build does have some UI work to do (like the separator bar on the navigation controller should probably be hidden in large title mode). Personally I think we can get a better transition by not using the native controls but I'll leave that up to what you think. Here's the updated build with the default UI components: |
522fc2b
to
b52dcdf
Compare
For transparency, as mentioned in DM here are some notes from a review I did over the weekend: The layout is feeling a lot better already. I jotted down a few notes as I tested the build, but I think it’s getting pretty close. Navigation Bar
Subtitle/Filter Toolbar
Close Button
|
Thanks again for the feedback on this @iamthomasbishop! I spent yesterday looking into these and here's what I have so far: Navigation Bar
I did some testing on this and tracked down several different suggestions, and combinations from different threads ([1], [2], [3], [4], [4], [5]) unfortunately none of them seemed to work to remove the snappy feeling. The one solution I could find with using Apple's transition was to switch the presentation from page sheet to full screen; doing this allowed the view to work as expected.
We can "technically" do this by setting the titlePositionAdjustment, but this is more for making minor horizontal adjustments for font and not for centering the text. So I for maintainability, I would say we should just left-align the subtitle. Subtitle/Filter Toolbar
This bounce is something that's the result of not having the scrollable section (the subtitle and category bar) be a part of the navigation controller. I tried a couple of things like making the bar transparent and turning off the bounce on the scroll. Each of those solutions didn't solve it, nor is there a documented flow to prevent this.
The footer bar does have the transparency on it right now, but it's hard to see with a white background of the cells. Close Button
I'm currently using cross-small from the GridIcons library. Since SF-Symbols are exposed in iOS 13, we could use that x-mark instead. The icon would just be a bit different on iOS 13 vs. iOS 12. Overall thoughtsFrom those pieces of feedback, I think we would be able to solve those design issues if we went back to Build: 31570 and tried to identify the areas where that feels off instead of investing the time in working around some of these bugs with page sheet and large title transitions. Because that way, we would have all of the control in the header instead of trying to manipulate Apple's navbar. What are your thoughts? EDIT: |
Closing this PR in favor of the approach in #14501 |
Fixes: wordpress-mobile/gutenberg-mobile#2419
Related PRs:
gutenberg-mobile
: Disable Page Template picker if modal layout picker is available gutenberg-mobile#2478gutenberg
: Disable Page Template picker if modal layout picker is available WordPress/gutenberg#23872Description
Adds feature flags and a container view for creating a new modal layout
To test:
To disable or enable the development version of Modal Layout Picker
To toggle:
Classic Editor and Gutenberg Editor with Modal Layout Picker Disabled.
Note: Modal Layout Picker should be disabled and uneditable in any Release build
Gutenberg Editor with Modal Layout Picker Enabled
On the Modal Layout Picker
Dismissing the modal
Continuing to scroll down after reaching the top should dismiss the modal
Screenshots:
PR submission checklist:
RELEASE-NOTES.txt
if necessary.