A view reaches for whichever meter fits and gets the same vocabulary either way: the same caption trio and the same two ramps, so the two are captioned and colored identically whichever one a view reaches for. They were once the same five method bodies written out on both elements — a pair that had already drifted in its wording and would have drifted in its behavior next.
The Self type is F-bounded so every builder answers the element's own type and a mixed chain — progressBar(0.5).bare.preset(...) — keeps the element-specific builders reachable after a shared one. An implementer supplies three hooks: the caption and ramp it currently carries, and a rebuild with both replaced.
Colors the fill by how far along it is — see io.worxbend.tui.widgets.ColorRamp for the built-in ramps. ColorRamp.Traffic walks green through amber to red, which is what an "how bad is it" meter (disk usage, an air-quality index) wants and a download bar does not.
Colors the fill by how far along it is — see io.worxbend.tui.widgets.ColorRamp for the built-in ramps. ColorRamp.Traffic walks green through amber to red, which is what an "how bad is it" meter (disk usage, an air-quality index) wants and a download bar does not.