Dragging a photograph out of the grid worked about half the time, and nothing on the screen explained the other half. `DragArea` and `Flickable` do arbitrate, but not evenly. The Flickable claims any press that travels more than eight pixels along its own axis within half a second of landing, and holds that claim until the finger lifts. So a drag toward the sidebar only ever began two ways: a flick sideways clean enough that the finger never wandered eight pixels vertically, or a wait of half a second before moving at all. Both are real gestures and neither was written down. The wait is now the gesture, and it has a mark. The long press that already turns on selection mode also picks the photograph up: a ring opens around the cell and the grid stops scrolling under it, so from that moment the drag is the only thing the finger can be doing. The cue can only arrive after the ambiguity has passed, which is the right way round — when the photograph lifts, dragging it works. Two details worth naming. The hold is now armed even when selection mode is already on; it used to be skipped there, on the grounds that there was no mode left to switch on — but that is precisely the state a forty-image drag starts from, so the one gesture that most needed a pick-up was the one with none. And the ring is drawn after the cell loop rather than on the cell: z-order inside a `for` is loop order, so a cell grown past its bounds would stand over two neighbours and be cut off by the other two. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
138 lines
4.9 KiB
Rust
138 lines
4.9 KiB
Rust
// @generated by `cargo run -p traceability -- gestures`. Do not edit.
|
|
//
|
|
// TRACES: FR-UI-4
|
|
//! The gesture vocabulary, as the application states it.
|
|
//!
|
|
//! Extracted from the tagged comments beside the code that implements each
|
|
//! one, so the help sheet cannot describe a gesture the application does not
|
|
//! have. Edit the comment beside the implementation, then regenerate with
|
|
//! `cargo run -p traceability -- gestures`.
|
|
|
|
/// One documented interaction, as drawn.
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
|
pub struct Gesture {
|
|
pub title: &'static str,
|
|
/// The place it applies, and the heading it is grouped under.
|
|
pub section: &'static str,
|
|
/// Empty where the gesture has no counterpart in that modality.
|
|
pub touch: &'static str,
|
|
pub pointer: &'static str,
|
|
pub keys: &'static str,
|
|
}
|
|
|
|
/// Every gesture, in the order the sections were first seen in the source.
|
|
pub const GESTURES: &[Gesture] = &[
|
|
Gesture {
|
|
title: "Pull a face out of the wrong person",
|
|
section: "People",
|
|
touch: "Tap the faces that do not belong, then \"Split off\"",
|
|
pointer: "Click the faces that do not belong, then \"Split off\"",
|
|
keys: "",
|
|
},
|
|
Gesture {
|
|
title: "Rule on a suggested face",
|
|
section: "People",
|
|
touch: "Tick to confirm it, cross to reject it",
|
|
pointer: "Tick to confirm it, cross to reject it",
|
|
keys: "",
|
|
},
|
|
Gesture {
|
|
title: "See a person's photographs",
|
|
section: "People",
|
|
touch: "Choose them in the rail, then \"Show photos\"",
|
|
pointer: "Choose them in the rail, then \"Show photos\"",
|
|
keys: "",
|
|
},
|
|
Gesture {
|
|
title: "Change how faces are grouped",
|
|
section: "People",
|
|
touch: "\"Grouping…\", move the dials, then Regroup",
|
|
pointer: "\"Grouping…\", move the dials, then Regroup",
|
|
keys: "",
|
|
},
|
|
Gesture {
|
|
title: "Start selecting several photographs",
|
|
section: "Library grid",
|
|
touch: "Press and hold a photograph, or press Select in the header",
|
|
pointer: "Ctrl-click, or press Select in the header",
|
|
keys: "",
|
|
},
|
|
Gesture {
|
|
title: "Add or remove one photograph",
|
|
section: "Library grid",
|
|
touch: "While selecting, tap it",
|
|
pointer: "Ctrl-click it",
|
|
keys: "",
|
|
},
|
|
Gesture {
|
|
title: "Leave selecting",
|
|
section: "Library grid",
|
|
touch: "Press Done in the header",
|
|
pointer: "Press Done in the header",
|
|
keys: "Escape",
|
|
},
|
|
Gesture {
|
|
title: "Pick a photograph up to drag it",
|
|
section: "Library grid",
|
|
touch: "Press and hold it until a ring opens around it, then drag",
|
|
pointer: "Drag it",
|
|
keys: "",
|
|
},
|
|
Gesture {
|
|
title: "Select a range",
|
|
section: "Library grid",
|
|
touch: "While selecting, press \"Select to…\", then tap the last photograph of the run",
|
|
pointer: "Shift-click the last photograph of the run",
|
|
keys: "",
|
|
},
|
|
Gesture {
|
|
title: "Find photographs with two people in them",
|
|
section: "Library grid",
|
|
touch: "Open the People chip on the filter bar, tap each name, then switch the chip beside them to \"all of them\"",
|
|
pointer: "Open the People chip on the filter bar, click each name, then switch the chip beside them to \"all of them\"",
|
|
keys: "",
|
|
},
|
|
Gesture {
|
|
title: "Resize the thumbnails",
|
|
section: "Library grid",
|
|
touch: "Pinch the grid with two fingers",
|
|
pointer: "Ctrl and the scroll wheel",
|
|
keys: "",
|
|
},
|
|
Gesture {
|
|
title: "File photographs in a collection",
|
|
section: "Library grid",
|
|
touch: "Drag a photograph — or a whole selection — onto a collection in the sidebar. Starting a drag stops the press becoming a hold, so it cannot leave you in selection mode.",
|
|
pointer: "Drag a photograph — or a whole selection — onto a collection in the sidebar",
|
|
keys: "",
|
|
},
|
|
Gesture {
|
|
title: "Open a photograph",
|
|
section: "Library grid",
|
|
touch: "Tap it — a single tap, any length",
|
|
pointer: "Click it",
|
|
keys: "",
|
|
},
|
|
Gesture {
|
|
title: "Rate a photograph without opening it",
|
|
section: "Library grid",
|
|
touch: "Tap a star on the cell",
|
|
pointer: "Hover the cell, then click a star",
|
|
keys: "0 to 5 on the selection",
|
|
},
|
|
Gesture {
|
|
title: "Drop the selection but keep selecting",
|
|
section: "Library grid",
|
|
touch: "Press Clear in the selection strip",
|
|
pointer: "Press Clear in the selection strip",
|
|
keys: "",
|
|
},
|
|
Gesture {
|
|
title: "Select everything the grid is showing",
|
|
section: "Library grid",
|
|
touch: "While selecting, press \"Select all\"",
|
|
pointer: "While selecting, press \"Select all\"",
|
|
keys: "",
|
|
},
|
|
];
|