Skip to main content

max / makeover-tui

Use focus ring for the ring and say reach and focus are not colours The theme header used focus cue and focus-ring for two different tokens. The distinction it draws is right and only its words were wrong. Reach and focus are absent here for a different reason, now stated: they are not colours and not this crate's. Takes makeover-layout 0.19.0.
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-08-13 13:54 UTC
Signed with PGP, not checked
Commit: 9cc4ee76cb3cb1f74988dc1fa8a6775f927beb98
Parent: fcb7f95
3 files changed, +17 insertions, -9 deletions
M Cargo.toml +2 -2
@@ -1,6 +1,6 @@
1 1 [package]
2 2 name = "makeover-tui"
3 - version = "0.17.0"
3 + version = "0.18.0"
4 4 edition = "2024"
5 5 description = "The terminal renderer for makeover-layout, on ratatui. Colour stops being the constraint above 256 entries; geometry never does, because an edge occupies a whole cell on every side."
6 6 license = "MIT"
@@ -19,7 +19,7 @@
19 19 # compile against an API added in a later one -- which is what `Depth::Overlay`
20 20 # would do here. The rest of the suite has pinned this way since
21 21 # makeover-webview found it the hard way.
22 - makeover-layout = "0.18.0"
22 + makeover-layout = "0.19.0"
23 23 makeover = { version = "2.5", optional = true }
24 24
25 25 [lints.rust]
M src/theme.rs +10 -4
@@ -16,13 +16,19 @@
16 16 //! # What is deliberately absent
17 17 //!
18 18 //! Tokens a consumer derives for itself. `alloy_tui` mixes a `border-subtle`
19 - //! and its own focus-ring `border-strong` out of the authored border, holding
20 - //! the latter to WCAG AA-UI against the page because Alloy spends it as the
21 - //! entire focus cue. makeover emits a `border-strong` too, and it is a flat 5%
22 - //! darkening: a firmer divider, not a focus ring. Those are different tokens
19 + //! and its own `border-strong` out of the authored border, holding the latter
20 + //! to WCAG AA-UI against the page because Alloy spends it as its entire **focus
21 + //! ring**. makeover emits a `border-strong` too, and it is a flat 5% darkening:
22 + //! a firmer divider, and not a focus ring at all. Those are different tokens
23 23 //! wearing one name, and on Akari Dawn they land at 1.63:1 and 3.27:1. This
24 24 //! struct carries makeover's, and a consumer that needs its own keeps deriving
25 25 //! it. Adopting one for the other would take a focus ring to half its floor.
26 + //!
27 + //! **Reach** and **focus** are absent for a different reason: they are not
28 + //! colours and not this crate's at all. A terminal consumer derives reach from
29 + //! draw order and tracks focus itself; a description states neither. The three
30 + //! terms are defined once in `makeover_layout`'s crate header, "Reach, focus
31 + //! and the focus ring".
26 32
27 33 use makeover::{Rgb, ThemeColors};
28 34 use ratatui::style::Color;
M src/widget.rs +5 -3
@@ -651,9 +651,11 @@
651 651 .contains(Modifier::REVERSED)
652 652 );
653 653 assert_eq!(line.spans[0].style, style.muted);
654 - // Focus is a state and does not suppress anything.
655 - let focused_state = Act::new("Save").state(State::Focus);
656 - let line = act(&style, &focused_state, true);
654 + // The same call on a control the description says nothing about: the
655 + // mark is this renderer's own focus flag and always was, which is why
656 + // only `Disabled` can override it.
657 + let unstated = Act::new("Save");
658 + let line = act(&style, &unstated, true);
657 659 assert!(
658 660 line.spans[0]
659 661 .style