[wp-trac] [WordPress Trac] #53569: Block widgets editor is hidden if a block enqueues 'wp-edit-post' stylesheet

WordPress Trac noreply at wordpress.org
Wed Jul 7 01:29:11 UTC 2021


#53569: Block widgets editor is hidden if a block enqueues 'wp-edit-post'
stylesheet
--------------------------+---------------------
 Reporter:  dlh           |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.8.1
Component:  Widgets       |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+---------------------

Comment (by dlh):

 > `wp-edit-post` (`@wordpress/edit-post`) is the package containing
 scripts and styles that implement the post block editor (`edit.php`). It
 shouldn't be enqueued in the widgets block editor (`widgets.php`).

 Enqueuing `wp-edit-post` would be one thing, but, in this case, the
 offending block in this case only declared it as a dependency so as to
 define the load order of stylesheets in the editor.

 True, under the hood, declaring it as a dependency amounts to the same
 thing as enqueuing it. Until now, it has been harmless to do so, and if
 there's documentation from previous releases advising against it, then I
 just missed it.

 So, if providing backwards compatibility is as straightforward as the
 patch by @manzurahammed suggests, then I would still hope that core could
 provide that affordance to developers to save them a surprise.

 Alternatively, if core knows that `wp-edit-post` shouldn't be enqueued in
 the widgets block editor, perhaps there should be protections in core
 against that happening, although I don't know what kind of precedent there
 is for such protections.

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


More information about the wp-trac mailing list