[wp-trac] [WordPress Trac] #59443: Block Supports: Re-use instance of Tag Processor when adding layout classes (was: Block Supports: Backport update from Gutenberg)

WordPress Trac noreply at wordpress.org
Mon Sep 25 19:12:37 UTC 2023


#59443: Block Supports: Re-use instance of Tag Processor when adding layout classes
---------------------------------------+------------------------------
 Reporter:  dmsnell                    |       Owner:  (none)
     Type:  enhancement                |      Status:  new
 Priority:  normal                     |   Milestone:  Awaiting Review
Component:  Editor                     |     Version:  trunk
 Severity:  normal                     |  Resolution:
 Keywords:  has-patch gutenberg-merge  |     Focuses:
---------------------------------------+------------------------------
Changes (by hellofromTonya):

 * keywords:  has-patch => has-patch gutenberg-merge


Old description:

> See WordPress/gutenberg#54075
>
> Refactors block supports to use a single Tag Processor instance and to
> only send a single class at a time to `add_class()`. This is preparatory
> work for a change in the Tag Processor so that its behavior more closely
> matches its naming (`add_class()` is singular and should only accept a
> single class).
>
> There should be no functional changes in this patch, though the re-use of
> the Tag Processor should have a negligible positive impact on
> performance.
>
> Since I'm not the author of the block supports code I'm at a disadvantage
> for scrutinizing the changes, though the update has been running fine in
> Gutenberg for three weeks. That suggests the most critical review
> necessary here is whether this patch is a proper backport from the
> Gutenberg code, since the two block supports functions are different in
> each repository.

New description:

 This ticket tracks the merging of
 [https://github.com/wordpress/gutenberg/pull/54075 Gutenberg PR 54075]
 into Core.

 Refactors block supports to use a single Tag Processor instance and to
 only send a single class at a time to `add_class()`. This is preparatory
 work for a change in the Tag Processor so that its behavior more closely
 matches its naming (`add_class()` is singular and should only accept a
 single class).

 There should be no functional changes in this patch, though the re-use of
 the Tag Processor should have a negligible positive impact on performance.

 Since I'm not the author of the block supports code I'm at a disadvantage
 for scrutinizing the changes, though the update has been running fine in
 Gutenberg for three weeks. That suggests the most critical review
 necessary here is whether this patch is a proper backport from the
 Gutenberg code, since the two block supports functions are different in
 each repository.

 References:
 * https://github.com/wordpress/gutenberg/pull/54075

--

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


More information about the wp-trac mailing list