-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Enable onEnter
support for group block
#40724
Conversation
Love this change ❤️ |
👋 friends. I've tested out this change on native mobile and looks like it doesn't work as-is, meaning we'll probably need to do some work to enable the same on native mobile. @geriux , since you worked on the Quote V2 block recently, can you do a quick check on this one to see what will perhaps be needed to enable the behavior on native mobile? In terms of priority, I feel this is rather low at the moment. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a cool feature 👏
Code wise this looks 👍 because it's just enabling support.
I tested the functionality and that worked. When group block is used with x2 paragraphs and:
- you place cursor in between and hit ENTER twice it breaks the group into x2 groups
- you place the cursor at the end of the last paragraph and hit ENTER twice it breaks out of the group into the root level.
Screen.Capture.on.2022-05-06.at.09-28-06.mp4
Screen.Capture.on.2022-05-06.at.09-28-36.mp4
I'll leave approval to the Gutenberg Mobile folks as it sounds like they need to make changes before this would be safe to merge.
Nit: Just noting that I have had it explained to me in the past that providing video only test instructions can mean that certain contributors cannot easily access the testing instructions. In this case for example there's no audio description of what's happening so if I have restricted vision it could be very difficult to determine what to test. That is a nit but felt I should mention given that we want to be as inclusive as possible.
Hey @hypest 👋 We will need to check the initial implementation of #39911 to see how we can bring that to mobile. This PR doesn't break anything on mobile, and since it's just a newer experimental feature I think it's safe to merge it.
Cool, let's plan when we will work on adding support for this on mobile. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good to be merged?
What?
Allows the user to exit the group block when pressing Enter from an empty paragraph at the end of that block or in the middle. Expands the support introduced at #39911
Why?
This is a keyboard interaction that helps improves writing flow for people.
How?
It enables the
__experimentalOnEnter
support.Testing Instructions
On enter at end:
group-on-enter-at-end.mp4
On enter in the middle:
group-on-enter-in-middle.mp4