summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorGabriel Schneider <[email protected]>2026-11-25 05:07:21 -0300
committerGabriel Schneider <[email protected]>2026-11-25 05:18:54 -0300
commit304ea98913c178de9645cad5c3fe45a5f13e25d5 (patch)
tree2b0999db5a343b2a0bc4ee88b2d4933b5cd32f30 /core
parent920aaa6e6c2317aa775937b01f727fa9418b7db2 (diff)
downloadpardes-304ea98913c178de9645cad5c3fe45a5f13e25d5.tar.gz
pardes-304ea98913c178de9645cad5c3fe45a5f13e25d5.zip
draw: no pane dims while a tag is out of rest (walk UI polish P1, UX DESIGN.md D9): the other panes' every cell took `style.dim` while any tag was out of rest (SPEC §3.6's "slightly", built as the faint attribute: fg 12.5:1 to 4.5:1, comments 4.06:1 to 1.96:1 on neonotte84, UX A7), stacked on the user's own InactiveDim, flashed the whole screen at every SPC and repainted every pane per state change; now a tag out of rest changes its own pane and the notice row only, the others keep their look at rest (InactiveDim already applied to unfocused panes); THE CHANGE: render's pass over the other panes' cells and layers is deleted; TagState.previewing keeps its `.full` (the whole window wearing a theme, taken off at rest) and its doc says so: no pane's own bit is read any more, so Pick.unroll no longer sets the landing pane's (the field keeps its type: the wire and the dumps unchanged); TEST FIRST: Band.zig "a pane whose body would drop below four rows ... borrows them": the other pane's tag and body cells are not dim out of rest (on the base: dim, fails); core-test 1062/1232 (170 skipped); process-test: fsearch's golden regenerated and read: its `typing` style snap's left pane (the terminal) loses the `,f` (faint) on every cell, nothing else; a user saw it at every SPC, picker and prompt
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_016Y9MNBFhdevVu48bvL9kCE
Diffstat (limited to 'core')
-rw-r--r--core/Band.zig5
-rw-r--r--core/Pick.zig3
-rw-r--r--core/TagState.zig6
-rw-r--r--core/draw.zig13
4 files changed, 7 insertions, 20 deletions
diff --git a/core/Band.zig b/core/Band.zig
index 2fcf4a3b..31205d87 100644
--- a/core/Band.zig
+++ b/core/Band.zig
@@ -595,12 +595,13 @@ test "a pane whose body would drop below four rows under its band borrows them f
const r = p.view().rects[low];
try std.testing.expect(r.h > before);
try std.testing.expect(r.h -| pane.tag_rows >= 4);
- // The other panes dim; the one out of rest does not.
+ // No pane dims out of rest (UX D9): the others look as at rest.
var frame = std.heap.ArenaAllocator.init(std.testing.allocator);
defer frame.deinit();
const s = try p.render(frame.allocator());
const other = p.view().rects[top];
- try std.testing.expect(s.at(other.x + 3, other.y).style.dim);
+ try std.testing.expect(!s.at(other.x + 3, other.y).style.dim);
+ try std.testing.expect(!s.at(other.x + 3, other.y + 1).style.dim);
try std.testing.expect(!s.at(r.x + 3, r.y).style.dim);
p.update(.{ .key = .{ .cp = Key.escape } });
try std.testing.expectEqual(before, p.view().rects[low].h);
diff --git a/core/Pick.zig b/core/Pick.zig
index f4e26527..321b16b7 100644
--- a/core/Pick.zig
+++ b/core/Pick.zig
@@ -260,10 +260,9 @@ fn unroll(p: *Pardes, pk: *Pick, query: []const u8) void {
s.rows = .{ .at = @intCast(@min(pk.at, std.math.maxInt(u16))) };
pk.unrolled = true;
pk.shown = no_row;
- // The whole window previews a theme: no pane dimmed (SPEC §3.6).
+ // The whole window previews a theme.
if (pk.source == .themes) s.previewing = .full;
if (p.paneBySerial(pk.landing)) |id| {
- s.previewing.set(id);
const pane = p.panes[id].?;
pk.aside_row = pane.body.cur_row;
pk.aside_col = pane.body.cur_col;
diff --git a/core/TagState.zig b/core/TagState.zig
index 938a45d1..8bead506 100644
--- a/core/TagState.zig
+++ b/core/TagState.zig
@@ -79,9 +79,9 @@ miss: u8 = 0,
/// The leaf each group ran last, by its key (bindings.groups): the cursor
/// starts there and the rolled level underlines it (SPEC §4.3).
used: [bindings.ngroups]u8 = @splat(0),
-/// The panes showing a preview of what the state would do (a picker's
-/// landing pane, a pane an action draws ghosts in), by slot: not dimmed
-/// while the others are (SPEC §3.6). Set by the state that previews.
+/// `.full` while the whole window previews a theme (a themes picker's
+/// row, `:theme `'s): its own again at rest. No pane dims out of rest
+/// (UX D9), so no pane's own bit is read.
previewing: std.StaticBitSet(pardes.MAX_PANES) = .empty,
/// describe-key (SPEC §4.5), in the tag of pane `id`: the next keys are
diff --git a/core/draw.zig b/core/draw.zig
index 179b7cfc..17ac7514 100644
--- a/core/draw.zig
+++ b/core/draw.zig
@@ -361,19 +361,6 @@ pub fn render(p: *Pardes, arena: std.mem.Allocator) !*Surface {
for (s.regionList()) |region| {
if (region.kind == .notice) try joinNotice(p, s, arena, region);
}
- // A tag out of rest: the other panes dim a little so the eye goes to
- // it, but a pane showing a preview (walk UI SPEC §3.6).
- if (TagState.hostOf(p)) |host| for (p.panes, 0..) |slot, id| {
- if (slot == null or id == host or v.tag_state.previewing.isSet(id)) continue;
- const r = v.rects[id];
- for (r.y..r.y + r.h) |y| for (r.x..r.x + r.w) |x| {
- s.at(@intCast(x), @intCast(y)).style.dim = true;
- };
- for ([_]*pardes.Layer{ &s.body_layers[id], &s.tag_layers[id] }) |layer| for (layer.cells[0 .. @as(usize, layer.cols) * layer.rows]) |*cell| {
- cell.style.dim = true;
- };
- };
-
try paintHeaders(p, s);
try paintNoticeRow(p, s);