-
Notifications
You must be signed in to change notification settings - Fork 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
CoBlocks: Correct example image URLs. #37195
Conversation
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
Server-side changes: D34792-code. |
Updated this to no longer rely on server-side changes. |
This isn't working at the moment; I don't think any blocks are passing the initial checks in |
78a496b
to
1c73ad4
Compare
It looks like CoBlocks blocks aren't registered at the time the filter is called; logging every name that goes through |
I think it's actually this registration, but yeah it's the same problem (scripts enqueued on |
If it's that much of an issue, we can maybe dispatch to the redux store on dom ready or unstable editor init, but it's not ideal. |
For comparison, our own FSE plugin register blocks on |
Note that we have dynamic blocks (server-side rendered) and regular blocks (full JS). Dynamic blocks need to be registered with On the other hand, regular blocks are registered with CoBlocks also have dynamic blocks and regular blocks. Dynamic blocks are registered on |
I just noticed that the script is not even being enqueued there, it's just being registered (although it's obviously enqueued somewhere, because we still get our regular blocks registered). Trying the obvious stuff of switching to |
Noting that this won't be needed once we activate 1.17.1 on production since the previews use now images hotlinked from Wikimedia Commons. |
Closing in favour of the upcoming |
This PR filters certain CoBlocks settings to correct example image URLs.
Testing instructions
widgets.wp.com
.wpcom-block-editor
app from this branch, and transfer to your sandbox.$__autogen_cache_buster_wpcom_block_editor
.Fixes #37096