Repository navigation
Conversation
|
Size Change: -1.25 kB (-0.02%) Total Size: 7.91 MB 📦 View Changed
|
|
Flaky tests detected in 338f1a2. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/33212021549 should insert media, convert to blocks, and undo in one step in
|
The classic meta boxes now render in two iframes loading the classic edit screen through the meta box loader URL: one in the bottom pane for the normal and advanced locations, one in the settings sidebar for the side location. The loader page trims the screen down to the meta boxes, sends the same Document-Isolation-Policy header as the editor, and rewrites dimension media queries so styles respond to the editor window instead of the iframe. Saving dispatches a submit event in each iframe so submit handlers and TinyMCE write their values, then collects the fields with the browser's form serialization. The editor page no longer renders the meta boxes at all. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ellatrix
force-pushed
the
try/meta-box-iframe
branch
from
August 28, 2026 21:19
c4feac1 to
338f1a2
Compare
ellatrix
changed the base branch from
restore-revisions-on-the-server
to
trunk
August 28, 2026 21:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Renders classic meta boxes in iframes that load the classic edit screen, instead of moving server rendered markup into the editor page. This is the rendering swap only. Refreshing the boxes on revision restore builds on top of it in a follow up.
Why?
Classic meta boxes are PHP rendered snapshots that the editor moves around its own DOM and cannot re-render. An iframe gives them a real classic document of their own: classic scripts run natively with no deferred initialization, their markup and styles cannot collide with the editor, and the document can be loaded again at any time, which gives features like revision restore and collaboration a way to bring the boxes up to date.
How?
sidelocation, which sizes itself to its content, and one in the bottom pane fornormalandadvanced.@mediaconditions through the CSSOM toallornot allbased onparent.matchMedia(), keeps them updated on window resizes, and wrapswindow.matchMediathe same way. Desktop minimum widths are overridden where the sidebar is narrower than they allow.Document-Isolation-Policy(for client side media processing), and an isolated document cannot script same origin frames that are not isolated the same way. The loader page sends the same header under the same conditions.submitevent is dispatched in each iframe so meta boxes that serialize their values in submit handlers run first (TinyMCE saves its editors from its own submit handler, and a dispatched event never actually submits the form), then the fields inside the meta boxes are collected with the browser's own form serialization, merged with the base form data, and posted to the meta box loader as before.Known gaps
Testing Instructions
gutenberg-test-plugins/side-meta-box-demotest plugin.Testing Instructions for Keyboard
Tab from the editor into the meta box pane and sidebar boxes; fields, postbox toggles, and the move buttons are reachable and operable with the keyboard inside the iframes.
Screenshots or screencast
Use of AI Tools
Written with the assistance of Claude Code, reviewed and tested by hand.