-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Writing Flow: Remove empty blocks when the merge target doesn't support merging #70741
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: Remove empty blocks when the merge target doesn't support merging #70741
Conversation
Co-authored-by: megane9988 <1205958+megane9988@users.noreply.github.com>
…utes Co-authored-by: megane9988 <1205958+megane9988@users.noreply.github.com>
…rations Co-authored-by: megane9988 <1205958+megane9988@users.noreply.github.com>
Co-authored-by: megane9988 <1205958+megane9988@users.noreply.github.com>
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @Copilot. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
@megane9988, I just merged to #70764. After rebasing, you should be able to fix this with |
…delete-heading-backspace-does-not-remove-#70739
@Mamaduka |
await expect( imageBlock ).toBeFocused(); | ||
} ); | ||
|
||
test( 'heading block with content should merge with paragraph above', async ( { |
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.
Since the file is named block-deletion
, it doesn't seem appropriate to test block merging here. I think that a test equivalent to this one has already been done sufficiently in the splitting-merging.spec.js file.
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.
Thank you for your review.
I will delete the second test.
change the title according to the updated test. Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com>
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.
From what I've tested, everything seems fine 👍 I'll leave the final review to @Mamaduka.
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.
Looks good to me ✅ Thank you, @megane9988!
…rt merging (WordPress#70741) Co-authored-by: megane9988 <megane9988@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>
What?
Closes #70739
When deleting a heading block with the backspace key below an image block, the heading block itself does not disappear.
I have taken care of the issue above.
Why?
To maintain consistency in operations
How?
If the first block doesn't support merging and the second block is empty, remove the second block and focus on the first block.
Testing Instructions
Screenshots or screencast
Before
2025-07-08.16.38.04.mov
After
2025-07-16.23.20.23.mov