Commit f7ff72f
feat(plugins): add hover callbacks and interactive row/column nodes. (#3470)
* feat(plugins): expose onHover callback on button, box, and image nodes
Delivers pointer enter/leave to plugin UI trees as an onHover callback
with a "true"/"false" argument, mirroring the toggle onChange
convention. Buttons use their existing enter/leave hooks; box/image
reuse the click wrapper, which now carries an empty button mask when
hover-only so it never swallows clicks meant for ancestors.
Assisted with AI tooling.
* feat(plugins): expose onClick and onHover on row and column nodes
Plugin pills need a clickable, hoverable container with a text child:
box supports onClick but is a leaf, and buttons are the wrong control
for pill shapes (#3355 review). Rows and columns already carry fill/
radius/padding, so let them take the same onClick/onHover props as
box and image.
Wrapped containers use a new ClickWrap InputArea that forwards
measure/arrange to its single child: a plain InputArea never
self-sizes, and the explicit size mirroring box/image rely on cannot
work for a content-sized flex.
Clickable wrappers also gain keyboard activation to keep parity with
Button: focusable, and the Validate keybind fires onClick. The same
activation applies to existing clickable box/image wrappers, which now
use ClickWrap and enter the tab order. No visual focus state is drawn
or exposed for containers yet.
Wrapper input handlers deviate from the reconciler's
retain-absent-props default: an empty callback name counts as unset,
and removing onClick/onHover while the other callback keeps the
wrapper alive clears the stale handler, button mask, and focusability
— a retained one would leave an invisible node that swallows clicks
and sits in tab order as a keyboard-activatable ghost.
Container onHover fires only while the container itself is the
innermost hovered input area — interactive descendants receive
enter/leave instead, matching existing dispatcher behavior.
Assisted with AI tooling.
* fix(plugins): balance hover callbacks and dedupe wrapper callback wiring
---------
Co-authored-by: Lemmy <studio@quadbyte.net>1 parent 3c1ca3e commit f7ff72f
3 files changed
Lines changed: 605 additions & 50 deletions
0 commit comments