You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Master tracking issue: #44251 ET tracking issue: #46489
global-styles is dependant on experimental features without a fallback for a scenario where such a feature is not supported anymore. Below is a list of usages that we need to update in this matter:
👋 I've received the pings and would like to understand how can I help here: is it your goal to audit if an unstable/experimental usage is ok or does it need updating based on WordPress 5.6 stabilization task?
This is what I can say about the code for Global Styles: apparently, __unstableIsEditorReady was introduced as a patch specific for WordPress.com/iframed editor at #40690 It is an API that will remain as it is for the time being, so it's safe to keep using it.
In case the goal was to remove any unstable/experimental API. From what I gathered reading that issue, it looks like the problem was that the stylesheet generated in the client by the Global Styles plugin upon user changes needs to be appended after Gutenberg's own editor styles (which is somehow messed up by the iframed editor). This is what's happening:
GS (server) sends to the block editor some pre-calculated styles via the block_editor_settings, so they are wrapped by the .editor-style-wrapper.
GS (client) adds a new styleshet with new styles if the user made any changes. This needs to be loaded after 1.
A few alternatives that come to mind to get rid of the __unstableIsEditorReady would be:
given that user changes can only happen when the sidebar is mounted, etc, is there any other editor event this can be hooked to?
change how the styles work for the editor: do not send the existing pre-calculated styles and instead generate them all in the client.
Master tracking issue: #44251
ET tracking issue: #46489
global-styles
is dependant on experimental features without a fallback for a scenario where such a feature is not supported anymore. Below is a list of usages that we need to update in this matter:wp-calypso/apps/editing-toolkit/editing-toolkit-plugin/global-styles/src/dom-updater.js
Line 33 in 720b5da
The text was updated successfully, but these errors were encountered: