You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ui): give tree rows and icon buttons native hovers
Rows hover with their text value, as VS Code's tree falls back to the
label when an item has no tooltip; `tooltip` overrides it and null opts
out. Ctrl+K Ctrl+I opens the focused row's hover, the chord bound to
list.showHover, and IconButton hints with its label like an action bar
item.
One bubble serves a whole tree rather than one per trigger, the way a
list hands a single hover delegate to its rows and their action bars.
Rows report the element under the pointer through `HoverDelegateScope`
and an invisible anchor moves to it. That single widget is also the only
place a delay rule can live, and native's rule needs one: each new target
waits out `workbench.hover.delay`, except inside a row's action bar, the
dense cluster native grants an instant handoff.
A managed hover always uses hoverPosition 2, whatever the widget's own
default, so the bubble sits 2px into the bottom edge of its target rather
than above it. Placement then splits on the delegate: an element-placed
hover, which is what an action bar button gets, centers under it, while a
mouse-placed one, which is what a row gets, follows the cursor.
Measured in Chrome: label to a button 513ms, button to button 19ms, and
mounting 2,000 rows 189ms against 515ms for a Radix root per row. Also
pins the sticky container at native's z-index 13, below the hover's 40,
so pinned rows no longer paint over a bubble, and drops the menu parity
story's trigger button so both menus line up.
0 commit comments