Skip to content

Accordion panel item: Disable edit as HTML support #72095

Merged
shimotmk merged 2 commits into
trunkfrom
fix/accordion-panel-item-disable-html-editing
Oct 8, 2025
Merged

Accordion panel item: Disable edit as HTML support #72095
shimotmk merged 2 commits into
trunkfrom
fix/accordion-panel-item-disable-html-editing

Conversation

@shimotmk

@shimotmk shimotmk commented Oct 6, 2025

Copy link
Copy Markdown
Contributor

What?

This PR disables HTML editing support for Accordion panel and item blocks.
A similar PRs: #69374, #11785, #39318, #49426 #55656.

Why?

Editing these wrapper blocks in HTML directly is fragile and prone to breaking the users' content. HTML editing should be left to leaf-blocks.

#11785 (comment)

Testing Instructions

  1. Open a Post or Page.
  2. Insert a Accordion block.
  3. Verify that the Edit as HTML action is not available for Accordion Items and Accordion Panels.

Screenshots or screencast

Before After
before-item after-item
before-panel after-panel

@shimotmk shimotmk self-assigned this Oct 6, 2025
@shimotmk shimotmk added [Type] Bug An existing feature does not function as intended [Block] Accordion Affects the Accordion Block labels Oct 6, 2025
@github-actions

github-actions Bot commented Oct 6, 2025

Copy link
Copy Markdown

Flaky tests detected in df5809f.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/18307657005
📝 Reported issues:

@github-actions

github-actions Bot commented Oct 7, 2025

Copy link
Copy Markdown

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: shimotmk <shimotomoki@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@shimotmk shimotmk requested review from Mamaduka and t-hamano October 7, 2025 11:47

@Mamaduka Mamaduka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Thanks, @shimotmk!

@shimotmk

shimotmk commented Oct 8, 2025

Copy link
Copy Markdown
Contributor Author

@Mamaduka
Thanks for the review. Can I merge it?

@Mamaduka

Mamaduka commented Oct 8, 2025

Copy link
Copy Markdown
Member

@shimotmk, of course.

@shimotmk shimotmk merged commit c6129ca into trunk Oct 8, 2025
79 of 80 checks passed
@shimotmk shimotmk deleted the fix/accordion-panel-item-disable-html-editing branch October 8, 2025 11:25
@github-actions github-actions Bot added this to the Gutenberg 21.9 milestone Oct 8, 2025
@Mamaduka

Mamaduka commented Oct 8, 2025

Copy link
Copy Markdown
Member

@shimotmk, it's not a big deal, but I would recommend editing the commit title before merging to match the PR title.

@shimotmk

shimotmk commented Oct 8, 2025

Copy link
Copy Markdown
Contributor Author

@Mamaduka
Thank you!
So everyone does that.
https://github.com/WordPress/gutenberg/commits/trunk/
I'll be more careful next time.

sidharthpandita1 pushed a commit to sidharthpandita1/gutenberg that referenced this pull request Oct 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Accordion Affects the Accordion Block [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants