Iframed editor: add Masonry integration e2e test#33008
Merged
youknowriad merged 3 commits intotrunkfrom Jun 28, 2021
Merged
Conversation
ellatrix
commented
Jun 26, 2021
| Promise.resolve() | ||
| ) | ||
| .finally( () => { | ||
| setIframeDocument( contentDocument ); |
Member
Author
There was a problem hiding this comment.
This is needed so defaultView.Masonry is available when the block renders. Let's see what impact this has on loading time. Ideally we should render blocks immediately and only delay rendering blocks with script dependencies.
|
Size Change: +24 B (0%) Total Size: 1.05 MB
ℹ️ View Unchanged
|
d9560f2 to
7f26fda
Compare
youknowriad
approved these changes
Jun 28, 2021
Contributor
|
The site editor (framed) looks a little bit slower but maybe the difference is fine given the need for this? |
Member
Author
|
Not sure why it would be slower, there's only 1 additional re-render after scripts load. The time may be off. This would be where extra metrics could be useful. |
youknowriad
pushed a commit
that referenced
this pull request
Jun 28, 2021
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.
Description
Masonryis a good example of a third party library that doesn't work normally in the iframed editor.Masonryhas some dependencies that use thewindowanddocumentglobals to check sizes and resizing. To make it work correctly, we need to use the script loaded in the iframe instead of the script loaded in the parent window.How has this been tested?
Screenshots
Types of changes
Checklist:
*.native.jsfiles for terms that need renaming or removal).