Skip to content

Classic block: Remove migration notice and restore inserter availability - #79894

Merged
tyxla merged 2 commits into
trunkfrom
revert/classic-deprecation-notice-and-hiding
Jul 6, 2026
Merged

tyxla merged 2 commits into
trunkfrom
revert/classic-deprecation-notice-and-hiding

Conversation

@tyxla

@tyxla tyxla commented Jul 6, 2026 •

Copy link
Copy Markdown
Member

What?

This reverts the recent Classic (Freeform) block deprecation work:

  • Removes the Classic block migration notice and restores the block's pre-experiment editing UX (the "Convert to blocks" toolbar button and the original placeholder message).
  • Makes the Classic block available in the inserter again by dropping the window.__needsClassicBlock gate in freeform/init.
  • Removes the wp_classic_block_supports_inserter filter (and its PHP tests). This filter never made it into a WordPress release.

Why?

The deprecation notice and inserter gating are being reverted. The inserter-gating filter never shipped in a WordPress release, so it can be removed cleanly.

See #78067 (comment) for more info.

How?

  • Deleted packages/block-library/src/freeform/migration-notice.js and reverted freeform/edit.js to its pre-experiment state, re-adding freeform/convert-to-blocks-button.js.
  • Simplified freeform/init to initBlock( { name, metadata, settings } ) so supports.inserter falls back to its true default.
  • Deleted lib/compat/wordpress-7.1/classic-block.php and its require in lib/load.php, and removed the corresponding tests in phpunit/script-loader-test.php.
  • Reverted the classic.spec.js E2E assertions to click the "Convert to blocks" toolbar button.

Testing Instructions

  1. Add a Classic block from the inserter — it should be available.
  2. Add some content, then use the "Convert to blocks" toolbar button — content should convert to blocks.
  3. Confirm no migration/deprecation notice is shown.

🤖 Generated with Claude Code

Remove the Freeform (Classic) block migration notice and revert the
Classic block deprecation UX to its pre-experiment state, restoring the
"Convert to blocks" toolbar button and the original placeholder.

Also stop hiding the Classic block from the inserter: drop the
`window.__needsClassicBlock` gate in `freeform/init` and remove the
`wp_classic_block_supports_inserter` filter, which never shipped in a
WordPress release, along with its tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the [Package] Block library /packages/block-library label Jul 6, 2026
@tyxla tyxla added Needs PHP backport Needs PHP backport to Core [Type] Enhancement A suggestion for improvement. labels Jul 6, 2026
@tyxla tyxla self-assigned this Jul 6, 2026
@github-actions

ghost commented Jul 6, 2026

Copy link
Copy Markdown

Size Change: -290 B (0%)

Total Size: 7.67 MB

📦 View Changed
Filename Size Change
build/scripts/block-library/index.min.js 332 kB -290 B (-0.09%)

compressed-size-action

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@tyxla
tyxla marked this pull request as ready for review July 6, 2026 12:21
@tyxla tyxla added [Block] Classic Affects the Classic Editor Block and removed Needs PHP backport Needs PHP backport to Core labels Jul 6, 2026
@tyxla
tyxla requested a review from youknowriad July 6, 2026 12:22

ghost left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks good to me.

Reverts suck when we invested time but we learn and iterate

@github-actions

ghost commented Jul 6, 2026

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: tyxla <tyxla@git.wordpress.org>
Co-authored-by: youknowriad <youknowriad@git.wordpress.org>

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

@tyxla

ghost commented Jul 6, 2026

Copy link
Copy Markdown
Member Author

Going to merge - the e2e test failure is not related, and is also failing on this PR: #79886

@tyxla
tyxla merged commit 03a0ed8 into trunk Jul 6, 2026
@tyxla
tyxla deleted the revert/classic-deprecation-notice-and-hiding branch July 6, 2026 13:19
@github-actions github-actions Bot added this to the Gutenberg 23.6 milestone Jul 6, 2026
@t-hamano t-hamano added the Backport to Gutenberg Minor Release Pull request that needs to be backported to a Gutenberg minor release label Jul 11, 2026
@t-hamano

ghost commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

This PR was manually cherry-picked to the release/23.5 branch. #80164

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Block] Classic Affects the Classic Editor Block [Package] Block library /packages/block-library [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants