Skip to main content

max / makeover-layout

0.27.5: the sort caret is spelled here, once Three renderers each held their own caret literal, two on the solid triangles and makeover-webview on the arrows U+2191/U+2193. Sort::glyph() is the single spelling, beside as_str for the same stated reason: agreeing in three files is not agreement, it is a coincidence waiting to end. Settled 2026-08-16 (Max): the triangles, because the bolder simpler glyph wins. Bare, with no spacing, since tui and immediate carry a leading space in their TableStyle and a webview emits its own in content. Neither self-hosted web face carries U+25B2/U+25BC, so a browser falls back per glyph until the in-house face ships them (makeover 6d6d9146). Cosmetic, and not a reason to keep three spellings.
Author: Max Johnson <me@maxj.phd> · 2026-08-16 21:47 UTC
Signed with PGP, not checked
Commit: 669ee7462836720072c55bcae6cb1a44a37c7168
Parent: e1d21b1
2 files changed, +46 insertions, -1 deletion
M Cargo.toml +1 -1
@@ -1,6 +1,6 @@
1 1 [package]
2 2 name = "makeover-layout"
3 - version = "0.27.4"
3 + version = "0.27.5"
4 4 edition = "2024"
5 5 # One copy of this vocabulary per dependency graph, enforced by cargo rather
6 6 # than by remembering. Two versions of a description layer in one build means
M src/lib.rs +45
@@ -3368,6 +3368,37 @@
3368 3368 Self::Descending => "descending",
3369 3369 }
3370 3370 }
3371 +
3372 + /// The caret a renderer draws for this direction.
3373 + ///
3374 + /// Here for [`as_str`](Self::as_str)'s reason, said about a glyph rather
3375 + /// than a word: three renderers picking their own is the drift this crate
3376 + /// ends. They had picked their own — two on the solid triangles and
3377 + /// `makeover-webview` on the arrows U+2191/U+2193 — and agreeing by
3378 + /// coincidence in three files is not agreement.
3379 + ///
3380 + /// Settled 2026-08-16 (Max): the solid triangles, U+25B2 and U+25BC. The
3381 + /// reason generalizes past this pair and is the house rule now — prefer the
3382 + /// bolder, simpler glyph over the thinner or more complicated one. A third
3383 + /// spelling is not open for re-argument.
3384 + ///
3385 + /// **Bare, with no spacing.** Where the gap goes is each renderer's
3386 + /// business: `makeover-tui` and `makeover-immediate` carry a leading space
3387 + /// inside their `TableStyle` string and a webview emits its own in
3388 + /// `content`, so folding a space in here would make one of the two wrong.
3389 + ///
3390 + /// Neither face the web apps self-host carries these — IBM Plex Mono has one
3391 + /// glyph in the whole geometric-shapes block and Lato has none — so a
3392 + /// browser falls back per glyph until the in-house face ships with them
3393 + /// drawn in (makeover `6d6d9146`, wiki `typography-standard`). Cosmetic
3394 + /// drift in one renderer, not a reason to spell it three ways.
3395 + #[must_use]
3396 + pub const fn glyph(self) -> &'static str {
3397 + match self {
3398 + Self::Ascending => "\u{25B2}",
3399 + Self::Descending => "\u{25BC}",
3400 + }
3401 + }
3371 3402 }
3372 3403
3373 3404 impl<'a> Column<'a> {
@@ -3529,6 +3560,20 @@
3529 3560 assert_eq!(Sort::Ascending.as_str(), "ascending");
3530 3561 }
3531 3562
3563 + #[test]
3564 + fn a_direction_carries_its_caret_and_the_two_are_not_the_same_glyph() {
3565 + // The spelling every renderer reads, so that agreeing is composition
3566 + // rather than three files happening to hold the same literal.
3567 + assert_eq!(Sort::Ascending.glyph(), "\u{25B2}");
3568 + assert_eq!(Sort::Descending.glyph(), "\u{25BC}");
3569 + assert_ne!(Sort::Ascending.glyph(), Sort::Descending.glyph());
3570 + // Bare. The gap is the renderer's, and a space here would be a second
3571 + // one wherever a renderer already carries its own.
3572 + for d in [Sort::Ascending, Sort::Descending] {
3573 + assert_eq!(d.glyph().trim(), d.glyph());
3574 + }
3575 + }
3576 +
3532 3577 #[test]
3533 3578 fn a_figure_carries_its_tone_because_no_renderer_can_derive_it() {
3534 3579 // Three of goingson's five sites tone the figure by their own means, so