diff --git a/DESIGN.md b/DESIGN.md index fd3923e..81f5735 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -98,7 +98,7 @@ align. the room. - Radii: 0 for lanes/clips/room chrome · 2px plates · 3px verbs/controls · 4–6px floating (menus, sheets). No pills, no circles except source dots. -- Hover never adds hue. Focus/selection ring = 1px `ink1` (lamp-adjacent, not colored). +- Hover never adds hue. Selection ring = 1px `ink1` on the selected thing (lamp-adjacent, not colored); regions never draw a focus ring (user 2026-09-10). ## 5. The stance — layout diff --git a/crates/app/src/tests/layout.rs b/crates/app/src/tests/layout.rs index 3ad17df..93665bf 100644 --- a/crates/app/src/tests/layout.rs +++ b/crates/app/src/tests/layout.rs @@ -3708,3 +3708,35 @@ fn a_hover_line_is_a_name_and_a_chord() { assert_eq!(tip_line("Add files", "--", None), "Add files"); assert_eq!(tip_line("Source", "", None), "Source"); } + +/// A region is a place, not a control: none of the region roots paints a +/// border because it holds focus (user 2026-09-10, "clicking through +/// timeline draws a white overlay around the timeline"; DESIGN §4's ring +/// line is about the *selected thing*). Focus routing itself is untouched. +#[test] +fn no_region_root_wears_a_focus_ring() { + let stance = src_text("ui/stance.rs"); + let bench = src_text("ui/bench_stance.rs"); + let band = src_text("ui/timeband_stance.rs"); + for (name, text) in [ + ("stance.rs", &stance), + ("bench_stance.rs", &bench), + ("timeband_stance.rs", &band), + ] { + for line in text.lines() { + let code = line.trim_start(); + if code.starts_with("//") { + continue; + } + assert!( + !(code.contains("is_focused(") || code.contains("when(focused")) + || !code.contains("border"), + "{name} still paints a focus-conditional border: {code}" + ); + assert!( + !code.contains("STROKE_FOCUS"), + "{name} paints the focus stroke on a region: {code}" + ); + } + } +} diff --git a/crates/app/src/ui/stance.rs b/crates/app/src/ui/stance.rs index 671f58a..547f92f 100644 --- a/crates/app/src/ui/stance.rs +++ b/crates/app/src/ui/stance.rs @@ -16,8 +16,8 @@ use crate::ui::timeband_stance; use crate::ui::type_scale::{self, Typeset}; use crate::*; -/// Keyboard focus v1: the three regions Tab/Shift-Tab cycle a painted ring -/// through -- the bench, the dock's Sources tab (library) and the dock's +/// Keyboard focus v1: the three regions Tab/Shift-Tab cycle focus through +/// (no ring is painted for it any more, user 2026-09-10) -- the bench, the dock's Sources tab (library) and the dock's /// Clip tab (inspector), the darkroom's own stand-ins for "timeline", /// "library" and "inspector" (there is no separate inspector *region* in /// this tree -- MOCK-SPEC's Clip tab, `dock_stance::clip_tab`, is it). @@ -675,10 +675,9 @@ fn time_band(player: &mut Player, position: f64, cx: &mut Context) -> im fn bench( player: &mut Player, bench_h: f32, - window: &mut Window, + _window: &mut Window, cx: &mut Context, ) -> impl IntoElement { - let focused = player.focus_bench.is_focused(window); div() .id("stance-bench") .track_focus(&player.focus_bench) @@ -716,12 +715,11 @@ fn bench( .bg(rgb(DARK_CANVAS())) .border_t_1() .border_color(rgba(DARK_SEAM())) - // The ring (DESIGN §4's "1px, lamp-adjacent" convention -- the same - // `.border_1().border_color(...)` a picked bench clip already uses): - // painted on this outer frame, never on a row, and only while this - // surface itself -- not a picked clip inside it -- holds the focus - // ring Tab/Shift-Tab moves ([`next_surface`]). - .when(focused, |d| d.border_1().border_color(rgb(STROKE_FOCUS()))) + // No ring: a region is never outlined for holding focus (user + // 2026-09-10, "clicking through timeline draws a white overlay + // around the timeline"). Focus routing is untouched -- Tab/Shift-Tab + // still land here ([`next_surface`]) -- and the only ring left in + // the bench is the selection one a picked clip draws (DESIGN §2/§4). .flex() .flex_col() .px(px(12.))