[wp-trac] [WordPress Trac] #59462: Blocks: Introduce a way to enqueue view scripts only when needed for interactivity

WordPress Trac noreply at wordpress.org
Tue Jan 30 08:58:55 UTC 2024


#59462: Blocks: Introduce a way to enqueue view scripts only when needed for
interactivity
-------------------------+-----------------------
 Reporter:  gziolo       |       Owner:  (none)
     Type:  enhancement  |      Status:  assigned
 Priority:  normal       |   Milestone:  6.5
Component:  Editor       |     Version:  6.4
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:
-------------------------+-----------------------

Comment (by luisherranz):

 I haven't started exploring how to describe the assets required for an
 interactive block yet.

 In my opinion, this is not a 1:1 relation (one block, one set of assets)
 like what we have now in `block.json`, but more of a 1:many relation where
 one block could have multiple _interactive behaviors_ on the frontend, and
 the user should be able to choose and configure them in the UI. Third-
 party plugins should also be able to add _new behaviors_ to existing
 blocks.

 Related to this, @westonruter has started exploring how to lazy load
 interactive blocks:

 - https://github.com/WordPress/gutenberg/pull/58284

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


More information about the wp-trac mailing list