Classic Block: Remove conversion from BlockInvalidWarning#79500
Conversation
Remove the 'Convert to Classic Block' option from the invalid block warning. This drops the canInsertClassicBlock selector, the toClassic converter, and the core/freeform secondary action, leaving Resolve and Convert to HTML.
BlockInvalidWarning
|
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 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. |
|
Size Change: -59 B (0%) Total Size: 7.51 MB 📦 View Changed
|
|
Flaky tests detected in 2c2998a. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/28115870488
|
What?
Removes the Convert to Classic Block option from the invalid block warning (
BlockInvalidWarning).Why?
The classic (
core/freeform) block is being de-emphasized and is hidden from the modern inserter. Offering "Convert to Classic Block" as a resolution for an invalid block steers users toward a legacy block we no longer want to promote. The remaining options — Attempt recovery, Resolve, and Convert to HTML — cover the relevant recovery paths.Part of #78067.
How?
In
packages/block-editor/src/components/block-list/block-invalid-warning.js:canInsertClassicBlockselector (thecanInsertBlockType( 'core/freeform', … )check).convert.toClassic()converter that created acore/freeformblock.secondaryActions.useSelectanduseMemodependency arrays accordingly.Testing Instructions
Testing Instructions for Keyboard
Same
Screenshots or screencast
Use of AI Tools
This PR was authored with assistance from Claude Code. All code was reviewed by the author before submission.