Blocks: Improve Site Editor Support#2233
Merged
Conversation
The Site Editor previews all blocks in an iframe that's completely separate from the regular editor. This results in a disconnect between the available assets in and out of the iframe. This change copies over required assets, and WP templates for WB form fields to work as expected.
There's still some issues with the field in repeaters, but this is the bulk of the required changes.
The image importing functionality doesn't currently work. This is due to the field being inside of the iframe, and how WP handles that.
The clone process by WP doesn't always succeed. It's much more reliable if we do it ourselves.
Undo link doesn't work as expected.
This is a core admin class that's not found in the Site Editor Canvas.
This commit includes changes aimmed to prevent potential desyncs and reflows in the site editor while testing.
This commit includes changes aimmed to prevent potential desyncs and reflows in the site editor while testing.
This commit includes changes aimmed to prevent potential desyncs and reflows in the site editor while testing.
I really wish Act could test this part
Really wish Act would be able to simulate this part better.
Misplon
approved these changes
Oct 13, 2025
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.
This PR adds Widgets Block compatibility for the Site Editor. The Site Editor uses an iframe (known internally in WordPress as Canvas) to provide isolation to Blocks from admin styles. Unfortunately, none of the widget bundle fields were compatible by default and needed alterations to account for the Site editor canvas being inside an iframe.
This PR also adds end-to-end testing (e2e) through Playwright. Playwright test code found in the siteorigin/siteorigin-tests-common repo.
Testing instructions can be found here](#2233 (comment))