From fbea70a476beb47997a69bbced2ff0404f5e5300 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Thu, 10 Sep 2026 00:40:48 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20style(app):=20the=20settings=20c?= =?UTF-8?q?olumns=20get=20heads=20a=20person=20can=20find?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PROJECT/EDITOR/EXPORT were 12px ink3 -- the room's quietest type -- with a prose tail running on after each ("I couldn't realize them when I look at"). They are room heads now: 15px Archivo 700 ink1, 12px of air below a row's own gap, and the prose moved onto a hover plate (DESIGN §8, ≤6 words). DESIGN §3 carries the rule; in-list section heads stay 12px ink3. The EXPORT Picture row said every refused format's reason after its value ("funny"). It says its own pick now: one value, and a refusal -- greyed value, six words -- only where that pick is the refused one. --- DESIGN.md | 2 + crates/app/src/tests/layout.rs | 64 ++++++++++++++++++++++ crates/app/src/ui/settings_stance.rs | 79 ++++++++++++++++++---------- 3 files changed, 116 insertions(+), 29 deletions(-) diff --git a/DESIGN.md b/DESIGN.md index 9deb535..3afcead 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -78,6 +78,8 @@ Two faces, fixed roles (bundled, no runtime deps): Scale: 18px hero timecode (700, colons in `ink3`) · 15px labels/rows (500) · 13–14px chords and metadata (500) · 12px section heads (Archivo 700, uppercase, +0.14em letter-spacing, `ink3`). +Room/column heads (Settings) are 15px Archivo 700 `ink1`; in-list section heads stay 12px `ink3` +(2026-09-10 -- the settings columns read as body text and a person could not find them). Nothing below 10px. Every size is a whole pixel (no half-pixel sizes -- they put glyph baselines off the pixel grid and blurred cosmic-text's AA). No italics. Tabular figures wherever digits align. diff --git a/crates/app/src/tests/layout.rs b/crates/app/src/tests/layout.rs index 2612718..c2327eb 100644 --- a/crates/app/src/tests/layout.rs +++ b/crates/app/src/tests/layout.rs @@ -3904,6 +3904,70 @@ fn no_region_root_wears_a_focus_ring() { } +/// The user could not find the three columns (2026-09-10: "I couldn't realize +/// them when I look at"), because their heads were 12px `ink3` -- the room's +/// quietest type -- with a prose tail running on after each one. DESIGN §3's +/// new line: a room/column head is 15px Archivo 700 `ink1`, and the prose is a +/// hover plate (DESIGN §8), never ambient text on the head itself. +#[test] +fn the_settings_columns_wear_room_heads_not_section_heads() { + let source = src_text("ui/settings_stance.rs"); + let start = source.find("fn room_head(").expect("the room head"); + let body = &source[start..source[start..].find("\n}\n").unwrap() + start]; + for needle in [ + "type_scale::LABEL_ROW_PX", + "FontWeight::BOLD", + "rgb(INK1())", + ".tooltip(", + ".pb(px(12.))", + ] { + assert!(body.contains(needle), "a room head lost {needle}"); + } + assert!( + !body.contains("INK3()") && !body.contains("type_scale::head()"), + "the room heads fell back to the 12px in-list section head" + ); + // Each column head is one word, and its prose lives on the plate. + for head in ["\"PROJECT\"", "\"EDITOR\"", "\"EXPORT\""] { + assert!(source.contains(head), "the settings room lost its {head} head"); + } + for run_on in ["PROJECT \u{b7}", "EDITOR \u{b7}", "EXPORT \u{b7}"] { + assert!( + !source.contains(run_on), + "a settings head grew its prose tail back: {run_on}" + ); + } +} + +/// The Picture row said every refused format's reason after its value +/// (`H.264 no picture -- an mp4 would \u{b7} AV1 no picture -- ...`; the user +/// called it "funny"). A row says its own pick: one value, and a refusal only +/// when *that* pick is the refused one. +#[test] +fn the_picture_row_tail_is_the_current_format_alone() { + let source = src_text("ui/settings_stance.rs"); + let start = source.find("fn export_section(").expect("the export section"); + let body = &source[start..]; + let body = &body[..body.find("\n/// The page itself").expect("the page's render fn")]; + assert!( + !body.contains("PICTURE_CYCLE"), + "the Picture row walks the whole cycle to build its tail again" + ); + assert!( + !body.contains(".join("), + "an EXPORT row concatenates a list into one row's tail again" + ); + assert!( + body.contains("format_refusal(session, format)"), + "the Picture row's refusal is no longer asked about the current format" + ); + // Six words at most, and the value greys with the refusal it carries. + assert!( + body.contains("short_reason(&why)") && body.contains("picture_ink"), + "the Picture row lost its short reason or its greyed value" + ); +} + /// The monitoring level's home. Cleanse round 2 took the mute button, the /// `- +` pair and the slider off the time band on the promise that the level /// "lives in Settings" (DESIGN 5) -- a promise nothing kept until this row, diff --git a/crates/app/src/ui/settings_stance.rs b/crates/app/src/ui/settings_stance.rs index a871388..24e41d8 100644 --- a/crates/app/src/ui/settings_stance.rs +++ b/crates/app/src/ui/settings_stance.rs @@ -37,18 +37,27 @@ use crate::ui::type_scale; use crate::*; use engine::colorspace::ContentLight; -/// A 9px uppercase Archivo section head, `ink3` -- [`dock_stance::section_head`]'s -/// exact shape, repeated rather than imported across a `pub(crate)` seam for -/// one nine-line function. -fn section_head(text: impl Into) -> impl IntoElement { - let style = type_scale::head(); +/// The room's three anchors (user 2026-09-10: "I couldn't realize them when I +/// look at"): 15px Archivo 700 `ink1`, uppercase, with a row's own height of +/// air below (+12px past a row's gap) so a head reads as the start of a +/// column and not as one more line in it. The prose that used to trail each +/// head (`· stored in the .edith file`) is a hover plate on the head now, +/// ≤6 words -- DESIGN §8: a distinction that matters is a plate, not ambient +/// text. In-list section heads (the dock's own KEYS head) stay 12px +/// `ink3`. +fn room_head(id: &'static str, text: &'static str, tail: &'static str) -> impl IntoElement { + let style = type_scale::label(type_scale::LABEL_ROW_PX, gpui::FontWeight::BOLD); + let tail: SharedString = tail.into(); div() + .id(id) .flex_none() .pt(px(4.)) + .pb(px(12.)) .font(style.font) .text_size(style.size) - .text_color(rgb(INK3())) - .child(text.into()) + .text_color(rgb(INK1())) + .tooltip(move |_, cx| cx.new(|_| Tip(tail.clone())).into()) + .child(text) } /// One row: a ≤16-char label, its current value in mono (units carried, @@ -318,7 +327,11 @@ fn project_section(player: &Player, cx: &mut Context) -> impl IntoElemen .flex() .flex_col() .gap(px(2.)) - .child(section_head("PROJECT · stored in the .edith file")) + .child(room_head( + "settings-head-project", + "PROJECT", + "stored in the .edith file", + )) .child(row_ink( "settings-resolution", "Resolution", @@ -405,7 +418,11 @@ fn editor_section(player: &Player, cx: &mut Context) -> impl IntoElement .flex() .flex_col() .gap(px(2.)) - .child(section_head("EDITOR · this machine, this window")) + .child(room_head( + "settings-head-editor", + "EDITOR", + "this machine, this window", + )) // The monitoring level, which lost its slider when the time band was // cleansed (DESIGN §5 -- "the level lives in Settings"). A readout and // not a widget: the number is spent rarely, so the wheel over the row @@ -567,8 +584,9 @@ pub(crate) fn picture_label(format: Format) -> String { /// The next file in [`PICTURE_CYCLE`] this machine can actually write. /// `refused` is the same door [`Player::set_format`] asks, so the stroke never -/// stops on a codec the setter would only refuse back -- the refused ones are -/// still *said*, on the row's own greyed tail (DESIGN §8: never hidden). +/// stops on a codec the setter would only refuse back -- a refusal is said on +/// the row only when the *current* pick is the refused one (DESIGN §8: never +/// hidden, never a list of the reasons for formats nobody picked). /// `current` where every other stop is refused, so `c` cannot cycle to /// nothing. pub(crate) fn next_picture(current: Format, refused: impl Fn(Format) -> bool) -> Format { @@ -625,20 +643,18 @@ pub(crate) fn short_reason(why: &str) -> String { /// the budget; the codec, the sound, the encoder and the range are here. fn export_section(player: &Player, cx: &mut Context) -> impl IntoElement { let format = player.format; - let refusals: Vec = PICTURE_CYCLE - .into_iter() - .filter_map(|f| { - player - .session - .as_ref() - .and_then(|session| format_refusal(session, f)) - .map(|why| format!("{} {}", format_label(f), short_reason(&why))) - }) - .collect(); - // Never hidden (DESIGN §8): a codec this machine has no encoder for stays - // on the row, greyed, with the reason beside it -- the export card's own - // refusal rows, in the one place a codec is picked now. - let refused_tail = (!refusals.is_empty()).then(|| (refusals.join(" \u{b7} ").into(), INK4())); + // The row says *this* pick, and a refusal only where this pick is the one + // refused (user 2026-09-10: every other format's reason ran on after the + // value -- "funny"). Never hidden (DESIGN §8): when the current format is + // one this machine cannot write, the value greys and the reason stands + // beside it in six words; the formats a person is not on say nothing, + // because `c` never stops on them anyway ([`next_picture`]). + let refused_now: Option<(SharedString, u32)> = player + .session + .as_ref() + .and_then(|session| format_refusal(session, format)) + .map(|why| (short_reason(&why).into(), INK4())); + let picture_ink = if refused_now.is_some() { INK4() } else { INK1() }; let (codec, rated) = sound_codec(format); let seat = player.encoder_seat(); let av1_gpu = seat == EncoderSeat::Hardware && matches!(format, Format::Av1 | Format::Av1Mp4); @@ -655,19 +671,24 @@ fn export_section(player: &Player, cx: &mut Context) -> impl IntoElement .flex() .flex_col() .gap(px(2.)) - .child(section_head("EXPORT \u{b7} what a delivery is written as")) - .child(row_chord( + .child(room_head( + "settings-head-export", + "EXPORT", + "what a delivery is written as", + )) + .child(row_full( "settings-export-picture", "Picture", picture_label(format), "the codec the picture is written with and the box it lands in; the export moment asks only for the file and the budget", - "c", - refused_tail, + Some("c".into()), + refused_now, player, cx.listener(|this, _: &ClickEvent, _, cx| { this.cycle_export_picture(); cx.notify(); }), + picture_ink, )) .children(rated.then(|| { row_chord(