-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Interactivity API iteration for WordPress 6.7 #63232
Copy link
Copy link
Closed
Labels
[Feature] Interactivity APIAPI to add frontend interactivity to blocks.API to add frontend interactivity to blocks.[Type] IterationScoped iteration of an effort from a tracking issue or overview issue ideally for a major release.Scoped iteration of an effort from a tracking issue or overview issue ideally for a major release.
Metadata
Metadata
Assignees
Labels
[Feature] Interactivity APIAPI to add frontend interactivity to blocks.API to add frontend interactivity to blocks.[Type] IterationScoped iteration of an effort from a tracking issue or overview issue ideally for a major release.Scoped iteration of an effort from a tracking issue or overview issue ideally for a major release.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Done 😃
In WordPress 6.6, work was done to improve warnings integration with Preact DevTools, as well as adding directives for asynchronous event handlers and support for derived state on the server.
In WordPress 6.7, we will continue working on internal improvements to ensure that the Interactivity API's code is as simple and stable as possible and to make the Interactivity API resilient when used asynchronously (e.g., adding directives or stores after initialization). This will pave the way for performance improvements such as directive code splitting or lazy loading of interactive blocks.
In Core blocks, work will begin on the Gallery block lightbox and the Query block's Instant Search.
Apart from the work for WordPress 6.7, investigations will continue, with the most important being the exploration of how to improve assets management in region-based client-side navigation and experimenting with full-page client-side navigation. However, those will be tracked in its own Tracking Issue.
Work is also continuing to improve the documentation with enhancements in the API Reference and new explanatory guides tracked in the Interactivity API documentation's Tracking Issue.
This is the list of initial tasks, although we will edit this post as we progress and discover other things that we need to do.
Enhancements
deepMergelogicdeepMergefunction #64879getServerStateandgetServerContextgetServerState()andgetServerContext()#65151wp_interactivity_get_elementso it can be used in the derived state Closures to inspect the element attributes with$element['attributes'](using$p->get_attributes_with_prefix('')).withSyncEventand require Interactivity API actions that use theeventobject to use it #64944Core blocks (optional)
Bug fixes
withScopeto restore scope on thrown exception inside async functions #62555Cannot bind attributes to direct children ofdata-wp-each#60981proxifyContextwith context proxies insidewp-context#65090deepMerge()adds new properties #65135Optional
getElement()attributesdata-wp-client-only-componentnavigate()failure statesnavigate()Failure States #59856