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§
- Date
Index Marker - A durable chronological boundary supplied by the collection owner.
- Date
Index Preview - Value used in hover, focus, and live announcements.
- Date
Indexed Scrollbar - 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.
- Projected
Date Marker - A projected marker with its pixel position along the current track.
Enums§
- Date
Index Intent - What the host should do after one interaction. It contains only stable positions/ids, never an app-specific row index.
- Date
Index Marker Kind - 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.