[wp-trac] [WordPress Trac] #53327: Twenty Twenty editor stylesheet causing issues on block Widgets screen

WordPress Trac noreply at wordpress.org
Tue Jun 15 01:56:07 UTC 2021


#53327: Twenty Twenty editor stylesheet causing issues on block Widgets screen
---------------------------+---------------------
 Reporter:  isabel_brison  |       Owner:  (none)
     Type:  defect (bug)   |      Status:  new
 Priority:  normal         |   Milestone:  5.8
Component:  Bundled Theme  |     Version:
 Severity:  normal         |  Resolution:
 Keywords:                 |     Focuses:
---------------------------+---------------------

Comment (by noisysocks):

 > Perhaps what is needed is a 'load_blocks' sort of hook, that could be
 called from the editor and from any new pages that involve blocks. That
 way, blocks that want to participate would hook to that.

 Is this not what `enqueue_block_editor_assets` is though? The post editor,
 widgets editor, and site editor are all "block editors" hence why the hook
 is fired. It's similar to `get_current_screen()->is_block_editor()`.

 The problem with adding a new hook is that it means third party blocks
 will not work by default in the widgets editor (or site editor, when it is
 added) which is far from ideal. Many plugins use
 `enqueue_block_editor_assets` to enqueue the scripts and styles needed by
 their third party blocks because this is what the official block editor
 documentation says to do.

 https://wpdirectory.net/search/01F86NNZW3NEPJ32DNRTDXZP8V

 @youknowriad @gziolo: What do you think about splitting
 `enqueue_block_editor_assets` into more discrete hooks?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/53327#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list