diff --git a/crates/app/src/export_ui.rs b/crates/app/src/export_ui.rs index b1eeead..1eefd3b 100644 --- a/crates/app/src/export_ui.rs +++ b/crates/app/src/export_ui.rs @@ -47,7 +47,10 @@ pub(crate) fn sample_rate_choices(current: Option) -> Vec { let mut rows = vec![( Choice::SampleRate(None), "Source".into(), - "the first audio source's own rate".into(), + // A state word, the resolution list's rule: the six-word phrase this + // row wore ran past `MENU_W` and was cut mid-word like the size + // list's was. Nothing is resampled -- that is what the row means. + "unchanged".into(), current.is_none(), )]; rows.extend(SAMPLE_RATES.into_iter().map(|rate| { @@ -338,9 +341,11 @@ pub(crate) fn resolution_choices(current: (u32, u32), native: (u32, u32)) -> Vec Choice::Size(w, h), format!("{h}p").into(), match (w, h) == native { - // Short enough to sit beside the label inside `MENU_W`: - // the longer phrase lost its last word to the truncation. - true => format!("{w}x{h} · the media's own"), + // A state word, not prose (DESIGN §8): "· the media's own" + // lost its last word to `MENU_W` on the row a user read + // ("word cut"). `source` is the word the sample-rate list + // already says the same fact in. + true => format!("{w}x{h} source"), false => format!("{w}x{h}"), } .into(), diff --git a/crates/app/src/tests/cards.rs b/crates/app/src/tests/cards.rs index 2edac27..9f1b337 100644 --- a/crates/app/src/tests/cards.rs +++ b/crates/app/src/tests/cards.rs @@ -1393,9 +1393,10 @@ fn a_choice_list_offers_every_value_and_fits_the_smallest_window() { assert_eq!(*picked, *size == (1280, 720)); } // The media's own size says so: it is the one rung a person cannot read - // off a number they chose. + // off a number they chose -- in the one word the sample-rate list says + // the same fact in, since prose gets cut by `MENU_W` (user: "word cut"). let (.., native_detail, _) = &rows[3]; - assert!(native_detail.contains("the media's own"), "{native_detail}"); + assert!(native_detail.ends_with(" source"), "{native_detail}"); // A project at a size nobody listed still gets the whole list, with // nothing marked rather than a wrong row marked. assert!( @@ -2093,3 +2094,43 @@ fn the_seat_probe_is_not_keyed_on_the_budget() { "the export no longer writes at the budget on the row" ); } + +/// DESIGN §8, the class behind the user's "word cut" (2026-09-09): a picker +/// row's tail is a *state word* -- at most two -- because the plate is +/// `MENU_W` wide and prose loses its last word to the truncation on exactly +/// the row a reader is looking at (the resolution list's checked row read +/// "3840x2160 · the medi…"). The same rule for the settings page's own row +/// values: a value slot carries the state, never the door's noun elided to +/// an ellipsis ("Subtitle font Font…", "Mix Tracks…"). +#[test] +fn picker_row_tails_are_state_words_and_settings_values_carry_no_ellipsis() { + let lists = [ + resolution_choices((1280, 720), (3840, 2160)), + pending_resolution_choices(Some(RESOLUTIONS[1])), + pending_fps_choices(Some(FRAME_RATES[0])), + sample_rate_choices(None), + ]; + for (.., detail, _) in lists.iter().flatten() { + let words = detail.split_whitespace().count(); + assert!( + words <= 2, + "picker row tail {detail:?} is {words} words -- `MENU_W` cuts prose" + ); + assert!( + !detail.contains('\u{2026}') && !detail.contains('\u{b7}'), + "picker row tail {detail:?} carries prose punctuation" + ); + } + // Code lines only: the comments above the two rows this fixed quote the + // strings the bug shipped as. + let settings = src_text("ui/settings_stance.rs"); + for line in settings + .lines() + .filter(|l| !l.trim_start().starts_with("//")) + { + assert!( + !line.contains('\u{2026}'), + "a settings row value is elided with an ellipsis again: {line}" + ); + } +} diff --git a/crates/app/src/ui/settings_stance.rs b/crates/app/src/ui/settings_stance.rs index 1fc92de..82a272f 100644 --- a/crates/app/src/ui/settings_stance.rs +++ b/crates/app/src/ui/settings_stance.rs @@ -373,14 +373,25 @@ fn project_section(player: &Player, cx: &mut Context) -> impl IntoElemen None, content_ink, )) - .child(row( - "settings-mix", - "Mix", - "Tracks…", - "a fader per track and the limiter over the sum of them", - player, - cx.listener(|this, _: &ClickEvent, _, cx| this.open_mix(None, cx)), - )) + // A door row's value is the state behind the door, never the door's + // own noun: `Tracks…` read as a cut word and said nothing (user: + // "word cut"). No project, no tracks -- the page's one empty state. + .child({ + let (mix_val, mix_ink) = match player.mix_lanes().len() { + 0 => ("\u{2014}".to_string(), INK4()), + 1 => ("1 track".to_string(), INK1()), + n => (format!("{n} tracks"), INK1()), + }; + row_ink( + "settings-mix", + "Mix", + mix_val, + "a fader per track and the limiter over the sum of them", + player, + cx.listener(|this, _: &ClickEvent, _, cx| this.open_mix(None, cx)), + mix_ink, + ) + }) } /// EDITOR: this window's own decode/import policy and this person's own @@ -431,10 +442,16 @@ fn editor_section(player: &Player, cx: &mut Context) -> impl IntoElement this.open_picker(Pick::Theme, event.position(), cx) }), )) + // The family in force, said (user: "Subtitle font Font…" -- the + // value slot carried the door's noun, elided, never the pick). With + // nothing picked the window draws its own, which is one word. .child(row( "settings-subtitle-style", "Subtitle font", - "Font…", + player + .sub_family + .clone() + .unwrap_or_else(|| "default".to_string()), "the cue plate's own font and size -- kept in ~/.config/edith, never in a project", player, cx.listener(|this, _: &ClickEvent, _, cx| this.open_subtitle_style(cx)),