[wp-trac] [WordPress Trac] #57643: Remove deprecated @wordpress/nux and replace with empty script and style

WordPress Trac noreply at wordpress.org
Mon Feb 6 22:10:54 UTC 2023


#57643: Remove deprecated @wordpress/nux and replace with empty script and style
-------------------------------------------------+-------------------------
 Reporter:  youknowriad                          |       Owner:  (none)
     Type:  enhancement                          |      Status:  new
 Priority:  normal                               |   Milestone:  6.2
Component:  Editor                               |     Version:  5.0
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch gutenberg-merge needs-     |     Focuses:
  dev-note 2nd-opinion close                     |
-------------------------------------------------+-------------------------
Changes (by peterwilsoncc):

 * keywords:  has-patch gutenberg-merge needs-dev-note 2nd-opinion => has-
     patch gutenberg-merge needs-dev-note 2nd-opinion close


Comment:

 To log my concerns posted on the original PR.

 The argument for hard deprecating JavaScript APIs is that there is a
 performance benefit from doing so. However, deleting a package that is
 unused by WordPress Core doesn't provide such a benefit, the file is only
 enqueued if a theme or plugin developer is using it.

 Any performance gain from the original PR comes from a bug fix: removing
 the unused CSS dependencies for `wp-edit-post` and `wp-editor`. Based on
 the discussion in the original PR, this could have been done a while ago.
 The same performance gain is achieved by my [https://github.com/WordPress
 /wordpress-develop/pull/3910 alternative pull request] without breaking
 backward compatibility.

 To address each of the items in the list above:

 Item one is likely to break more than just features using `wp-nux`. Build
 tools are ubiquitous -- and encouraged via wp-scripts -- so many themes
 and plugins using `wp-nux` will find none of their JavaScript is enqueued.

 Item two seems like additional work for no gain. WordPress doesn't see any
 performance improvements. It's contributor time spent breaking a feature
 that doesn't need to be broken.

 Item three is incorrect: the package has been logging warnings,
 `console.warn`, for some time but the script does not cause JavaScript
 errors and functions as intended for theme and plugin developers.

 There is precedent for retaining scripts no longer used by WordPress Core
 in the code base to maintain backward compatibility, `jquery-forms` hasn't
 been used for some time but is maintained. There is no performance impact
 from doing so.

 In my view, removing `wp-nux` is a WordPress developer convenience at the
 expense of backward compatibility for theme an plugin developers. Nothing
 is lost from retaining it.

 I think this ticket can be closed as `wontfix`.

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


More information about the wp-trac mailing list