[wp-trac] [WordPress Trac] #59867: Navigation Block Rendering: Move code to a class

WordPress Trac noreply at wordpress.org
Mon Nov 27 00:38:33 UTC 2023


#59867: Navigation Block Rendering: Move code to a class
---------------------------------------+---------------------
 Reporter:  scruffian                  |       Owner:  (none)
     Type:  enhancement                |      Status:  new
 Priority:  normal                     |   Milestone:  6.5
Component:  Editor                     |     Version:  trunk
 Severity:  normal                     |  Resolution:
 Keywords:  gutenberg-merge has-patch  |     Focuses:
---------------------------------------+---------------------
Changes (by isabel_brison):

 * keywords:  has-patch => gutenberg-merge has-patch
 * milestone:  Awaiting Review => 6.5


Comment:

 Thanks for opening this @scruffian !

 I'm afraid the patch won't work as it currently stands. Files inside `src
 /wp-includes/blocks/` get auto-generated from the `block-library` package,
 so this change would be discarded as soon as the build ran. Given the
 change is already in Gutenberg, once the npm packages are published they
 can be updated in core.

 One thing that would make this easier to review would be to convert the
 patch to a PR to https://github.com/WordPress/wordpress-develop (and that
 way we also get the tests to run on CI)

 My main question regarding the overall change is whether, given this class
 is tied to a block-library block, it would be better for it to live in
 block-library and go through the same auto-generation process when added
 to core. Having it outside, once the class is in core the Navigation block
 code will be split between two codebases which will make it harder to
 iterate on.

 Would be great to hear some more opinions on this! Cc @talldanwp
 @youknowriad @gziolo

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


More information about the wp-trac mailing list