-
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
Merging blocks: allow x to be merged into wrapper blocks (quote, list, group...) #42780
Conversation
Size Change: +88 B (0%) Total Size: 1.27 MB
ℹ️ View Unchanged
|
0b6227b
to
06ceef9
Compare
06ceef9
to
97a77f2
Compare
Let's merge this. It's needed for List v2, it has an e2e test, it's well contained, and falls back to the old behaviour. |
<!-- /wp:paragraph --> | ||
|
||
<!-- wp:paragraph --> | ||
<p></p> |
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.
@ellatrix I think there should be a '2' here. The test types it, but it's missing. It looks like you may have committed the result of a failed test.
I've pushed a PR that updates the snapshot to its correct version - #43407. I expect the test is flakey and will still need to be fixed, but at least it won't be a false positive.
* Mobile - List V2 - Add useEnter to fix splitting issue * Merging blocks: allow x to be merged into wrapper blocks (quote, list, group...) (#42780) * Add test for the group block (#42801) Co-authored-by: Ella van Durpe <4710635+ellatrix@users.noreply.github.com> Co-authored-by: Justin Ahinon <justiny.ahinon@gmail.com>
What?
Allows any block (e.g. paragraph) to be merged into a "wrapper" blocks such as quote, list or group.
The beauty of this PR is that it works for any block and wrapper block combination, as long as there's a transform.
Why?
Improves editing flow.
How?
Enhances the
mergeBlocks
action.Testing Instructions
Create a quote block. Add some text. Press Enter twice to exit the quote. Type something. Now press Backspace from the start of this block. The text should be merged with the quote.
Screenshots or screencast