Remove warning for enqueued styles in Editor#37937
Conversation
|
Size Change: -178 B (0%) Total Size: 1.13 MB
ℹ️ View Unchanged
|
|
Can we clarify more what are the exceptions that can't be solved? In other words, if the warning is shown, in what case it can't be solved by the plugin/theme author by changing the loading method of its stylesheet? AFAIK, it's only dynamic styles which is fairly a rare case but maybe I'm missing something? |
|
Personally I'm not sure the warning does any harm, I'd like to understand more why you think that. |
|
@youknowriad The warning assumes that the only viable scenarios for adding styles to the editor is one of the following:
If it's styles for a block, then the recommendation is to use the block-API to add the styles. The problem is that this doesn't account for any other scenarios. So if a plugin needs to add a stylesheet to the editor (without that stylesheet being related to a specific block), then there's nothing they can do. Ideally, plugins would also be able to use the |
Interesting, Indeed that seems problematic, I thought the function worked for plugins as well and the only limitation was "dynamic stylesheets". It makes sense to give this more time then. Can we create a todo list issue to bring this back as it's an important piece of the puzzle to iframe the post editor. |
|
I'll create a to-do issue. |
|
Makes sense. 👍 In the meantime, for WP5.9, are you OK with merging this one @youknowriad? |
|
@aristath yes, let's get this one in. |
Description
It was discussed in yesterday's core editor chat.
I think @aristath summarized it well:
The actual work to fix the issue continues in #37466.
Related Trac ticket: https://core.trac.wordpress.org/ticket/54752
Types of changes
Bugfix
Checklist:
*.native.jsfiles for terms that need renaming or removal).