Merging blocks: allow x to be merged into wrapper blocks (quote, list, group...)#42780
Merged
Conversation
|
Size Change: +88 B (0%) Total Size: 1.27 MB
ℹ️ View Unchanged
|
0b6227b to
06ceef9
Compare
06ceef9 to
97a77f2
Compare
Member
Author
|
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. |
talldan
reviewed
Aug 19, 2022
| <!-- /wp:paragraph --> | ||
|
|
||
| <!-- wp:paragraph --> | ||
| <p></p> |
Contributor
There was a problem hiding this comment.
@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.
geriux
pushed a commit
that referenced
this pull request
Sep 7, 2022
geriux
pushed a commit
that referenced
this pull request
Sep 7, 2022
* 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>
This was referenced Sep 24, 2022
30 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
mergeBlocksaction.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