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

Difficulty removing empty heading blocks #65174

Closed
richtabor opened this issue Sep 10, 2024 · 4 comments · Fixed by #65262
Closed

Difficulty removing empty heading blocks #65174

richtabor opened this issue Sep 10, 2024 · 4 comments · Fixed by #65262
Assignees
Labels
[Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... Needs Dev Ready for, and needs developer efforts [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@richtabor
Copy link
Member

richtabor commented Sep 10, 2024

When editing templates in the Site Editor I cannot easily delete a Heading block. I don't get this behavior when editing a page; I'm pretty sure it's only when editing a template.

In this video I'm pressing the delete button and it's moving the block up the tree.

CleanShot.2024-09-09.at.20.27.41.mp4
@richtabor richtabor added [Type] Bug An existing feature does not function as intended [Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... labels Sep 10, 2024
@richtabor richtabor assigned ellatrix and unassigned ellatrix Sep 10, 2024
@kspilarski
Copy link

Hi @richtabor Thanks for sharing your report. I tested this on my site and was able to replicate the exact issue you mentioned. In the template, deleting a Heading block will move it up the list of blocks.

Here's my screen recording:
Screen Capture on 2024-09-10 at 11-51-00

Meanwhile, on patterns, pages and posts, deleting the heading works fine and does not move up the block list when deleted.

@kspilarski kspilarski added [Block] Heading Affects the Headings Block [Feature] Template Editing Mode Related to the template editor available in the Block Editor Needs Dev Ready for, and needs developer efforts labels Sep 10, 2024
@talldan
Copy link
Contributor

talldan commented Sep 10, 2024

I can also reproduce this in the post editor, and with paragraphs as well as headings. The bug has been in the last couple of WordPress versions, and is related to some changes that were made for list and quote blocks also applying to other blocks - #45075.

@talldan talldan removed [Block] Heading Affects the Headings Block [Feature] Template Editing Mode Related to the template editor available in the Block Editor labels Sep 10, 2024
@ndiego
Copy link
Member

ndiego commented Sep 10, 2024

I can also reproduce this in the post editor, and with paragraphs as well as headings.

I ran into the paragraph issue last night. While I thought it might be an intentional decision, it's very frustrating and requires you to manually delete the paragraph/heading from the List View or the Options dropdown. It would be ideal to get this fixed in 6.7.

@kevin940726 kevin940726 self-assigned this Sep 11, 2024
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Sep 12, 2024
@kevin940726
Copy link
Member

I opened #65262 attempting to fix this. It checks for "empty" blocks and removes them on merge. Technically, this checks for __experimentalRole. I'm not sure if that's the best approach though! Feedback welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Writing Flow Block selection, navigation, splitting, merging, deletion... Needs Dev Ready for, and needs developer efforts [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants