feat: Canvases in iframes#656
Draft
stravo1 wants to merge 9 commits into
Draft
Conversation
Centralize cross-frame DOM and drag handling so canvas interactions use a single coordinate conversion and listener lifecycle. - consolidate resize, spacing, block movement, panning, and insertion drags - manage event forwarding and drop-zone cleanup per iframe registration - remove obsolete outer overlay and unused frame document state - preserve editable targets when forwarding iframe events - fix HTML editor double-click and context-menu dispatch inside frames - initialize fonts after teleported canvas elements are mounted - keep iframe styles, classes, and theme attributes synchronized - consolidate async client-script cleanup and error handling - prevent history from remaining paused when insertion targets disappear - remove leftover event and history debug logging Verification: - production frontend build passes - touched iframe modules pass focused TypeScript checking - browser and Cypress testing left for manual verification
Execute attached page-level JavaScript and CSS inside each rendered breakpoint iframe. - apply page CSS continuously in attachment order - run page JavaScript through the existing restricted or unrestricted canvas sandbox - expose iframe document, window, events, and page_data where allowed - reuse the existing Run, Stop, and Refresh canvas controls - recreate frames when scripts, page data, settings, or pages change - preserve script ordering when loading page client scripts - synchronize attached scripts after create, attach, update, rename, remove, and reorder operations - keep the existing execute_block_scripts_in_editor field for compatibility while updating its label to cover all client scripts - retain existing block and component script behavior
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #656 +/- ##
===========================================
+ Coverage 56.19% 56.53% +0.34%
===========================================
Files 34 34
Lines 4077 4109 +32
===========================================
+ Hits 2291 2323 +32
Misses 1786 1786 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Render each responsive canvas breakpoint inside an isolated iframe.
This makes the editor canvas behave more like the published page by separating its DOM, styles, events, and client scripts from the Builder interface.
Screen.Recording.2026-07-02.at.11.51.21.PM.mp4
Screen.Recording.2026-07-02.at.11.51.53.PM.mp4