docs(docs): U2 tests, plan, rendering and Rust review aligned
This commit is contained in:
1 parent
0ca1f20452
commit
6e42d2ada1
12 files changed
+93
-53
No files matched your search
@@ -50,17 +50,20 @@ Implemented (contract `.claude/tasks/contracts/2026-11-06-v1-2-6-ux-u1-1123.md`)
|
||||
|
||||
## U2 · Points and polygons
|
||||
|
||||
Implemented (plan `.claude/tasks/plans/2026-11-17-v1-2-6-u2.md`, rev 3; boards `docs/design/v1-2-6-u2/`, A1 to A15 and the three adjustments). Rule numbers (R-n) are the plan's. The owner trial and the gates (plan Task 10) are pending. The suites run on the sandbox only (`pnpm db:sandbox`).
|
||||
|
||||
| Kind | Tests |
|
||||
|---|---|
|
||||
| Unit (tables) | slider stops = distinct radii of the view; snapping; red mark from the core value; midpoint insert after the segment start; « − » disabled at 3 vertices with its reason (board 12 B); zone translation; nearest-handle priority; keyboard map (arrows, Shift ×10, Insert or Backspace or Delete, Enter, Escape, roving focus); arrows pan only when the box is focused; handle cap fallback |
|
||||
| Unit (state) | pending preview cancelled and restored on undo, redo, document replacement, tab change, second pointer; toast dismissed on any commit, undo or redo; slider commits once on release (history depth after a keyboard walk) |
|
||||
| Core | the per-view minimum visible radius equals the `marker_too_small` threshold on the equine views and on edge frames |
|
||||
| E2E mouse | drag a vertex, « + », « − », zone drag on a selected zone, redraw accepted, redraw refused by `interior_too_small` restores the old shape, undo and redo of each, toast « Annuler » undoes the same entry as the header; header button and toast action carry the accessible name « Annuler la dernière modification » (T15) |
|
||||
| E2E touch (`hasTouch`, 1 024, 1 180, 1 280 px) | one-finger handle drag; explicit « Déplacer la zone » mode; finger 1 on a vertex handle then finger 2 elsewhere: the pinch zooms, the drag is cancelled, no commit (CDP `Input.dispatchTouchEvent` with two points); page scroll over the canvas with a selection and outside it |
|
||||
| Keyboard | create a zone, add and remove a vertex, move the zone, validate, without a pointer; Ctrl+Z on a focused handle after arrow moves restores the pre-move shape |
|
||||
| Unit (tables) | the press machine (`annotations.press.test.ts`): slop per kind (4, 6 and 10 CSS px), click and drag decisions, handle priority (vertex over « − » over « + », nearest first), double click within 400 ms and 8 px opens the dialog and never inserts, a second pointer cancels; slider stops, most-used radius, snap within 8 CSS px, range (`pointSize`); midpoint insert after the segment start, « − » refused at 3 vertices (`message.vertex_min`), vertex move, no-op move, the 40-vertex cap, « + » hidden under two hit radii (`polygonEdit`); Escape action (`escape`); `missingFields` names only the missing fields in form order; keyboard map (arrows by 0.5 % of the frame's longer side, Shift ×10, Insert, Backspace or Delete, Enter, Escape, roving focus); arrows pan only when the box itself is focused (`useFraming`, catalogue defaults unchanged); two pointers translate without scaling (`twoPointerPan`) |
|
||||
| Unit (state) | every preview, keyboard series and chosen vertex carries the `documentText` it was computed on, and a stale stamp is refused (`annotations.workStore.test.ts`); a preview is cancelled and restored, never committed, on undo, redo, document replacement, tab change and a second pointer; an undo with a move mode, a slider or a series pending only cancels the preview (R-13); during a creation undo is inactive and « Défaire » is hidden (A12); the message line: « Point déplacé · Défaire » calls the same `undo()` as the header, any commit, undo or redo closes it, a refusal is `role="alert"` without « Défaire », 6 s, a mouse hover pauses it and a touch does not; the hint after a futile finger drag only when the line is free and never after a two-finger gesture worked (R-1); the slider commits once on release (history depth after a keyboard walk); the strip keeps a fixed height and truncates a long name before the status; dialogs mounted outside `EditOnly`: the width flip and the mode flip keep the draft, disable the save and commit nothing (R-14); a creation, a started move mode or a started redraw asks before a tab, a section, a view chip, a tool, Back, Escape, sign-out or leaving the editor, and a document change made elsewhere announces the dropped work (R-12, R-13); `Dialog` `anchor`, a click on the veil does nothing (R-6); undo history cap 8 MiB, about 47 equine steps (R-15) |
|
||||
| Core | the per-view minimum visible radius (`PreviewState.min_point_radius`) equals the `marker_too_small` threshold on the equine views and on edge frames (`sheet_preview.rs`, `editor-min-point-radius.test.ts`) |
|
||||
| E2E mouse | drag a vertex, « + », « − », zone drag on a selected zone, redraw accepted, redraw refused by `interior_too_small` keeps and restores the old shape, undo and redo of each (`editor-zones.spec.ts`); a point: handle drag, size by a click on the track, the move mode (`editor-annotations.spec.ts`); the properties dialog opens over the right column and never over the drawing, a click on the veil does nothing, a double click on the selected zone opens it and inserts no vertex, a typed form then Back asks, a width crossing below 1 024 px keeps the draft (`editor-properties.spec.ts`); « Défaire » in the message line undoes the same entry as the header button, which carries the accessible name « Défaire la dernière modification » (T15; EN « Undo the last change ») |
|
||||
| E2E touch (`hasTouch`, 1 024, 1 180, 1 280 px; CDP `Input.dispatchTouchEvent`) | one finger drags a vertex and the point under the loupe; every handle hit circle is at least 44 px; one finger off the handles moves nothing and shows the hint once, with no hint over a page scroll; two fingers zoom and pan; finger 1 on a vertex handle then finger 2: the drag is cancelled, the shape restored, nothing committed, the pinch zooms (Review Focus 1); the move mode by a finger; a tap on the selected shape opens the dialog and it stays open (Review Focus 5), with a chosen vertex it unchooses; the trace closes from a finger within 22 px; page scroll over the canvas with a selection and outside it (`editor-touch.spec.ts`, `editor-properties.spec.ts`, `editor-deselect.spec.ts`) |
|
||||
| Layout (A14) | `expectNoShift` (`e2e/support/layout.ts`) at 1 024, 1 180 and 1 280 px: no box of the canvas, the strip, the aside or the header moves, `scrollHeight` and the scrollbar gutter are unchanged, and the layout-shift sum is zero around selection, strip content, a message showing and expiring, the hint, a dialog opening and closing, mode entry and exit, and the first commit's save line; `scrollbar-gutter: stable` on the editor page only (`editor-annotations.spec.ts`) |
|
||||
| Keyboard | create a zone, add and remove a vertex, move the zone, validate, without a pointer; Ctrl+Z on a focused handle after arrow moves only cancels the preview and a later Enter commits nothing stale; after undoing « + », « − » never removes the wrong vertex; « Désélectionner » commits a pending series |
|
||||
| Paths (T16) | a path annotation gets no handle, no « + » or « − », no zone move in either mode, no keyboard move; its `d` is byte-identical after every gesture on its neighbours, a save and a reload; « Remplacer par un polygone » stays the only change: explicit, validated by the core, the path kept while tracing, on Escape and on a refusal; one undo entry restoring the exact `d`, redo restoring the polygon (owner, BDR-101) |
|
||||
| Accessibility | axe on selection, tracing and move states; handle names (« sommet 3 de Thoraciques »); live-region message after a move |
|
||||
| Performance | commit latency under the 500 ms budget (`editor-equine.spec.ts:25-34`) for drag, insert, remove |
|
||||
| Accessibility | axe on selection, tracing, move states and the dialog in read and edit modes; handle names (« Point {nom} », « Sommet {n} », « Ajouter un sommet après le sommet {n} », « Retirer le sommet {n} »); live-region message after a move; WCAG 2.5.7: the move mode with four arrow buttons is the single-pointer path without dragging (A11) |
|
||||
| Performance | commit latency under the 500 ms budget (`editor-equine.spec.ts`) for drag, insert and remove, measured at the gates (plan Task 10) on a run-seeded equine-sized draft, never on the historical copy; the drag smoothness is a measure, not an assertion (`e2e/support/measure-drag.ts`, `editor-measure-drag.spec.ts`, run by hand). Measured 2026-11-18 on a production build under `vite preview`, Chromium touch at 1 180 px, CPU ×4: frame work p95 4.2 to 4.7 ms with the loupe (technique A), 4.0 to 4.4 ms outline only (B), 3.6 to 4.2 ms without a loupe; technique A kept. The figures are in plan Task 8; the owner's tablet trial is the real check |
|
||||
|
||||
## U3 · Category panel and own colour
|
||||
|
||||
|
||||
Reference in new issue
Block a user