pub fn token(
style: &PieceStyle,
label: &str,
kind: Token,
tone: Tone,
latched: bool,
focused: bool,
) -> Span<'static>Expand description
A badge or a chip as one span.
Round for a badge, square for a chip. A chip answers a press and a badge does not, and the bracket is the only affordance a cell has left once colour is spent on the tone.
latched is a chip that is switched on, and it reads as reversed. So does
focus, which is a collision a terminal cannot avoid: latched is “this filter
is on” and focused is “you are here”, and there is one spare axis for two
facts. Said here rather than resolved by inventing a third look nobody would
read.
A chip’s removable half is not drawn. The x a webview hangs on a chip is a
second control inside one span, and a terminal reaches a control by focusing
it; two targets in one cell run is a question for whoever owns the
interaction, not for a drawing.