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

Social Icons: Disable edit as HTML support #69374

Merged

Conversation

shimotmk
Copy link
Contributor

@shimotmk shimotmk commented Mar 1, 2025

What?

This PR disables HTML editing support for list blocks.
A similar PRs: #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 Social Icons block.
  3. Confirm "Edit as HTML" action isn't available in block Options.

Screenshots or screencast

Before After
before after

Copy link

github-actions bot commented Mar 1, 2025

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: t-hamano <wildworks@git.wordpress.org>

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

@t-hamano t-hamano added [Type] Bug An existing feature does not function as intended [Block] Social Affects the Social Block - used to display Social Media accounts labels Mar 2, 2025
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

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

LGTM! Given the rules in other blocks, this PR makes sense.

@t-hamano t-hamano added the props-bot Adding this label triggers the Props Bot workflow for a PR. label Mar 2, 2025
@github-actions github-actions bot removed the props-bot Adding this label triggers the Props Bot workflow for a PR. label Mar 2, 2025
@t-hamano t-hamano merged commit 7c02f29 into WordPress:trunk Mar 2, 2025
68 of 72 checks passed
@github-actions github-actions bot added this to the Gutenberg 20.5 milestone Mar 2, 2025
@shimotmk
Copy link
Contributor Author

shimotmk commented Mar 2, 2025

Thanks for the review!

@shimotmk shimotmk deleted the fix/social-links-disable-html-editing branch March 2, 2025 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Social Affects the Social Block - used to display Social Media accounts [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