From 6b2b63f654561ba9d64c134e6ccc6c0784e15220 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Thu, 26 Nov 2026 09:29:45 -0300 Subject: draw, colors, gui: the tags, grips, window and column rows and the notice row drawn from the chrome (the themes programme's L2a, DESIGN.md part F's L2a row, G1' and H): a tag's ground says focus only, two grounds (`chrome.on(.plain/.focus)`), a reading pane's on its focus's as a held one's, its mode on its grip; in a pane tag the trail, path, `Keep` and the user's text in the full ink (`text`, 7:1 where the gamut allows), its computed words (UX K'1, K'3) in the words' ink (`word`, 4.5:1), the basename in `name[g]`, its forward steps, fold and head hints `dim`, the walked word and the head's keys `key`, the head's error `severity[0]`, its own selection and a pointer sweep the ground's selection, window mode's outline the plain tag's selection whichever pane it is on (one outline walked from pane to pane), a hovered word its half selection (B5: `Selection.secondary`, new, the ground halfway to its selection, worked out with the ground's inks); the window row and the column tags on the page, no band and no focus, every word in `page.word` (a terminal's own page where the theme leaves it to the host: dark), their hovered word the page's half selection, a server's progress the page's dim ink; a column's grip `grip.column_rest` (2:1) at rest, `grip.column` (3:1) grabbed, never focus; the notice row on `status` (its ground, ink, dim and its lead's severity per ground); a pane's notice chips on the plain tag; the grid's grip (R5', R6): focused `grip.focus` with its glyph in `grip.ink`, or in `grip.mode_glyph` reading; at rest its ring `grip.ring` as the cell (the theme's own where it rings its grips, acme's #8888cc, lapis's #9aa6d9, where the cell was half that and the box's fill) with the tag's ink; reading unfocused the mode's mark `grip.mode` filled, glyph `grip.ink`; unsaved a bold `*` in `grip.ink` on `grip.dirty`; a message's mark in its kind's ink held on its fill (`Grip.marks`, new: each severity and the dim ink held at a theme change on the four fills a grid gives a grip, at rest and reading on the plain tag too, where a window draws them hollow), so the gui draws the cell's ink and its per-frame pushAway goes; both copies of `inkOn` deleted (draw.zig's, and the gui's use of pushAway); the rail's ticks the hit's and the current hit's (R8), the body's pan arrow the page's key ink, the debug box the rail and the tag's ink; the surface's chrome from the chrome alone (`tag_reading_bg` deleted, `tagline_bg` the page and `tagline_rows` over the column row too, so a window's underlay there is the page); the gui: no reading underlay, the column bar's focus cover and the reading cover gone (nothing reads them now), a column grip's band the page; Messages.ink deleted (`inkOn` takes a ground's inks or a fill's marks); THE BAND is untouched here (its inks are the next change's); RUN (TEST FIRST): draw.zig "a grip in the grid is the chrome's in every theme ..." (every theme in the ring, not the natives: focus, rest, mode, dirty, focused reading; the four each its own), "a reading pane's tag is on the plain or the focused ground, as a held one's; its grip carries the mode's mark ..." (acme, orchard, dark, neonotte84; held and reading, focused and not), "a pane tag's trail, path, Keep and the user's text are in its full ink, its computed words in the words' ink; the window row and the column tags on the page ... the notice row on its own ground" (dark: the host's page), each failing on the base (the old grip mix, the reading tint, the tag's own unheld ink on `Del`, the tagline ground); re-pinned: Trail.zig's reading-tint tests (the reader on the focused ground and its grip region reading, the held one plain), the name tint test (against the full ink, not ` Del`'s), Core.zig's window-row hover and empty column, replica's themed dump, test/column_drag.zig, test/panes.zig's tint tests (the name in `name[g]`, the words in `word`, the rest in `text`), the gui's mark test (the cell's ink, held by the core), look.zig's tag hover (the focused ground's half selection), behaviour's column-tag sweep (the swept cells the selection, the hovered word its half) and tags' tint (the directory in the full ink, the computed words in the words'); GOLDENS (36 of 103, orchard unless said), each moved cell read by goldsum.py/rowpairs.py against the base: (1) the window and column rows to the page: tagline #b2c3b8 on #1d2824 to page.word #788079 on #0d1410 (3932 cells in 33) and their blanks (1834), the active column's #becfc4 on #314738 too (1268); (2) a pane tag's computed words in `word`: plain #819188 (1607), focused #a1b1a8 on the focus ground #394440 (1088); (3) the focused tag's ground #314738 (the old focus tint) to the chrome's #394440 and its full ink #becfc4 to #cadbd0 (991), the name tint on it (701); (4) a reading pane's tint #2c2c0f gone: focused to #394440 (746 + 647 words + 101 names), unfocused to the plain tag (234 + 219 words + 50 names), the head's dim on it to the focused dim #8e9d94 (165), its key #bada9d to #add38a (28 + 6); (5) grips: a reading unfocused one's ring #465a43 to the mode's sky #3096c0 (10 + 2), a focused reading one's glyph black to `mode_glyph` #06779d (6); (6) the rail's current tick, the text #e5eee5, to the current hit #917a53 (8 + 1); (7) a server's progress on the window row, hint #b7cb98, to the page's dim #666f68 (135, callstack, lsprelpath); (8) a hovered header word, the full selection, to the page's half #24382c in page.word (9 + 2, load, windowops); the tag's selection's ink #f5f7ee to the focused ink held on it #cadbd0 (65 + 1, tagpath); (9) blanks only: the dump's runs carry a blank cell's ink from the cell before it, so blanks after `Del`, on a grip's second cell and the column grips show the new ink with no glyph (271 + 253 + 22 + 18 + 6 + 4 + 4 + 4); theme.golden and themesel.golden (24 themes each), the same classes per theme: the window and column rows on each page (dark's the host's: `d`), dark_plus's blue status bar now the notice row's alone (H), acme's cyan header rows on its page #ffffea in #74746a, the focused tag on R4's step (acme #d1e6e6, dark_plus #565656, light #d1cfdb), the notice row's ink `status.text` (the tag's held), paper's and solarium's on the lifted plain tag (H's 1.1), acme's and lapis's resting grip their own ring as the cell; mini, collapse, ninep carry the same in their 9P captures' style rows; GATES (tui): core-test 1155/1329 (174 skipped), pane-test 184/185 (1 skipped), process-test 0 of 103 failed with --update (36 re-recorded, read above); THE END GATE's finds, fixed here: shell-test's look.zig tag hover and behaviour's column-tag sweep and tags' tint asked the old looks (re-pinned above), and behaviour's window mode lost its outline walking from the focused pane to another (each tag's own selection differs by ground: the outline is the plain tag's selection on every pane now); the whole stack's gates are in its last change's description; load 2.5 to 9.5; OUTSIDE draw.zig/Messages.zig: core/colors.zig (Selection.secondary, Grip.marks/Fill/Marks, three hunks), core/surface.zig (Chrome's reading underlay gone, two docs), dev/gui/gui.zig (underlay, gripFill, mark ink, gripDecor's band, coverFrame, two tests), core/Trail.zig, core/Core.zig, core/replica.zig, core/look.zig, test/column_drag.zig, test/panes.zig, test/behaviour/columns_and_tags.zig, test/behaviour/tags.zig (tests), test/snapshots (36) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE --- test/behaviour/columns_and_tags.zig | 9 ++++++--- test/behaviour/tags.zig | 16 +++++++++++----- 2 files changed, 17 insertions(+), 8 deletions(-) (limited to 'test/behaviour') diff --git a/test/behaviour/columns_and_tags.zig b/test/behaviour/columns_and_tags.zig index 4ca6f7b3..bbb30f25 100644 --- a/test/behaviour/columns_and_tags.zig +++ b/test/behaviour/columns_and_tags.zig @@ -281,10 +281,13 @@ test "columns-and-tags: a column tag lights the word under the mouse, is clicked try s.expect("/focus", ""); try std.testing.expectEqual(.{ x, @as(usize, 1) }, (try s.cursor()).?); // Swept over three cells: those and the caret's, normal mode's - // selection taking the cell under it, in the selection's colour. + // selection taking the cell under it, in the selection's colour + // (the hovered word's is its half, DESIGN.md B5). try s.write("/mousein", s.at("m {d} 1 1\nm {d} 1 0\n", .{ x + 3, x + 3 })); - for (0..4) |k| try expectEqualStrings(lit, try s.bg(x + k, 1)); - try std.testing.expect(!std.mem.eql(u8, lit, try s.bg(x + 4, 1))); + const swept = try s.bg(x, 1); + try std.testing.expect(!std.mem.eql(u8, lit, swept) and !std.mem.eql(u8, plain, swept)); + for (1..4) |k| try expectEqualStrings(swept, try s.bg(x + k, 1)); + try std.testing.expect(!std.mem.eql(u8, swept, try s.bg(x + 4, 1))); // A clicked tag is in normal mode: `i` types at its caret, after its // computed words (UX K'1). const lead = "New Term Joincol Delcol ".len; diff --git a/test/behaviour/tags.zig b/test/behaviour/tags.zig index fcef9fd3..bb117d59 100644 --- a/test/behaviour/tags.zig +++ b/test/behaviour/tags.zig @@ -495,7 +495,7 @@ test "tags: truncating a tag clears its own text, u in the tag undoes it, and > try std.testing.expectEqualStrings("/test.txt Del Make\nMore\n Tail\n", try tag(&s, n)); } -test "tags: a pane tag's file name is tinted, its directory, dirty marker and words not" { +test "tags: a pane tag's file name is tinted, its directory in the tag's full ink and its computed words in the words' (DESIGN.md H)" { var s = try Session.initFile(std.testing.allocator, "body\n"); defer s.deinit(); const n = try s.focused(); @@ -511,13 +511,19 @@ test "tags: a pane tag's file name is tinted, its directory, dirty marker and wo var x: usize = 0; var tinted: ?[]const u8 = null; var ink: ?[]const u8 = null; + var words: ?[]const u8 = null; while (cells.nextCodepointSlice()) |cell| : (x += 1) { if (x < x0 or std.mem.eql(u8, cell, " ")) continue; - // `界file.zig`: the wide glyph's two cells, then eight. + // `界file.zig`: the wide glyph's two cells, then eight; after it + // `Keep` in the full ink, its computed words in the words' ink + // (DESIGN.md H). const in_name = x >= x0 + "/project/".len and x < x0 + "/project/".len + 10; - const want = if (in_name) &tinted else &ink; - if (want.* == null) want.* = styles[y * cols + x]; - try std.testing.expectEqualStrings(want.*.?, styles[y * cols + x]); + const style = styles[y * cols + x]; + if (x >= x0 + "/project/".len + 10 and std.mem.eql(u8, style, ink.?)) continue; + const want = if (in_name) &tinted else if (x < x0 + "/project/".len) &ink else &words; + if (want.* == null) want.* = style; + try std.testing.expectEqualStrings(want.*.?, style); } try std.testing.expect(!std.mem.eql(u8, tinted.?, ink.?)); + try std.testing.expect(!std.mem.eql(u8, words.?, ink.?) and !std.mem.eql(u8, words.?, tinted.?)); } -- cgit v1.3