diff options
| author | Gabriel Schneider <[email protected]> | 2026-11-25 04:51:32 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-11-25 04:57:31 -0300 |
| commit | 01ce658c7b40997e24ce5045b0e07f7b9ae98e71 (patch) | |
| tree | 84ae35642444bb5005ca8fa9da169e7f95ef1d49 /core/Trail.zig | |
| parent | 3c4b2c99b1a969abad0a530fa99b70b2cb564af3 (diff) | |
| download | pardes-01ce658c7b40997e24ce5045b0e07f7b9ae98e71.tar.gz pardes-01ce658c7b40997e24ce5045b0e07f7b9ae98e71.zip | |
colors, draw, Band: the walk UI's colour roles (UX DESIGN.md D4): text, dim, rule on each of a tag's four grounds (plain, focused, reading, reading focused) and on each one's cursor-row selection, key, match, hit, hit current, err/warn/question/hint, worked out once a theme with its chrome (ChromeTheme.roles, Roles.of; never a frame) and each held to its floor where it is drawn (text 4.5:1, dim 3.5 never under 3, rule 2:1, key and match 4.5:1 on every tag ground and selection, selection 1.4:1 off a dark tag and 1.25 off a light one with its text at 4.5, hit 1.25 and current 1.6 off the page with the body's ink at 4.5, a message's ink 4.5 on the tags and the page; where a theme's own colours leave no room, the most they allow: solarized's mid-grey tag, a tag whose text has no contrast to spare); the reading tint derived as D4 says (the theme's own where it stands 0.04 off the tag in OKLab, else the tag toward paper yellow by 0.04 and 0.02 lighter on a dark tag, darker on a light one, less or the other way where its text would drop under 7:1 or its own, further where the bytes cannot show the step): neonotte84's #262737 (0.029 off its tag, invisible) is #29271d now; and every painter of the new UI on them: the band's spines and step rules in the rule ink (they were the box's 11.5:1, the brightest thing in the band), `▶` and `•` in the key ink, a key bold in it, Help's chord (`SPC h t`, Row.chord) in it at the text's weight, a matched letter bold in the match ink on its row's own ground (it was the search ground, the selection's colour on neonotte84: on the cursor row the matches vanished), a dim row and a path's directory in the dim ink of their ground (the cursor row's selection's on it), never the faint attribute (fg 12.5:1 fell to 4.5 and a dimmed register value to 1.58); the head's dim spans in the dim ink, a key bold in the key ink, an error in the err role, the picker's act-row spines in the rule ink (TagState.Style.rule), its other sources' words, its `|` and the themes' hint dim, the levels', describe-key's and Rename's hints dim (they were at full label ink, louder than the content), the head's text in the text role (at rest the tag keeps its own ink: byte for byte); a walk's forward steps and a search word no place lights in the dim ink (they were the line numbers' ink, 1.57:1 on a reading tag); Messages.ink is the roles' (marks, end-of-line ghosts, progress); an LSP leaf in a pane no language server speaks for is dim and its doc step says `needs a language server` (POLISH 3; SPEC §4.2); UX's derived values reproduced (tools/roles.py: neonotte84's text, dim #70768f, rule #4c5063, key, match #f1a271, reading, hit #36282a, current #523831 within 2 a channel; acme's dim, rule, reading, hit, current; acme's key #555583 and match #8f4800 a step darker than UX's #5c5c8d and #974d00, which hold on its tag and #9eeeee: a reading pane's band's selection is pushed off #f3f0cc, 1.12:1, and they read on it too); TEST FIRST: Band.zig "a band is drawn in the theme's roles" (fails on the base painter at its first spine: the box's ink), draw.zig "a tag out of rest draws its keys bold in the key ink and its hint in the dim ink, never faint", colors.zig "every theme's walk UI roles meet their floors" (every bundled theme, dark and light, every floor; 497 floors missed by the first derivation, each class fixed by the rule above) and "neonotte84's and acme's roles are the ones UX derived"; Trail.zig's §6.7 session test now wants the forward step in the dim ink; core-test 1066/1236 (170 skipped)
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE
Diffstat (limited to 'core/Trail.zig')
| -rw-r--r-- | core/Trail.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/Trail.zig b/core/Trail.zig index 9223d1d3..f3ea542a 100644 --- a/core/Trail.zig +++ b/core/Trail.zig @@ -658,8 +658,9 @@ test "the session of pick-ui §6.7: four jumps across three files, back by a cli var arena: std.heap.ArenaAllocator = .init(std.testing.allocator); defer arena.deinit(); const s = try p.render(arena.allocator()); + // In the dim ink of the reading tag's ground (UX D4: 3:1 at least). const dim = try tagCell(p, r, "place.zig:40"); - try std.testing.expectEqual(pardes.Color{ .rgb = p.chromeTheme().lineno }, s.at(dim[0], dim[1]).style.fg); + try std.testing.expectEqual(pardes.Color{ .rgb = p.chromeTheme().roles.on(.reading_focused).dim }, s.at(dim[0], dim[1]).style.fg); // A click on a forward step goes forward to it. try clickTag(p, r, "place.zig:9", .left); r = p.view().active; |
