The settings columns get heads a person can find
Browse files at this commitfbea70a476beb47997a69bbced2ff0404f5e5300Parent: 1c2894a- style
- the settings columns get heads a person can find
3 changed files +116 -29
- DESIGN.md +2 -0
- crates/app/src/tests/layout.rs +64 -0
- crates/app/src/ui/settings_stance.rs +50 -29
DESIGN.mdmodified+2 -0
| @@ -78,6 +78,8 @@ Two faces, fixed roles (bundled, no runtime deps): | ||
| 78 | 78 | |
| 79 | 79 | Scale: 18px hero timecode (700, colons in `ink3`) · 15px labels/rows (500) · 13–14px chords |
| 80 | 80 | and metadata (500) · 12px section heads (Archivo 700, uppercase, +0.14em letter-spacing, `ink3`). |
| 81 | +Room/column heads (Settings) are 15px Archivo 700 `ink1`; in-list section heads stay 12px `ink3` | |
| 82 | +(2026-09-10 -- the settings columns read as body text and a person could not find them). | |
| 81 | 83 | Nothing below 10px. Every size is a whole pixel (no half-pixel sizes -- they put glyph baselines |
| 82 | 84 | off the pixel grid and blurred cosmic-text's AA). No italics. Tabular figures wherever digits |
| 83 | 85 | align. |
crates/app/src/tests/layout.rsmodified+64 -0
| @@ -3904,6 +3904,70 @@ fn no_region_root_wears_a_focus_ring() { | ||
| 3904 | 3904 | } |
| 3905 | 3905 | |
| 3906 | 3906 | |
| 3907 | +/// The user could not find the three columns (2026-09-10: "I couldn't realize | |
| 3908 | +/// them when I look at"), because their heads were 12px `ink3` -- the room's | |
| 3909 | +/// quietest type -- with a prose tail running on after each one. DESIGN §3's | |
| 3910 | +/// new line: a room/column head is 15px Archivo 700 `ink1`, and the prose is a | |
| 3911 | +/// hover plate (DESIGN §8), never ambient text on the head itself. | |
| 3912 | +#[test] | |
| 3913 | +fn the_settings_columns_wear_room_heads_not_section_heads() { | |
| 3914 | + let source = src_text("ui/settings_stance.rs"); | |
| 3915 | + let start = source.find("fn room_head(").expect("the room head"); | |
| 3916 | + let body = &source[start..source[start..].find("\n}\n").unwrap() + start]; | |
| 3917 | + for needle in [ | |
| 3918 | + "type_scale::LABEL_ROW_PX", | |
| 3919 | + "FontWeight::BOLD", | |
| 3920 | + "rgb(INK1())", | |
| 3921 | + ".tooltip(", | |
| 3922 | + ".pb(px(12.))", | |
| 3923 | + ] { | |
| 3924 | + assert!(body.contains(needle), "a room head lost {needle}"); | |
| 3925 | + } | |
| 3926 | + assert!( | |
| 3927 | + !body.contains("INK3()") && !body.contains("type_scale::head()"), | |
| 3928 | + "the room heads fell back to the 12px in-list section head" | |
| 3929 | + ); | |
| 3930 | + // Each column head is one word, and its prose lives on the plate. | |
| 3931 | + for head in ["\"PROJECT\"", "\"EDITOR\"", "\"EXPORT\""] { | |
| 3932 | + assert!(source.contains(head), "the settings room lost its {head} head"); | |
| 3933 | + } | |
| 3934 | + for run_on in ["PROJECT \u{b7}", "EDITOR \u{b7}", "EXPORT \u{b7}"] { | |
| 3935 | + assert!( | |
| 3936 | + !source.contains(run_on), | |
| 3937 | + "a settings head grew its prose tail back: {run_on}" | |
| 3938 | + ); | |
| 3939 | + } | |
| 3940 | +} | |
| 3941 | + | |
| 3942 | +/// The Picture row said every refused format's reason after its value | |
| 3943 | +/// (`H.264 no picture -- an mp4 would \u{b7} AV1 no picture -- ...`; the user | |
| 3944 | +/// called it "funny"). A row says its own pick: one value, and a refusal only | |
| 3945 | +/// when *that* pick is the refused one. | |
| 3946 | +#[test] | |
| 3947 | +fn the_picture_row_tail_is_the_current_format_alone() { | |
| 3948 | + let source = src_text("ui/settings_stance.rs"); | |
| 3949 | + let start = source.find("fn export_section(").expect("the export section"); | |
| 3950 | + let body = &source[start..]; | |
| 3951 | + let body = &body[..body.find("\n/// The page itself").expect("the page's render fn")]; | |
| 3952 | + assert!( | |
| 3953 | + !body.contains("PICTURE_CYCLE"), | |
| 3954 | + "the Picture row walks the whole cycle to build its tail again" | |
| 3955 | + ); | |
| 3956 | + assert!( | |
| 3957 | + !body.contains(".join("), | |
| 3958 | + "an EXPORT row concatenates a list into one row's tail again" | |
| 3959 | + ); | |
| 3960 | + assert!( | |
| 3961 | + body.contains("format_refusal(session, format)"), | |
| 3962 | + "the Picture row's refusal is no longer asked about the current format" | |
| 3963 | + ); | |
| 3964 | + // Six words at most, and the value greys with the refusal it carries. | |
| 3965 | + assert!( | |
| 3966 | + body.contains("short_reason(&why)") && body.contains("picture_ink"), | |
| 3967 | + "the Picture row lost its short reason or its greyed value" | |
| 3968 | + ); | |
| 3969 | +} | |
| 3970 | + | |
| 3907 | 3971 | /// The monitoring level's home. Cleanse round 2 took the mute button, the |
| 3908 | 3972 | /// `- +` pair and the slider off the time band on the promise that the level |
| 3909 | 3973 | /// "lives in Settings" (DESIGN 5) -- a promise nothing kept until this row, |
crates/app/src/ui/settings_stance.rsmodified+50 -29
| @@ -37,18 +37,27 @@ use crate::ui::type_scale; | ||
| 37 | 37 | use crate::*; |
| 38 | 38 | use engine::colorspace::ContentLight; |
| 39 | 39 | |
| 40 | -/// A 9px uppercase Archivo section head, `ink3` -- [`dock_stance::section_head`]'s | |
| 41 | -/// exact shape, repeated rather than imported across a `pub(crate)` seam for | |
| 42 | -/// one nine-line function. | |
| 43 | -fn section_head(text: impl Into<SharedString>) -> impl IntoElement { | |
| 44 | - let style = type_scale::head(); | |
| 40 | +/// The room's three anchors (user 2026-09-10: "I couldn't realize them when I | |
| 41 | +/// look at"): 15px Archivo 700 `ink1`, uppercase, with a row's own height of | |
| 42 | +/// air below (+12px past a row's gap) so a head reads as the start of a | |
| 43 | +/// column and not as one more line in it. The prose that used to trail each | |
| 44 | +/// head (`· stored in the .edith file`) is a hover plate on the head now, | |
| 45 | +/// ≤6 words -- DESIGN §8: a distinction that matters is a plate, not ambient | |
| 46 | +/// text. In-list section heads (the dock's own KEYS head) stay 12px | |
| 47 | +/// `ink3`. | |
| 48 | +fn room_head(id: &'static str, text: &'static str, tail: &'static str) -> impl IntoElement { | |
| 49 | + let style = type_scale::label(type_scale::LABEL_ROW_PX, gpui::FontWeight::BOLD); | |
| 50 | + let tail: SharedString = tail.into(); | |
| 45 | 51 | div() |
| 52 | + .id(id) | |
| 46 | 53 | .flex_none() |
| 47 | 54 | .pt(px(4.)) |
| 55 | + .pb(px(12.)) | |
| 48 | 56 | .font(style.font) |
| 49 | 57 | .text_size(style.size) |
| 50 | - .text_color(rgb(INK3())) | |
| 51 | - .child(text.into()) | |
| 58 | + .text_color(rgb(INK1())) | |
| 59 | + .tooltip(move |_, cx| cx.new(|_| Tip(tail.clone())).into()) | |
| 60 | + .child(text) | |
| 52 | 61 | } |
| 53 | 62 | |
| 54 | 63 | /// 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<Player>) -> impl IntoElemen | ||
| 318 | 327 | .flex() |
| 319 | 328 | .flex_col() |
| 320 | 329 | .gap(px(2.)) |
| 321 | - .child(section_head("PROJECT · stored in the .edith file")) | |
| 330 | + .child(room_head( | |
| 331 | + "settings-head-project", | |
| 332 | + "PROJECT", | |
| 333 | + "stored in the .edith file", | |
| 334 | + )) | |
| 322 | 335 | .child(row_ink( |
| 323 | 336 | "settings-resolution", |
| 324 | 337 | "Resolution", |
| @@ -405,7 +418,11 @@ fn editor_section(player: &Player, cx: &mut Context<Player>) -> impl IntoElement | ||
| 405 | 418 | .flex() |
| 406 | 419 | .flex_col() |
| 407 | 420 | .gap(px(2.)) |
| 408 | - .child(section_head("EDITOR · this machine, this window")) | |
| 421 | + .child(room_head( | |
| 422 | + "settings-head-editor", | |
| 423 | + "EDITOR", | |
| 424 | + "this machine, this window", | |
| 425 | + )) | |
| 409 | 426 | // The monitoring level, which lost its slider when the time band was |
| 410 | 427 | // cleansed (DESIGN §5 -- "the level lives in Settings"). A readout and |
| 411 | 428 | // 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 { | ||
| 567 | 584 | |
| 568 | 585 | /// The next file in [`PICTURE_CYCLE`] this machine can actually write. |
| 569 | 586 | /// `refused` is the same door [`Player::set_format`] asks, so the stroke never |
| 570 | -/// stops on a codec the setter would only refuse back -- the refused ones are | |
| 571 | -/// still *said*, on the row's own greyed tail (DESIGN §8: never hidden). | |
| 587 | +/// stops on a codec the setter would only refuse back -- a refusal is said on | |
| 588 | +/// the row only when the *current* pick is the refused one (DESIGN §8: never | |
| 589 | +/// hidden, never a list of the reasons for formats nobody picked). | |
| 572 | 590 | /// `current` where every other stop is refused, so `c` cannot cycle to |
| 573 | 591 | /// nothing. |
| 574 | 592 | 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 { | ||
| 625 | 643 | /// the budget; the codec, the sound, the encoder and the range are here. |
| 626 | 644 | fn export_section(player: &Player, cx: &mut Context<Player>) -> impl IntoElement { |
| 627 | 645 | let format = player.format; |
| 628 | - let refusals: Vec<String> = PICTURE_CYCLE | |
| 629 | - .into_iter() | |
| 630 | - .filter_map(|f| { | |
| 631 | - player | |
| 632 | - .session | |
| 633 | - .as_ref() | |
| 634 | - .and_then(|session| format_refusal(session, f)) | |
| 635 | - .map(|why| format!("{} {}", format_label(f), short_reason(&why))) | |
| 636 | - }) | |
| 637 | - .collect(); | |
| 638 | - // Never hidden (DESIGN §8): a codec this machine has no encoder for stays | |
| 639 | - // on the row, greyed, with the reason beside it -- the export card's own | |
| 640 | - // refusal rows, in the one place a codec is picked now. | |
| 641 | - let refused_tail = (!refusals.is_empty()).then(|| (refusals.join(" \u{b7} ").into(), INK4())); | |
| 646 | + // The row says *this* pick, and a refusal only where this pick is the one | |
| 647 | + // refused (user 2026-09-10: every other format's reason ran on after the | |
| 648 | + // value -- "funny"). Never hidden (DESIGN §8): when the current format is | |
| 649 | + // one this machine cannot write, the value greys and the reason stands | |
| 650 | + // beside it in six words; the formats a person is not on say nothing, | |
| 651 | + // because `c` never stops on them anyway ([`next_picture`]). | |
| 652 | + let refused_now: Option<(SharedString, u32)> = player | |
| 653 | + .session | |
| 654 | + .as_ref() | |
| 655 | + .and_then(|session| format_refusal(session, format)) | |
| 656 | + .map(|why| (short_reason(&why).into(), INK4())); | |
| 657 | + let picture_ink = if refused_now.is_some() { INK4() } else { INK1() }; | |
| 642 | 658 | let (codec, rated) = sound_codec(format); |
| 643 | 659 | let seat = player.encoder_seat(); |
| 644 | 660 | let av1_gpu = seat == EncoderSeat::Hardware && matches!(format, Format::Av1 | Format::Av1Mp4); |
| @@ -655,19 +671,24 @@ fn export_section(player: &Player, cx: &mut Context<Player>) -> impl IntoElement | ||
| 655 | 671 | .flex() |
| 656 | 672 | .flex_col() |
| 657 | 673 | .gap(px(2.)) |
| 658 | - .child(section_head("EXPORT \u{b7} what a delivery is written as")) | |
| 659 | - .child(row_chord( | |
| 674 | + .child(room_head( | |
| 675 | + "settings-head-export", | |
| 676 | + "EXPORT", | |
| 677 | + "what a delivery is written as", | |
| 678 | + )) | |
| 679 | + .child(row_full( | |
| 660 | 680 | "settings-export-picture", |
| 661 | 681 | "Picture", |
| 662 | 682 | picture_label(format), |
| 663 | 683 | "the codec the picture is written with and the box it lands in; the export moment asks only for the file and the budget", |
| 664 | - "c", | |
| 665 | - refused_tail, | |
| 684 | + Some("c".into()), | |
| 685 | + refused_now, | |
| 666 | 686 | player, |
| 667 | 687 | cx.listener(|this, _: &ClickEvent, _, cx| { |
| 668 | 688 | this.cycle_export_picture(); |
| 669 | 689 | cx.notify(); |
| 670 | 690 | }), |
| 691 | + picture_ink, | |
| 671 | 692 | )) |
| 672 | 693 | .children(rated.then(|| { |
| 673 | 694 | row_chord( |