-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Remove legacy logic for __unstableResolvedAssets
#51100
Conversation
__unstableResolvedAssets
Because _gutenberg_get_iframed_editor_assets is the only callback for setting __unstableResolvedAssets we no longer need to increase the priority.
@@ -80,6 +80,5 @@ function( $settings ) { | |||
// We must override what core is passing now. | |||
$settings['__unstableResolvedAssets'] = _gutenberg_get_iframed_editor_assets(); | |||
return $settings; | |||
}, |
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.
Because gutenberg_resolve_assets_override
is removed, _gutenberg_get_iframed_editor_assets
no longer needs to increase the priority for it to run later. It will be now the only callback for setting __unstableResolvedAssets
. I see it was introduced https://github.com/WordPress/gutenberg/pull/49655/files#diff-d66c57d67603bf45e2664289929b228b0eb69b037553b5c35a3497182a7e17d5R84
$style_handles[] = 'wp-block-library-theme'; | ||
} | ||
|
||
if ( 'widgets.php' === $pagenow || 'customize.php' === $pagenow ) { |
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.
@ellatrix Is there any part of this that we should have at _gutenberg_get_iframed_editor_assets
? This bit for the widgets screen caught my eye.
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.
We should check that in #50091, but as far as I could tell, these editors were not iframed.
Flaky tests detected in 78af900. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/5123318458
|
What?
This removes the
_gutenberg_resolve_assets_override
function that lives atlib/compat/wordpress-6.2/script-loader.php
.Why?
The purpose of that function is to prepare the data for the
__unstableResolvedAssets
setting. However, we already do that in the _gutenberg_get_iframed_editor_assets function that lives atlib/compat/wordpress-6.2/script-loader.php
, so it loads later. We don't want to run the same logic twice.How?
Remove the older code.
Testing Instructions
Verify that iframe tests pass.