Skip to content

Blocks: Improve Site Editor Support#2233

Merged
Misplon merged 148 commits intodevelopfrom
improve-site-editor-support
Oct 13, 2025
Merged

Blocks: Improve Site Editor Support#2233
Misplon merged 148 commits intodevelopfrom
improve-site-editor-support

Conversation

@AlexGStapleton
Copy link
Copy Markdown
Member

@AlexGStapleton AlexGStapleton commented Jul 14, 2025

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))

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.
@AlexGStapleton AlexGStapleton self-assigned this Jul 14, 2025
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.
@Misplon Misplon merged commit 8326a53 into develop Oct 13, 2025
@Misplon Misplon deleted the improve-site-editor-support branch October 13, 2025 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants