Skip to content

Editor: Always iframe the post editor for block themes - #79819

Closed
t-hamano wants to merge 1 commit into
trunkfrom
feature/always-iframe-block-themes
Closed

t-hamano wants to merge 1 commit into
trunkfrom
feature/always-iframe-block-themes

Conversation

@t-hamano

@t-hamano t-hamano commented Jul 2, 2026 •

Copy link
Copy Markdown
Contributor

Alternatives to #74042

What?

Make the post editor always render inside an iframe when a block theme is active.

Why?

We aim to always render the post editor's canvas as an iframe in the future. This PR extends the conditions for forcing an iframe as a preliminary step towards a full migration, in accordance with the explanation in the 7.1 roadmap.

Testing Instructions

  1. Run IS_GUTENBERG_PLUGIN=false npm run dev
  2. Open the post editor.
  3. Register the v2 block using the following code.
wp.blocks.registerBlockType( 'my-plugin/v2-block', {
	apiVersion: 2,
	title: 'v2 block',
	edit: function () {
		return wp.element.createElement( 'p', wp.blockEditor.useBlockProps(), `v2 block` );
	},
} );
  1. Insert the v2 block.
  2. The editor remains an iframe.

Use of AI Tools

This PR was authored with the assistance of Claude Code (Claude Opus). All changes were reviewed by the author.

Enforce the iframed post editor whenever a block theme is active, using
the stable `getCurrentTheme()?.is_block_theme` API. Update the block API
migration docs to reflect the new condition.

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions github-actions Bot added the [Package] Edit Post /packages/edit-post label Jul 2, 2026
@t-hamano t-hamano added [Type] Enhancement A suggestion for improvement. Needs Dev Note Requires a developer note for a major WordPress release cycle labels Jul 2, 2026
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Size Change: +13 B (0%)

Total Size: 7.61 MB

📦 View Changed
Filename Size Change
build/modules/boot/index.min.js 51.1 kB -3 B (-0.01%)
build/scripts/edit-post/index.min.js 52.2 kB +17 B (+0.03%)
build/scripts/edit-site/index.min.js 298 kB -1 B (0%)

compressed-size-action

@t-hamano t-hamano self-assigned this Jul 2, 2026
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown

Flaky tests detected in 9cfd3f7.
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/28587848589
📝 Reported issues:

@t-hamano

t-hamano commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

Closing this in favor of #74042

@t-hamano t-hamano closed this Jul 8, 2026
@t-hamano
t-hamano deleted the feature/always-iframe-block-themes branch August 28, 2026 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs Dev Note Requires a developer note for a major WordPress release cycle [Package] Edit Post /packages/edit-post [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant