Make Iris layout dependencies explicit

This commit is contained in:
iris committed 2026-09-09 22:35:03 -04:00
1 parent e5fee03da8
commit 4bc23172fd
28 files changed
+679 -227

No files matched your search

+18 -1
View File
@@ -1,6 +1,6 @@
# Scrolling in iris
How anything in iris scrolls, as of 2026-09-08. This is the current
How anything in iris scrolls, as of 2026-09-09. This is the current
design, not a history — the git log has the account of
how it got here, and `docs/IRIS_TODO.md` has what is still open.
@@ -247,6 +247,23 @@ drawn (Iris, 2026-09-08). A correction that lands next frame is a frame
drawn wrong, and there may be no next frame — a fling that stopped is not
asking for one.
## Directional input
A scrollable registers `CursorSense::drag(axis)` and
`CursorSense::Scroll(axis)`. Horizontal and vertical gestures are distinct
input semantics, so a higher horizontal row does not consume an undecided
press that may belong to the lower vertical transcript. Both may observe the
press start; after movement crosses `DRAG_SLOP`, the pointer locks to its
dominant axis, only the matching listener receives the drag, and capture
cancels every other listener that had been tracking the press.
Visual layers still decide priority between listeners for the same semantic.
`drag_senses()` remains the deliberately direction-agnostic form for widgets
such as selection that arbitrate the gesture themselves. Wheel input follows
the same axis split; the desktop backend's Shift+wheel mapping produces a
horizontal delta before dispatch, so it reaches the horizontal listener
without a scroll-widget special case.
## The transcript's wiring
`app-rust/src/ui/mod.rs`, `build_tree`.