-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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.
Description
- Part of Block API #41236.
In WordPress 6.7, work focused on important improvements to enhance the stability and simplicity of the Interactivity API internals, the introduction of new APIs like getServerState
/getServerContext
and wp_interactivity_get_element
, improvements to the types, and progress on the Gallery block lightbox and Query block’s Instant Search.
In WordPress 6.8, the primary focus will be on:
- Enhancing client-side navigation, advancing full page client-side navigation while addressing and improving the limitations of region-based client-side navigation.
- Finishing the lightbox of the Gallery Block and the Instant Search functionality for the Query and Search Blocks.
Work is also continuing to improve the documentation, 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.
Client-side navigation (priority)
- Find the best strategy to preload and replace all the CSS assets and HTML at the same time.
- iAPI Router: Handle styles assets on region-based navigation #67826
- Keep an eye on CSS with incremental ids outside of the regions.
- Ensure the load order of the different CSS assets is preserved
- Use the next page's import map on the imported script modules.
- Access the loading state on client-side navigation
- Make all properties returned by
getServerContext
andgetServerState
invalidate the computations when there’s navigation, even if the value doesn't change. - Review region-based settings (like the Query block) when full-page is enabled.
- Figure out if we need to whitelist all the compatible script modules.
- Add a way to subscribe to virtual pageviews.
- Make sure that client-side navigation is disabled when incompatible blocks are detected.
- Review how to inject
data-wp-interactive
in the body.
General enhancements
- Support
array.length
access in references on the server - Introduce
withEvent
and require Interactivity API actions that use the event object to use it - Add a loading indicator to the Query block that started the navigation
- Lazy loading of interactive blocks
- Add default for
data-wp-class
- Add default for
data-wp-style
- Improve typing of promises inside generators
- Deprecate
data-wp-ignore
Core blocks
- Query and Search blocks: Instant Search
- Gallery block: Lightbox
- Add support for lightbox overlay in region-based client-side navigation
- Image block
- Move styles to
data-wp-bind--style
- Move overlay inside the first image and create
data-wp-portal
(this needs more thinking)
- Move styles to
- Accordion block
- Tabs block
- Dialog block
Bug fixes
- iAPI: Fix the logic path that merges plain objects #68579
- Interactivity API: fix property modification from inherited context two or more levels above #66872
- Interactivity API: Fix reactivity of undefined objects and arrays added with
deepMerge
#66183 - iAPI: Don't error when
data-wp-each
getsundefined
#67174 - Interactivity API: Apply the same directive name restrictions as the client wordpress-develop#8048
- iAPI: Enforce correct namespaces in all places (directives, functions…) that accept a namespace #63749
- 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
- Differences in server/client directive negation
- Make directive suffix validation more strict on the server
- Stop serializing the derived state defined in the server as Closures.
- Check why
data-wp-bind--value
doesn't make aselect
element change its value when it does in Preact.
Optional
- Support for
data-wp-client-only-component
- Support for
data-wp-slot
anddata-wp-fill
- Support
array[0]
access in references - Add tests for
getElement()
attributes
- Release 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 handling
navigate()
failure states - Add better types for
getElement
'sref
andattributes
.
SantosGuillamot, sethrubenstein, michalczaplinski, hoado76 and treytallent
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.