Skip to main content

Module progress

Module progress 

Source
Expand description

<progress> bar behavior: determinate fill sync + indeterminate sweep animation.

The markup parser desugars <progress> into a track element (tag progress, carrying ProgressBar) with a single .progress-fill child (carrying ProgressFill). Both are real elements, so all styling - track / fill colors, height, radius, the indeterminate sweep period - is CSS-reachable through the skins:

progress       { bg: var(--lumen-track); height: 6; radius: 3; }
.progress-fill { bg: var(--lumen-accent); radius: 3; }
progress       { progress-duration: var(--lumen-progress-period); }
  • Determinate (value=, or a bind-value= signal once it holds a number): the fill’s width tracks value / max as a percent of the track.
  • Indeterminate (no value, and no number yet in a bind-value signal): a 30 %-wide chunk sweeps back and forth (GTK-style bounce; period from progress-duration, token --lumen-progress-period). The sweep keeps the frame loop awake via AnimationsActive only while an indeterminate bar is actually visible.
  • Not focusable, no interaction - <progress> never carries TabIndex and none of these systems consume input.

Structs§

ProgressBar
State for one <progress> element (the track entity).
ProgressChunk
Width of the indeterminate chunk as a fraction of the track.
ProgressFill
Marker on the fill child spawned inside every <progress>. Its width and left edge are sync_progress_fill’s, held in StyleOverrides.
ProgressPlugin
Plugin: registers the fill sync system.

Constants§

PROGRESS_PERIOD_MS
Runtime fallback for the indeterminate sweep period. The single Rust-side value; skins route progress-duration: var(--lumen-progress-period) over it and markup duration= wins.

Functions§

apply_progress_bindings
Pull bind-value signal writes into ProgressBar::value. Same dirty-gated shape as lumen_core::signals::apply_value_bindings (which targets sliders - progress deliberately does not carry a SliderValue, or it would inherit wheel / click / drag mutation), and installed with the same ordering, after every store writer, so a write’s one-tick dirty flag is still set when this reads it.
sync_progress_fill
Keep every .progress-fill child in step with its parent ProgressBar.