This PR adds the onInteraction optional handler to interactive HVCs, which allows developers to handle user interactions in the HVCs in a way that is forward-compatible with a JSON API. This replaces the earlier __internal_callbacks__ handler from before which was not exposed to developers.
All HVCs will call onInteraction for interactions designed for developer response with a monolithic object payload like { event, target, subject, action } for Toolbar and List, { event, target, formState } for Forms, and { event, target, items } or { event, target, lanes } for Boards.
We may like to iterate on this schema.
Please note that lanes updates from Board are misrepresented in Storybook; object key order is guaranteed in this library's target dialects, but Storybook sorts object keys alphabetically when displaying them.
Open in Storybook ↗️
This PR adds the
onInteraction
optional handler to interactive HVCs, which allows developers to handle user interactions in the HVCs in a way that is forward-compatible with a JSON API. This replaces the earlier__internal_callbacks__
handler from before which was not exposed to developers.All HVCs will call
onInteraction
for interactions designed for developer response with a monolithic object payload like{ event, target, subject, action }
for Toolbar and List,{ event, target, formState }
for Forms, and{ event, target, items }
or{ event, target, lanes }
for Boards.We may like to iterate on this schema.
Please note that
lanes
updates from Board are misrepresented in Storybook; object key order is guaranteed in this library's target dialects, but Storybook sorts object keys alphabetically when displaying them.