From 24b3bde01852fbde3bbc6575298c6e1852b8f788 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 9 Sep 2026 23:08:43 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20remove(app):=20the=20clip=20menu?= =?UTF-8?q?=20is=20what=20this=20clip=20can=20be=20told,=20per=20kind?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Twenty-two rows scrolled inside their own plate, which is the junk drawer DESIGN §9 forbids. §8's class refusal, applied as written: the crossfade is the sound join and the dissolve the picture one, so each is hidden over the other kind -- a video clip's menu is Cut, the two trims, the loop-trim, the clipboard pair, Dissolve, Colour, Transform, Silences, Speed, Fit policy and the two destructive rows under the rule; an audio clip's is the same list with Crossfade, Equalizer and Silences in place of the picture cards. Gone from every clip menu: the trim-to-playhead pair (`^[`/`^]` is the keyboard's version of dragging a clip edge to a spot -- the pointer already has that gesture), the group trio (ctrl-click the halves *is* the grammar) and the global mute (the transport carries its button). All six keep their chords, their KEYS rows and, now, their named exemptions in the layout sweep. --- crates/app/src/menus.rs | 48 ++++++++++++++++++--------------- crates/app/src/oracle.rs | 9 +++++-- crates/app/src/tests/editing.rs | 13 +++++---- crates/app/src/tests/layout.rs | 30 ++++++++++++++++++++- 4 files changed, 68 insertions(+), 32 deletions(-) diff --git a/crates/app/src/menus.rs b/crates/app/src/menus.rs index 9edc9ab..bf29a11 100644 --- a/crates/app/src/menus.rs +++ b/crates/app/src/menus.rs @@ -188,45 +188,49 @@ impl RowItem { /// action a stroke already reaches -- the menu is a second way *to* the actions /// and never a second version of them -- so both the label and the hint come /// out of the keymap registry and the two can never disagree. -pub(crate) const MENU_ITEMS: [ActionId; 21] = [ +pub(crate) const MENU_ITEMS: [ActionId; 16] = [ ActionId::Cut, // The cut machinery (DESIGN.md §6) on the very clip it is about: the - // trims, their trim-to-playhead pair and the loop-trim were strokes the - // spine rail listed and nothing else did, and the subject cut a - // right-click names is exactly the one they act on. + // trims and the loop-trim were strokes the spine rail listed and nothing + // else did, and the subject cut a right-click names is exactly the one + // they act on. Their trim-to-playhead pair is *not* here: `^[` and `^]` + // are the keyboard's own version of a gesture the pointer already has -- + // drag the edge to where you want it -- so a row for them in the menu the + // pointer opens is the junk drawer §9 forbids. They keep their chords and + // their KEYS rows. ActionId::TrimIn, ActionId::TrimOut, - ActionId::TrimInToPlayhead, - ActionId::TrimOutToPlayhead, ActionId::LoopTrim, - // The clipboard pair, which had no door but a chord: copy takes the clip the - // menu names, and paste is the timeline's rather than this clip's -- the - // same kind of global item the mute below already is. + // The clipboard pair, which had no door but a chord: copy takes the clip + // the menu names, and paste is the timeline's rather than this clip's. ActionId::Copy, ActionId::Paste, - ActionId::Regroup, - ActionId::Detach, - ActionId::Group, - ActionId::Equalizer, - ActionId::Speed, - // The scan is a clip card like the two above it -- opened on whichever half - // was clicked -- and a card only a stroke could open is one a pointer never - // finds. - ActionId::Silence, - // The dissolve is a video clip's own join, same door as the crossfade - // above it would be for sound -- a stroke-only pair, opened here on - // whichever half was clicked. + // The two joins, one per kind, each hidden over the other kind + // (`oracle::enable`, DESIGN §8's class refusal): sound crossfades, picture + // dissolves, and neither is ever offered over the wrong waveform. + ActionId::Crossfade, ActionId::Dissolve, + // The picture cards... ActionId::Color, ActionId::Transform, + // ...and the sound ones, the same class refusal the other way round. + ActionId::Equalizer, + ActionId::Silence, + ActionId::Speed, ActionId::Fit, - ActionId::ToggleMute, // Last, under the rule line the render draws before the first of them // (DESIGN §9): the two that take the clip off the lane. ActionId::Delete, ActionId::Lift, ]; +// Not rows, and deliberately: the group trio (`Group`, `Detach`, `Regroup`) +// is the ctrl-click grammar plus its chords -- a group is made by picking the +// halves and taking it apart the same way -- and the mute is the *mix's*, +// which the transport already carries a button for. A clip menu is what this +// clip can be told (DESIGN §9, "Never a junk drawer"); those are told to the +// selection and to the project. + /// What a right-click on the bench itself offers -- the ruler and the empty /// stretch under the lanes. The verbs of the *timeline*: walking its cuts at /// either stride (DESIGN §6's odometer), what it is looked at through, and the diff --git a/crates/app/src/oracle.rs b/crates/app/src/oracle.rs index 961c19b..fc60289 100644 --- a/crates/app/src/oracle.rs +++ b/crates/app/src/oracle.rs @@ -210,7 +210,9 @@ pub(crate) fn enable(action: ActionId, ctx: Ctx) -> Enable { // -- class: what kind of thing the action is about. The equalizer // filters samples, and a video clip has none of its own here: the sound // is the audio lane's, clip for clip. - ActionId::Equalizer => match ctx.clip { + // The crossfade is the sound join, for the same reason: it fades one + // clip's samples into the next one's, and a picture has none. + ActionId::Equalizer | ActionId::Crossfade => match ctx.clip { Some((_, lane)) if lane.kind != LaneKind::Audio => { Enable::Hidden("this clip is picture") } @@ -218,7 +220,10 @@ pub(crate) fn enable(action: ActionId, ctx: Ctx) -> Enable { }, // A grade is a picture setting and an audio clip has no picture. A fit // policy is a picture setting for the same reason. - ActionId::Color | ActionId::Fit | ActionId::Transform => match ctx.clip { + // The dissolve is the picture join and the crossfade's mirror: two + // pictures cross, and there is no picture on a waveform to cross. + ActionId::Color | ActionId::Fit | ActionId::Transform | ActionId::Dissolve => match ctx.clip + { Some((_, lane)) if lane.kind != LaneKind::Video => Enable::Hidden("this clip is sound"), _ => Enable::Yes, }, diff --git a/crates/app/src/tests/editing.rs b/crates/app/src/tests/editing.rs index fab1c97..2e61258 100644 --- a/crates/app/src/tests/editing.rs +++ b/crates/app/src/tests/editing.rs @@ -335,14 +335,11 @@ fn a_caption_is_deleted_by_the_same_row_and_stroke_every_box_is() { menu_items(cap), vec![ ActionId::Paste, - ActionId::Detach, - ActionId::Group, - ActionId::ToggleMute, // Below the rule line the render draws before it, like every // other row that takes something away (DESIGN §9). ActionId::Delete, ], - "the caption's menu is its removal, its group rows, and the global ones", + "the caption's menu is its removal and the one global row left", ); // ...and the same reading with a clip under it is the clip menu, untouched: // the flag is off wherever a `Clip` was clicked. @@ -802,7 +799,6 @@ fn the_clip_menu_dims_what_the_playhead_is_not_on_and_stays_in_the_window() { // split off -- a row the next click of the playhead lights. for rows in [menu(a1, false, 30), menu(v1, false, 30), menu(v1, true, 30)] { assert!(rows.contains(&ActionId::Cut), "{rows:?}"); - assert!(rows.contains(&ActionId::Detach), "{rows:?}"); } // The actions card is the other half of the rule: it lists the whole // registry, so a class refusal is dimmed there with its reason and never @@ -2761,8 +2757,11 @@ fn every_verb_the_spine_carried_is_a_right_click_row() { (ActionId::WalkCutNext10, "bench"), (ActionId::TrimIn, "clip"), (ActionId::TrimOut, "clip"), - (ActionId::TrimInToPlayhead, "clip"), - (ActionId::TrimOutToPlayhead, "clip"), + // The trim-to-playhead pair is *not* in this list: `^[` and `^]` are + // the keyboard's version of dragging a clip edge to a spot, a gesture + // the pointer already has, so the clip menu leaves them out (DESIGN §9, + // "Never a junk drawer"). They keep their chords and their KEYS rows, + // which is what the layout sweep's exemption for them names. (ActionId::LoopTrim, "clip"), // VIEW (ActionId::ZoomOut, "bench"), diff --git a/crates/app/src/tests/layout.rs b/crates/app/src/tests/layout.rs index 66dc037..3ad17df 100644 --- a/crates/app/src/tests/layout.rs +++ b/crates/app/src/tests/layout.rs @@ -2447,7 +2447,6 @@ fn hdr_reference_rows_read_content_light_and_use_the_established_empty_state() { fn every_action_has_a_darkroom_widget_home_or_explicit_owner() { use crate::ActionId; const EXPLICITLY_OWNED_ELSEWHERE: &[(ActionId, &str)] = &[ - (ActionId::Crossfade, "fade parity owns crossfade controls"), ( ActionId::FocusPanels, "keyboard-only by design: a mouse already focuses whatever it \ @@ -2471,6 +2470,35 @@ fn every_action_has_a_darkroom_widget_home_or_explicit_owner() { accelerator for cycling that existing selection, not a new door -- legacy had no \ toolbar button for it either", ), + // The group trio: a group is *made* with the pointer already -- + // ctrl-click the halves and the grammar is the selection itself + // (DESIGN §9) -- so a row per verb in the clip menu was three rows + // saying what the click had already said. Chords and KEYS rows keep + // them reachable. + ( + ActionId::Group, + "made by ctrl-clicking the halves: the selection is the grammar", + ), + ( + ActionId::Detach, + "made by ctrl-clicking the halves: the selection is the grammar", + ), + ( + ActionId::Regroup, + "made by ctrl-clicking the halves: the selection is the grammar", + ), + // The keyboard's own trim: `^[` and `^]` do with a stroke what the + // pointer does by dragging the clip edge to the spot it wants, and + // that drag is the door -- a menu row for it would be a second name + // for a gesture the bench already answers. + ( + ActionId::TrimInToPlayhead, + "the pointer's version is dragging the clip edge to the playhead", + ), + ( + ActionId::TrimOutToPlayhead, + "the pointer's version is dragging the clip edge to the playhead", + ), // The rail's own eighteen are gone from this list: the right-click // parity (DESIGN §5 as amended 2026-09-09, user decision "option C") // gave every one of them a door on the thing it acts on -- the clip