forge
Explore
Log in

Don't you dare go Hollow

Calmer surfaces — viz section head, quieter export card, settings tabs

Browse files at this commit

3690c869afb1872548c421cb5ff2df3259448d07Ahmet Kaan GümüşParent: bc8b82e
  • ui
    • calmer surfaces — viz section head, quieter export card, settings tabs
Show full message
💄 ui(cards,settings,dock): calmer surfaces — viz section head, quieter export card, settings tabs

- dock CLIP tab groups the visualizer cluster under a VISUALIZER
  section head, the same section_head the KEYS list already wears
- export progress card drops both helper sentences ('esc alone does
  nothing…', 'cancelling deletes…'); the % line, codec/seat line and
  src → dst line stay, and the two-press cancel buttons speak for
  themselves
- settings plate is a PROJECT/EDITOR/EXPORT tab strip in the dock's
  tab look, one section at a time, replacing the three side-by-side
  columns; each tab's hover carries the section's one-line why; the
  pick persists across close/open like the dock's tab
- DESIGN.md records the tab strip; the room-head pin is repinned as
  a tab-strip pin
DESIGN.mdmodified+4 -1
@@ -78,8 +78,11 @@ Two faces, fixed roles (bundled, no runtime deps):
7878
7979 Scale: 18px hero timecode (700, colons in `ink3`) · 15px labels/rows (500) · 13–14px chords
8080 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`
81+Room/column heads are 15px Archivo 700 `ink1`; in-list section heads stay 12px `ink3`
8282 (2026-09-10 -- the settings columns read as body text and a person could not find them).
83+Settings itself is a tab strip since 2026-09-19 (one section shows at a time), so its heads are
84+gone: the tabs wear the dock's tab look instead -- 15px Archivo 500, the showing tab marked by a
85+1px `ink1` top rule and `ink1` text, the resting one `ink3`.
8386 Nothing below 10px. Every size is a whole pixel (no half-pixel sizes -- they put glyph baselines
8487 off the pixel grid and blurred cosmic-text's AA). No italics. Tabular figures wherever digits
8588 align.
crates/app/src/main.rsmodified+10 -0
@@ -567,6 +567,15 @@ struct Player {
567567 /// list). Cleared by [`Player::close_card`], the one reset list every
568568 /// opener routes through.
569569 settings_open: bool,
570+ /// Which of the settings page's three tabs is showing
571+ /// ([`ui::settings_stance::render`]'s strip). A field rather than state
572+ /// inside the page so a close and a reopen return to the section a hand
573+ /// left; it is deliberately *not* in [`Player::close_card`]'s reset list,
574+ /// the same way the dock's tab pick outlives its panel
575+ /// ([`Player::dock_src_active`]). Nothing but the strip reads it, and
576+ /// picking a tab writes no project value, so the pick never arms
577+ /// autosave.
578+ settings_tab: ui::settings_stance::SettingsTab,
570579 /// Where the actions list is scrolled to. Held here rather than left to
571580 /// the wheel alone: forty actions are four times what a 360 px window
572581 /// shows, and the rows past the fold have to be reachable from the
@@ -1057,6 +1066,7 @@ fn main() {
10571066 keymap: keymap.clone(),
10581067 keys_open: false,
10591068 settings_open: false,
1069+ settings_tab: ui::settings_stance::SettingsTab::Project,
10601070 keys_scroll: ScrollHandle::new(),
10611071 lanes_scroll: ScrollHandle::new(),
10621072 eq_scroll: ScrollHandle::new(),
crates/app/src/player/cards.rsmodified+20 -6
@@ -2,6 +2,7 @@
22 //! silence, the mixer and the equalizer.
33
44 use crate::*;
5+use crate::ui::settings_stance::SettingsTab;
56
67 impl Player {
78 /// Cycles the *project's* resolution through [`RESOLUTIONS`], starting from
@@ -927,12 +928,12 @@ impl Player {
927928 self.apply_encoder(EncoderSeat::ALL[(at + 1) % EncoderSeat::ALL.len()], cx);
928929 }
929930
930- /// Opens the settings page (PROJECT rows beside EDITOR rows,
931- /// `ui::settings_stance`): the one door for "edit project and editor
932- /// settings" -- refused while an export is running, same as every other
933- /// card here, since the exporting card owns this same modal slot
934- /// (`oracle.rs` agrees: `ActionId::Settings` is `No` there too, for the
935- /// same reason).
931+ /// Opens the settings page (three tabs -- PROJECT/EDITOR/EXPORT -- over
932+ /// whichever section is showing, `ui::settings_stance`): the one door for
933+ /// "edit project and editor settings" -- refused while an export is
934+ /// running, same as every other card here, since the exporting card owns
935+ /// this same modal slot (`oracle.rs` agrees: `ActionId::Settings` is `No`
936+ /// there too, for the same reason).
936937 pub(crate) fn open_settings(&mut self, cx: &mut Context<Self>) {
937938 if self.exporting().is_some() {
938939 return;
@@ -944,6 +945,19 @@ impl Player {
944945 cx.notify();
945946 }
946947
948+ /// Which of the settings page's three tabs is showing -- the strip's one
949+ /// door, and the page's only piece of state that [`Self::close_card`]
950+ /// leaves alone, so a close and a reopen come back to the section a hand
951+ /// left rather than snapping back to PROJECT. Display state and nothing
952+ /// else: no row reads it, it writes no project value, and it therefore
953+ /// never lights the ledger or arms autosave -- picking a tab is not an
954+ /// edit, which is why this is a setter with no [`Self::mark_dirty`] in
955+ /// it, unlike every row the page carries that writes a value.
956+ pub(crate) fn set_settings_tab(&mut self, tab: SettingsTab, cx: &mut Context<Self>) {
957+ self.settings_tab = tab;
958+ cx.notify();
959+ }
960+
947961 pub(crate) fn open_subtitle_style(&mut self, cx: &mut Context<Self>) {
948962 // One card at a time -- `close_card`'s own rule.
949963 self.close_card();
crates/app/src/tests/layout.rsmodified+57 -16
@@ -2338,9 +2338,10 @@ fn every_darkroom_menu_sizes_its_list_against_the_floor_room_not_the_raw_viewpor
23382338 /// (`ui::dock_stance::config_path`/`ui::theme::config_path`/
23392339 /// `keymap::Keymap::config_path`) directly, which every editor-side row
23402340 /// already routes around through its own opener. A row wired to the wrong
2341-/// section's opener is exactly the regression a page organised around two
2342-/// headings invites; this pins each half to its own doors so the two lists
2343-/// cannot cross.
2341+/// section's opener is exactly the regression a page organised around named
2342+/// sections invites -- and the tab strip did not loosen it: a tab decides
2343+/// which section is *shown*, never which door a row opens. This pins each
2344+/// half to its own doors so the two lists cannot cross.
23442345 #[test]
23452346 fn settings_project_and_editor_sections_open_disjoint_doors() {
23462347 let source = src_text("ui/settings_stance.rs");
@@ -4019,37 +4020,77 @@ fn no_region_root_wears_a_focus_ring() {
40194020
40204021 /// The user could not find the three columns (2026-09-10: "I couldn't realize
40214022 /// them when I look at"), because their heads were 12px `ink3` -- the room's
4022-/// quietest type -- with a prose tail running on after each one. DESIGN §3's
4023-/// new line: a room/column head is 15px Archivo 700 `ink1`, and the prose is a
4024-/// hover plate (DESIGN §8), never ambient text on the head itself.
4023+/// quietest type -- with a prose tail running on after each one. The page's
4024+/// answer has since become a tab strip (user 2026-09-19): three columns at
4025+/// once asked the eye to find three anchors in one glance and then to read a
4026+/// column that began mid-screen. The pin moved with the page: the sections are
4027+/// tabs now, each tab wears the dock's own tab look -- [`crate::ui::dock_stance`]'s
4028+/// `dock_tab`, reproduced here because that fn is private to its module -- and
4029+/// each section's one-line explanation rides the tab's hover plate
4030+/// (DESIGN §8), never running on after a head as ambient text.
40254031 #[test]
4026-fn the_settings_columns_wear_room_heads_not_section_heads() {
4032+fn the_settings_sections_are_tabs_that_carry_their_own_explanation() {
40274033 let source = src_text("ui/settings_stance.rs");
4028- let start = source.find("fn room_head(").expect("the room head");
4034+ let start = source.find("fn settings_tab(").expect("the tab builder");
40294035 let body = &source[start..source[start..].find("\n}\n").unwrap() + start];
4036+ // The dock's own tab look: no pill, no fill; a 1px `ink1` top rule and
4037+ // `ink1` text mark the showing tab, the resting one is `ink3`. Every tab
4038+ // is a `hitmap::control` wearing a plate of its own (the hover-line gate
4039+ // below counts the plates one to one).
40304040 for needle in [
40314041 "type_scale::LABEL_ROW_PX",
4032- "FontWeight::BOLD",
4042+ "gpui::FontWeight::MEDIUM",
4043+ "border_t_1()",
40334044 "rgb(INK1())",
4045+ "INK3()",
4046+ ".cursor_pointer()",
40344047 ".tooltip(",
4035- ".pb(px(12.))",
4048+ "hitmap::control(",
40364049 ] {
4037- assert!(body.contains(needle), "a room head lost {needle}");
4050+ assert!(body.contains(needle), "a settings tab lost {needle}");
40384051 }
40394052 assert!(
4040- !body.contains("INK3()") && !body.contains("type_scale::head()"),
4041- "the room heads fell back to the 12px in-list section head"
4053+ !body.contains("type_scale::head()"),
4054+ "the settings tabs fell back to the 12px in-list section head"
40424055 );
4043- // Each column head is one word, and its prose lives on the plate.
4044- for head in ["\"PROJECT\"", "\"EDITOR\"", "\"EXPORT\""] {
4045- assert!(source.contains(head), "the settings room lost its {head} head");
4056+ // Three tabs, one per section, named the way the room names the section.
4057+ for tab in ["project", "editor", "export"] {
4058+ assert!(
4059+ source.contains(&format!("\"settings-tab-{tab}\"")),
4060+ "the settings strip has no {tab} tab"
4061+ );
4062+ }
4063+ // Each section's one-line explanation is the tab's plate now.
4064+ for explanation in [
4065+ "stored in the .edith file",
4066+ "this machine, this window",
4067+ "what a delivery is written as",
4068+ ] {
4069+ assert!(
4070+ source.contains(explanation),
4071+ "a settings tab lost its explanation: {explanation}"
4072+ );
40464073 }
4074+ // ...and none of them runs on after a head as ambient text.
40474075 for run_on in ["PROJECT \u{b7}", "EDITOR \u{b7}", "EXPORT \u{b7}"] {
40484076 assert!(
40494077 !source.contains(run_on),
40504078 "a settings head grew its prose tail back: {run_on}"
40514079 );
40524080 }
4081+ // One section shows at a time: the plate mounts the showing tab's own
4082+ // section and nothing else -- a page that drew all three under the strip
4083+ // would be the three columns back with the strip doing nothing.
4084+ for (tab, section) in [
4085+ ("SettingsTab::Project", "project_section(player, cx)"),
4086+ ("SettingsTab::Editor", "editor_section(player, cx)"),
4087+ ("SettingsTab::Export", "export_section(player, cx)"),
4088+ ] {
4089+ assert!(
4090+ source.contains(&format!("{tab} => {section}")),
4091+ "the {tab} tab no longer shows {section}"
4092+ );
4093+ }
40534094 }
40544095
40554096 /// The Picture row said every refused format's reason after its value
crates/app/src/ui/cards.rsmodified+0 -13
@@ -934,19 +934,6 @@ impl Player {
934934 .child(note(
935935 format!("{source} → {}", file_name(&self.export_path)).into(),
936936 ))
937- .child(note(
938- match armed {
939- true => {
940- "cancelling deletes what has been written so far".to_string()
941- }
942- false => format!(
943- "{} cancels · esc alone does nothing while this runs · the \
944- timeline is read-only until it finishes",
945- self.keymap.display(ActionId::CancelExport)
946- ),
947- }
948- .into(),
949- ))
950937 // One button, or the pair that answers it: never a
951938 // control that cycles -- both choices are on screen at
952939 // once, each saying which one it is.
crates/app/src/ui/dock_stance.rsmodified+7 -0
@@ -1257,6 +1257,13 @@ fn viz_style_verbs(player: &Player, cx: &mut Context<Player>) -> impl IntoElemen
12571257 .flex()
12581258 .flex_col()
12591259 .gap(px(2.))
1260+ .child(
1261+ div()
1262+ .flex_none()
1263+ .pt(px(4.))
1264+ .px(px(8.))
1265+ .child(section_head("VISUALIZER")),
1266+ )
12601267 .child(pick(
12611268 "dock-viz-fill",
12621269 "Fill",
crates/app/src/ui/settings_stance.rsmodified+110 -72
@@ -1,6 +1,12 @@
11 //! The settings page (user complaint: "we should have a settings page that
2-//! we can edit project and editor settings"). Two clearly-headed sections,
3-//! per the split rule a rubric pass settled:
2+//! we can edit project and editor settings"). Three sections, per the split
3+//! rule a rubric pass settled -- but never three columns at once: they are
4+//! tabs of one strip since 2026-09-19 (user: the three-column row asked the
5+//! eye to find three anchors in one glance and then to read a column that
6+//! began mid-screen). One section shows under the strip; the strip wears the
7+//! dock's own tab look ([`crate::ui::dock_stance`]'s `dock_tab`, reproduced
8+//! here because that fn is private to its module) and each tab's hover plate
9+//! carries the one-line explanation the column head used to trail:
410 //!
511 //! - PROJECT: anything that changes the rendered output or is stored in the
612 //! `.edith` file -- resolution, fps, sample-rate, the HDR tonemap, the mix.
@@ -37,27 +43,61 @@ use crate::ui::type_scale;
3743 use crate::*;
3844 use engine::colorspace::ContentLight;
3945
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();
46+/// Which of the page's three sections is showing. Kept on [`Player`] beside
47+/// [`Player::settings_open`] rather than in the leaf, so a close and a reopen
48+/// return to the section a hand left instead of snapping back to the first --
49+/// the dock keeps its own tab pick the same way ([`Player::dock_src_active`]).
50+/// Display state and nothing else: no row reads it, and picking a tab writes
51+/// no project value, so the pick never lights the ledger.
52+#[derive(Clone, Copy, PartialEq, Eq, Debug)]
53+pub(crate) enum SettingsTab {
54+ Project,
55+ Editor,
56+ Export,
57+}
58+
59+/// One tab of the page's strip (PROJECT/EDITOR/EXPORT), wearing the dock's
60+/// own tab look -- [`crate::ui::dock_stance`]'s `dock_tab` verbatim: no pill,
61+/// no fill, no rounded button, a 1px `ink1` top rule and `ink1` text mark the
62+/// showing tab, the resting one is `ink3`, and the whole row is a
63+/// [`hitmap::control`] so the harness can press it. The section's one-line
64+/// explanation -- what used to run on after a column head as ambient prose --
65+/// is the tab's hover plate (DESIGN §8: a distinction that matters is a plate,
66+/// not ambient text).
67+fn settings_tab(
68+ id: &'static str,
69+ label_text: &'static str,
70+ explanation: &'static str,
71+ tab: SettingsTab,
72+ active: bool,
73+ cx: &mut Context<Player>,
74+) -> impl IntoElement {
75+ let style = type_scale::label(type_scale::LABEL_ROW_PX, gpui::FontWeight::MEDIUM);
5176 div()
5277 .id(id)
53- .flex_none()
54- .pt(px(4.))
55- .pb(px(12.))
56- .font(style.font)
57- .text_size(style.size)
58- .text_color(rgb(INK1()))
59- .tooltip(move |_, cx| cx.new(|_| Tip(tail.clone())).into())
60- .child(text)
78+ .flex_1()
79+ .flex()
80+ .items_center()
81+ .justify_center()
82+ .gap(px(4.))
83+ .pt(px(6.))
84+ .pb(px(6.))
85+ .when(active, |d| d.border_t_1().border_color(rgb(INK1())))
86+ .cursor_pointer()
87+ .on_click(cx.listener(move |this, _: &ClickEvent, _, cx| this.set_settings_tab(tab, cx)))
88+ .tooltip(crate::ui::widgets::tip_hover(
89+ &format!("Show {}", label_text.to_lowercase()),
90+ explanation,
91+ None,
92+ ))
93+ .children(hitmap::control(id, label_text, true))
94+ .child(
95+ div()
96+ .font(style.font.clone())
97+ .text_size(style.size)
98+ .text_color(rgb(if active { INK1() } else { INK3() }))
99+ .child(label_text),
100+ )
61101 }
62102
63103 /// One row: a ≤16-char label, its current value in mono (units carried,
@@ -327,11 +367,6 @@ fn project_section(player: &Player, cx: &mut Context<Player>) -> impl IntoElemen
327367 .flex()
328368 .flex_col()
329369 .gap(px(2.))
330- .child(room_head(
331- "settings-head-project",
332- "PROJECT",
333- "stored in the .edith file",
334- ))
335370 .child(row_ink(
336371 "settings-resolution",
337372 "Resolution",
@@ -418,11 +453,6 @@ fn editor_section(player: &Player, cx: &mut Context<Player>) -> impl IntoElement
418453 .flex()
419454 .flex_col()
420455 .gap(px(2.))
421- .child(room_head(
422- "settings-head-editor",
423- "EDITOR",
424- "this machine, this window",
425- ))
426456 // The monitoring level, which lost its slider when the time band was
427457 // cleansed (DESIGN §5 -- "the level lives in Settings"). A readout and
428458 // not a widget: the number is spent rarely, so the wheel over the row
@@ -671,11 +701,6 @@ fn export_section(player: &Player, cx: &mut Context<Player>) -> impl IntoElement
671701 .flex()
672702 .flex_col()
673703 .gap(px(2.))
674- .child(room_head(
675- "settings-head-export",
676- "EXPORT",
677- "what a delivery is written as",
678- ))
679704 .child(row_full(
680705 "settings-export-picture",
681706 "Picture",
@@ -795,11 +820,12 @@ pub(crate) fn render(
795820 .child(
796821 div()
797822 .id("settings-card")
798- // The whole footprint's width, two columns inside: at 720p a
799- // 420px single column put Mix, the palette and the subtitle
800- // font below a fold with no visible scrollbar -- settings an
801- // editor cannot see are settings only a chord reaches, which
802- // is the defect class this page exists to close.
823+ // The whole footprint's width: at 720p a 420px single column
824+ // put Mix, the palette and the subtitle font below a fold with
825+ // no visible scrollbar -- settings an editor cannot see are
826+ // settings only a chord reaches, which is the defect class
827+ // this page exists to close. The strip spends the width on
828+ // tabs, and one section shows flat beneath it.
803829 .w_full()
804830 .max_h(px((room - 12.).max(120.)))
805831 .on_mouse_down(MouseButton::Left, swallow)
@@ -836,42 +862,54 @@ pub(crate) fn render(
836862 .child(player.keymap.display(ActionId::Settings)),
837863 )
838864 })
865+ .child(
866+ div()
867+ .id("settings-tabs")
868+ .flex_none()
869+ .flex()
870+ .child(settings_tab(
871+ "settings-tab-project",
872+ "PROJECT",
873+ "stored in the .edith file",
874+ SettingsTab::Project,
875+ player.settings_tab == SettingsTab::Project,
876+ cx,
877+ ))
878+ .child(settings_tab(
879+ "settings-tab-editor",
880+ "EDITOR",
881+ "this machine, this window",
882+ SettingsTab::Editor,
883+ player.settings_tab == SettingsTab::Editor,
884+ cx,
885+ ))
886+ .child(settings_tab(
887+ "settings-tab-export",
888+ "EXPORT",
889+ "what a delivery is written as",
890+ SettingsTab::Export,
891+ player.settings_tab == SettingsTab::Export,
892+ cx,
893+ )),
894+ )
895+ // The showing section alone, on the plate's whole width: the
896+ // three columns this row used to hold side by side -- each
897+ // with its own head and a hairline down its left edge -- asked
898+ // the eye to find three anchors at once and then to read a
899+ // column that began mid-screen. The strip above is the way
900+ // between them; there is one section in the tree at a time, so
901+ // a row that is not showing cannot be reached by a tab stroke
902+ // or by the pointer either.
839903 .child(
840904 div()
841905 .id("settings-rows")
842906 .min_h(px(0.))
843907 .overflow_y_scroll()
844- .flex()
845- .gap(px(16.))
846- .child(
847- div()
848- .flex_1()
849- .min_w(px(0.))
850- .child(project_section(player, cx)),
851- )
852- .child(
853- div()
854- .flex_1()
855- .min_w(px(0.))
856- .border_l_1()
857- .border_color(rgb(DARK_HAIRLINE()))
858- .pl(px(12.))
859- .child(editor_section(player, cx)),
860- )
861- // The third column: what a delivery is written as, the
862- // rows the export card used to hold (user: it was "too
863- // complicated"). Beside the other two rather than under
864- // them -- a fold with no scrollbar is the defect this
865- // page's own two columns exist to avoid.
866- .child(
867- div()
868- .flex_1()
869- .min_w(px(0.))
870- .border_l_1()
871- .border_color(rgb(DARK_HAIRLINE()))
872- .pl(px(12.))
873- .child(export_section(player, cx)),
874- ),
908+ .child(match player.settings_tab {
909+ SettingsTab::Project => project_section(player, cx).into_any_element(),
910+ SettingsTab::Editor => editor_section(player, cx).into_any_element(),
911+ SettingsTab::Export => export_section(player, cx).into_any_element(),
912+ }),
875913 ),
876914 )
877915 }