docs(app): R1 criteria for deselecting by a click on the drawing (D6b)
Owner U1 manual test 2026-11-12: a click outside any annotation must deselect. D6b supersedes D6's deferral to U2; code change and tests named, implementation awaits the go.
This commit is contained in:
1 parent
7a6eccf824
commit
541706cba9
2 files changed
+43
-4
No files matched your search
@@ -15,7 +15,8 @@ Companion: `TRIAL_STACK.md` (the dedicated manual trial stack, request §5).
|
||||
| D3 | The tab shows collapsible tiles: closed = short citation, type, citation count; open = full information, DOI, URL, actions. Instant search with a clear button. Sort by document order (default), A to Z, citation count or type. Sorting never changes the document; reorder commands only while document order is shown. |
|
||||
| D4 | Kept: unsaved changes, focus, « Aller à », permissions, read-only mode, accessibility tests. Below 640 px, Références goes in the « Plus » menu. Boards validated before any UI code. |
|
||||
| D5 | History reads « Défaire » / « Refaire » instead of « Annuler » / « Rétablir », with explicit accessible names, the keyboard shortcuts kept and the distinction from dialog « Annuler » buttons kept. |
|
||||
| D6 | A « Désélectionner » button near « Supprimer ». Escape deselects when no dialog, priority panel, menu or tracing in progress consumes it. Deselecting is interface state: no document change, no history entry. A click on an empty part of the drawing is left to U2. |
|
||||
| D6 | A « Désélectionner » button near « Supprimer ». Escape deselects when no dialog, priority panel, menu or tracing in progress consumes it. Deselecting is interface state: no document change, no history entry. A click on an empty part of the drawing is left to U2 (superseded by D6b). |
|
||||
| D6b | Owner, 2026-11-12, after the U1 manual test on the trial stack: a click or a tap on the drawing anywhere but on an annotation deselects (a bone or any non-interactive SVG shape, an empty part of the drawing); a click on an annotation still selects it; a drag, a pan, a zoom or a touch navigation gesture never deselects; with nothing selected a click changes nothing; same behaviour with a mouse and on a touch screen. Joins R1, beside « Désélectionner » and Escape. |
|
||||
| D7 | Sheet list: instant search with clear, sort by last modification (default) or name, the last-modification date visible, better Administration home cards. No section built on UUIDs, names, slugs or test conventions; generic for every species; no artificial test filter. |
|
||||
| D8 | A dedicated, persistent manual trial stack, separate from the automated sandbox: technical plan only, nothing created, reset or deleted now (`TRIAL_STACK.md`). |
|
||||
| D9 | Three separate test anomalies tracked apart from U1 and U2: A fictitious fingerprints, B working copy never archived by `sheets-admin.sandbox.ts`, C integrity failure invisible in catalogue cards (section 5). |
|
||||
@@ -52,7 +53,7 @@ Boards 23 to 30 in `docs/design/v1-2-6-r0/` (sources, data generated from the eq
|
||||
owner validates each board, or asks for corrections; the validated boards then join `docs/design/README.md` as the
|
||||
reference of R1 to R4.
|
||||
|
||||
### R1 — History labels and deselection (D5, D6)
|
||||
### R1 — History labels and deselection (D5, D6, D6b)
|
||||
|
||||
- Labels: `editor.history.*` keys in `apps/app/src/i18n/fr.ts` and `en.ts` (FR « Défaire » / « Refaire », names
|
||||
« Défaire la dernière modification » and « Refaire la dernière modification défaite »; EN « Undo » / « Redo »
|
||||
@@ -67,13 +68,50 @@ reference of R1 to R4.
|
||||
workspace, at the bubbling phase, deselects only when `event.defaultPrevented` is false, no dialog is open, no menu
|
||||
is open and no tracing runs; each consumer marks the key handled. The « Plus » menu's own Escape path is checked
|
||||
first (it has no explicit handler today).
|
||||
- Click on the drawing (D6b). Today, with the select tool, `clickHandler` in
|
||||
`apps/app/src/editor/annotations/useCanvasGestures.ts:57-68` calls `onSelect` only when the target has a
|
||||
`[data-anno-id]` ancestor (`annotationIdOf`, `useCanvasBuild.ts:91-94`) and ignores every other click: that is the
|
||||
defect. Change: the other branch calls a new `onDeselect` input; `EditableAnnotations.tsx` (`CanvasStage`) wires
|
||||
it to the same deselect path as the button, and only when an annotation is selected (nothing selected: no
|
||||
dispatch, so a pending keyboard creation, its typed fields and the « Filtrer par nom » term stay). The read-only
|
||||
twin (`AnnotationsTab.tsx:187`) draws through `CatalogueCanvas`, whose click listener
|
||||
(`CatalogueCanvas.tsx:99-104`) gets an optional `onEmpty` with the same rule; the catalogue reader page
|
||||
(`SheetRoute.tsx:150`) passes none and is unchanged.
|
||||
- Interactive means any `[data-anno-id]` element of the composed view: a point (hitbox and disc), a zone (filled,
|
||||
`pointer-events` all, `docs/ANNOTATION-RENDERING.md`), a detail link. A click inside a zone selects that zone, as
|
||||
today. Everything else in the canvas box deselects: a shape of the drawing (bone, outline, any path, rect,
|
||||
circle or group), the drawing's background, the box margin around the drawing.
|
||||
- Drawing tools (point, zone, link) and a tracing: unchanged, a click places or adds a vertex.
|
||||
- Gestures: the existing `swallowClick` of `useFraming` (a press that moved more than 4 CSS px: pan, marker drag,
|
||||
pinch) already keeps the click from acting; in addition a press during which a second pointer came down (a
|
||||
two-finger tap or a pinch that moved less than 4 px) never deselects, tracked in the canvas hooks so that
|
||||
`useFraming`, shared with the catalogue reader, is unchanged. The wheel, Ctrl+wheel, the keyboard pan and zoom,
|
||||
the zoom buttons and a touch scroll of the page (it ends in `pointercancel`) produce no click on the drawing.
|
||||
- Effect: the selection and its contextual panel are reset (the overview comes back); document text, handle
|
||||
version, history length and the save line unchanged; no save, no history entry. A field typed in the panel and
|
||||
not blurred is committed by its own blur before the click, exactly as with « Toutes les annotations » today.
|
||||
- Focus and announcement: the click leaves the focus on the drawing box it landed on (no jump to the list row,
|
||||
which stays the rule of the « Désélectionner » button, A6); the same polite announcement as the button.
|
||||
- Unit tests for D6b (`apps/app/tests/unit/editor-annotations-tab.test.tsx`, happy-dom; the test drawing has an inner
|
||||
`<rect>`): with a selection, a click on the drawing's inner `<rect>`, on its root `<svg>` and on the box margin
|
||||
each deselect, document text, handle version and history length unchanged; a click on another marker selects it,
|
||||
on the selected one keeps it; nothing selected, a click on the `<rect>` changes nothing and a pending keyboard
|
||||
creation keeps its typed name; a press moved more than 4 px on the `<rect>` (pan), a marker drag and a press with
|
||||
a second pointer keep the selection; undo after a click deselect undoes the previous edit; the focus stays on the
|
||||
box and the announcement is made; the read-only twin deselects on the `<rect>`; `CatalogueCanvas` without
|
||||
`onEmpty` keeps today's behaviour.
|
||||
- Unit tests: deselect leaves the document text and the history length unchanged; undo after a deselect undoes the
|
||||
previous edit; the Escape matrix (dialog, menu, panel, tracing, nothing open) with one consumer each time; focus
|
||||
after « Désélectionner »: the annotation's list row if it still exists, else the drawing, with no new selection
|
||||
and a polite announcement (A6 as ratified); accessible names of both history buttons in FR and EN; read-only modes
|
||||
show « Désélectionner » and no « Supprimer ».
|
||||
- E2E: the journeys that name « Annuler » / « Rétablir » rewritten one for one; a new desktop spec for the button and
|
||||
Escape; axe on Annotations with a selection.
|
||||
Escape; axe on Annotations with a selection. For D6b, in that spec (Chromium, `pnpm e2e:shell` against
|
||||
`pnpm db:sandbox`, never the trial stack): real clicks on the inner `<circle>` and `<rect>` of the drawing written by
|
||||
`e2e/support/editor.ts:78-80`, on the drawing's background and on the box margin, then on another marker; a drag
|
||||
pan on the zoomed drawing and a marker drag keeping the selection; a touch context (`hasTouch`, as in
|
||||
`editor-geometry.spec.ts:419`) where a tap deselects and a touch drag does not. `editor-equine.spec.ts`: one click
|
||||
on a bone path of the historical horse drawing of the working copy deselects.
|
||||
|
||||
### R2 — The Références tab (D1 to D4)
|
||||
|
||||
|
||||
Reference in new issue
Block a user