Skip to main content

Module date_indexed_scrollbar

Module date_indexed_scrollbar 

Expand description

A chronological index for large, virtualised collections.

DateIndexedScrollbar deliberately sits one layer above Scrollbar: the latter owns pixel-accurate thumb behaviour while this type understands that a collection has meaningful places in it (months, years, chapters, releases, …). It is an immediate-mode face and interaction model, rather than a Photos control, so a reader, activity feed, media browser, or search result can use the same date-indexed affordance without retaining thousands of row widgets.

The host remains authoritative for its virtual-list offset. Feed the model its ScrollMetrics, apply the returned DateIndexIntent, and re-paint. This keeps scrolling smooth and lets a host preserve an item anchor while changing thumbnail density.

Structs§

DateIndexMarker
A durable chronological boundary supplied by the collection owner.
DateIndexPreview
Value used in hover, focus, and live announcements.
DateIndexedScrollbar
A modern chronological scrollbar face plus its ephemeral interaction state. It intentionally has no document binding: scroll position and density are per-user presentation preferences, not shared collection data.
ProjectedDateMarker
A projected marker with its pixel position along the current track.

Enums§

DateIndexIntent
What the host should do after one interaction. It contains only stable positions/ids, never an app-specific row index.
DateIndexMarkerKind
Relative importance of a date boundary.

Constants§

DEFAULT_TRACK_WIDTH
A compact but touch-reachable date-index track.
HORIZONTAL_HIT_EXPANSION
Horizontal target expansion is deliberately independent of the vertical marker tolerance: a marker may be easy to find along the timeline without capturing unrelated image content beside it.
MARKER_HIT_RADIUS
The marker hit size is independent of its one-pixel visual tick.
MAX_PROJECTED_MARKERS
The highest number of date markers a single frame paints or exports to accessibility. A ten-year collection may have 120 monthly boundaries; presenting all of them in a 700px track is both unreadable and wasteful.
PREVIEW_BUBBLE_MAX_WIDTH
The visible date bubble is deliberately much narrower than its hit lane. A timeline index should name the nearby day, not occlude a column of photographs while the pointer travels near the edge.
PREVIEW_LANE_WIDTH
The visible 16px rail gets an 8px acquisition margin either side. This remains a 32px target, rather than stealing a photo column with an invisible sidebar-sized hover lane.