Documentation
¶
Overview ¶
Package scrolltest provides the shared inertial-wheel stress fixture used by boundary tests across sidecar. It exists so every scrollable surface proves the same journey: a hard flick's tail is dropped before Update and View, and the first reverse event still passes immediately.
The fixture is deliberately free of sleeps and timers: it drives the pre-update boundary answer directly, so it is deterministic and cheap enough to run for every surface.
Index ¶
Constants ¶
const DefaultTailEvents = 300
DefaultTailEvents is the number of same-direction events a hard Magic Mouse or trackpad flick can queue.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Tail ¶
type Tail struct {
// Name labels the surface under test in failure messages.
Name string
// X, Y is the pointer position, in whatever coordinate space Dropped
// expects (screen coordinates for app overlays, header-adjusted local
// coordinates for plugins).
X, Y int
// Down is the direction of the inertial tail. The reverse event is its
// opposite.
Down bool
// Events is how many tail events to feed; zero means DefaultTailEvents.
Events int
// Dropped reports whether the surface would discard this exact event before
// Update and View. Pass a plugin's WheelAtBoundary, a modal's
// WheelAtBoundary closure, or a wrapper around app.FilterInput.
Dropped func(tea.MouseWheelMsg) bool
}
Tail describes one stress run against a surface already sitting at a boundary.