Description
- Part of Block API #41236.
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
- Refactor internal proxy and signals system
- Refactor the
deepMerge
logic - Refactor internal context proxy
- Add support for
getServerState
andgetServerContext
- Refactor types, support generator <-> promise transformations, add tests and fix overloads
- Add
wp_interactivity_get_element
so it can be used in the derived state Closures to inspect the element attributes with$element['attributes']
(using$p->get_attributes_with_prefix('')
). - Lazy loading of interactive blocks
- Introduce
withSyncEvent
and require Interactivity API actions that use theevent
object to use it #64944
Core blocks (optional)
- Query and Search blocks: Instant Search
- Gallery block: Lightbox
- Accordion block
- Tabs block
Bug fixes
- iAPI: Merge of state and context after client-side navigation #63864
- Interactivity: Fix
withScope
to restore scope on thrown exception inside async functions #62555 -
Cannot bind attributes to direct children ofdata-wp-each
#60981 - Interactivity API: Inability to use plain arrays in context #63651
- Interactivity API: Fix context inheritance from namespaces different than the current one #64677
- Interactivity API: Prevent calling
proxifyContext
with context proxies insidewp-context
#65090 - Interactivity API: Update iterable signals when
deepMerge()
adds new properties #65135 - Interactivity API page restoring breaks embedded SPA apps with routing #60455
- iAPI Router: don't remove region when it's not present in the new page #63249
- iAPI: Enforce correct namespaces in all places (directives, functions…) that accept a namespace #63749
Optional
- Add tests fro
getElement()
attributes
- Official syntax for unique-ids
- Review all errors and make them more consistent
- Allow async directive registration
- Show directive names in Preact's dev tools
- Keep improving TypeScript support
- Support for
data-wp-client-only-component
- Support handling
navigate()
failure states
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Status