-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Site Editor: restore block-library editor.css outside canvas #66556
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
This PR works for me. My only concern is that deleting wp_enqueue_style(
'my-block-common',
'path/to/block-common.css'
array( 'wp-edit-blocks' )
); I searched the WP Directory and it seems that a lot of plugins enqueue styles that depend on the |
|
What I mean is: nothing about |
If developers are adding a Relying on |
@t-hamano I'm not sure I understand. Do you mean:
Or:
|
Sorry, maybe I misunderstood. I don't think this PR is a breaking change. Let me explain a bit more.
Is my understanding correct? Also, if we go ahead with this PR, do we also need a backport PR to core? |
@t-hamano Ah, in that case, this PR will not make any difference? Because merely adding Yes, I'll add it to WordPress/wordpress-develop#7643 :) |
In fact, it will actually undo the removal of this PR because the action is called outside the canvas: https://github.com/WordPress/wordpress-develop/blob/695476ea5e51d1c92f389ac236b138ceeaee8a99/src/wp-admin/site-editor.php#L177 |
Flaky tests detected in 4c7d42e. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11578911527
|
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.
Thank you for the detailed explanation.
I may not understand everything correctly, but if this PR does not affect backward compatibility, I think it's okay to ship it.
If this PR is shipped, will WordPress/wordpress-develop#7643 be updated?
BTW, should this PR be backported to Gutenberg 19.6? It looks like 19.6 RC1 is just about ready. |
@t-hamano Yes, I'll update the core PR. Thank you for the review! |
I'll check with the person doing the release. |
I just cherry-picked this PR to the release/19.6 branch to get it included in the next release: 3736840 |
Co-authored-by: ellatrix <[email protected]> Co-authored-by: t-hamano <[email protected]>
@Mamaduka Ah, will fix |
…ss#66556) Co-authored-by: ellatrix <[email protected]> Co-authored-by: t-hamano <[email protected]>
What?
In #66544 @t-hamano observed that a bit too many styles have been removed in #66432. Indeed, it should have kept loading
editor.css
files defined by blocks because they target both content and UI outside the canvas. The remaining styles should still be removed though.One light problem is that all the styles we want to remove are added as dependencies of
wp-edit-blocks
. So restoringwp-edit-blocks
will add back all the styles we don't want. To fix the issue we can register a separate handlewp-block-library-editor
, which exclusively loads the editor styles.Why?
Fix a regression from #66432.
How?
Testing Instructions
In content only mode, select an image and click the "alternative text" button in the toolbar.
Testing Instructions for Keyboard
Screenshots or screencast