-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Writing flow: avoid merging paragraph into Columns #53508
Conversation
Size Change: +52 B (0%) Total Size: 1.5 MB
ℹ️ View Unchanged
|
Thanks for the PR! This PR is working as expected, but I am a little concerned about a few cases other than columns and group blocks. In trunk, when I press the I think this PR makes sense in terms of unifying backspace behavior, but I would like to hear others' opinions on whether this behavior is acceptable. Perhaps adding a specific block to the condition in trunkScreencasttrunk.mp4This PRScreencastpr.mp4 |
Right, list is an issue. In that case we'll have to add a block.json setting to disable auto merging. Or another idea: we reuse the existing |
Ok, I went for opt-in instead of opt-out. We already have |
Thanks for the update! Personally, I think it's okay to disable merging even in the group block, what do you think? The behavior in the screencast below is a case of the issue I originally reported in #45436, and it feels a little weird. 9d8f0a8fbe7911f4a57885d7ef997ed6.mp4 |
It was intentionally added to Group, would love more opinions. Maybe we can discuss that separately? |
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.
LGTM!
It was intentionally added to Group, would love more opinions. Maybe we can discuss that separately?
OK. In the future, if there are many opinions that the merge behavior is not what we intended for other blocks, including group blocks, we'll be fine now that we can control it with the new __experimentalOnMerge support 👍
The above comment has been deleted as it appears to be related to spam. At the same time, I have reported it to GitHub. |
What?
Fixes #45436. When attempting to merge a paragraph into a Columns block, abort merging. Currently a merge is attempted by transforming the paragraph to a Columns block and then merging the column blocks.
Why?
This merging behaviour doesn't make sense, and on top of that it's broken because the width attributes are not merged correctly.
How?
Only attempt merging if there's block support for it through
__experimentalOnMerge
. There's precedent with__experimentalOnEnter
.Testing Instructions
Create a column with two paragraphs. Create another after the column and press backspace.
Testing Instructions for Keyboard
Screenshots or screencast