Skip to content
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

Merged
merged 1 commit into from
Jul 15, 2022
Merged

Enable onEnter support for group block #40724

merged 1 commit into from
Jul 15, 2022

Conversation

oandregal
Copy link
Member

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

@oandregal oandregal requested review from youknowriad, ntsekouras and a team April 29, 2022 10:50
@oandregal oandregal self-assigned this Apr 29, 2022
@oandregal oandregal added [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Block] Group Affects the Group Block [a11y] Keyboard & Focus labels Apr 29, 2022
@gziolo
Copy link
Member

gziolo commented Apr 29, 2022

Love this change ❤️

@hypest
Copy link
Contributor

hypest commented May 5, 2022

👋 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!

Copy link
Contributor

@getdave getdave left a 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.

@geriux
Copy link
Member

geriux commented May 9, 2022

@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?

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.

In terms of priority, I feel this is rather low at the moment.

Cool, let's plan when we will work on adding support for this on mobile.

Copy link
Member

@ellatrix ellatrix left a 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?

@talldan talldan merged commit c8feb39 into trunk Jul 15, 2022
@talldan talldan deleted the add/on-enter-to-group branch July 15, 2022 02:43
@github-actions github-actions bot added this to the Gutenberg 13.8 milestone Jul 15, 2022
@femkreations femkreations added the Needs User Documentation Needs new user documentation label Sep 4, 2022
@priethor priethor added the [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). label Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Group Affects the Group Block [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs User Documentation Needs new user documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants