-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enqueue registered block assets and resolve iframe styles e2e failure #50185
Enqueue registered block assets and resolve iframe styles e2e failure #50185
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting up this quick fix @oandregal! I just pushed a tiny commit to fix some PHP linting complaints, but otherwise this looks good and the priority of 1
matches the order in which callbacks were enqueued in trunk
prior to the removal in WordPress/wordpress-develop#4356. I suppose it's still technically quite a bit higher priority being set to 1
rather than the first position in default 10
, but I don't see that being an issue, and it sounds like it'd be a quick change to fix it up if it winds up causing problems.
LGTM! ✨
This PR doesn't appear to cause any issues, gets the e2es passing again, and would be easy to revert if it does cause any problems. Since this will help unblock merging new PRs, I'll merge this in now. Thanks again for putting this PR up @oandregal! |
* Enqueue again the registered assets * Document and protect against 6.1 and 6.2 * Make sure the action runs earlier, as if it was from core * Make linter happy * Fix linting issues --------- Co-authored-by: Andrew Serong <14988353+andrewserong@users.noreply.github.com>
It seems that the change in core did not only break the order in the iframe, but also the order outside the iframe. One could argue that the test plugin is not properly declaring dependencies, but I tried adding So I'm now wondering if we should investigate the trunk change and somehow change the ordering back or revert that change. |
This reverts commit 3b86c62.
Follow-up: WordPress/wordpress-develop#4498 is reverting the core change. |
This reverts commit 3b86c62.
What
Temporary fix for iframe compat layer.
WordPress/wordpress-develop#4356 was merged into core at WordPress/wordpress-develop@5c247f7 recently. Since then, the
packages/e2e-tests/specs/editor/plugins/iframed-inline-styles.test.js
e2e test is failing because it uses the Wordpresstrunk
.Why
The compat-layer of the iframe loads certain stylesheets based on whether they have a
.wp-block-
.Before the change above, the stylesheets follow this order:
After the change above, the stylesheets follow this order:
Note how
test-iframed-inline-styles-editor-style-css
loads AFTERiframed-inline-styles-compat-style-css
, which is the reason for the e2e to fail.How
The core commit expose a bug in the iframe that we should address. This PR is a temporary fix to "revert" the core commit from Gutenberg.
An alternative would be to skip the test for now.