chore(memory): journal — ship-feature U2 trial adjustments, plan + contract
This commit is contained in:
1 parent
007d9d419e
commit
fef5f126b3
4 files changed
+503
No files matched your search
@@ -0,0 +1,102 @@
|
||||
# CONTRACT — u2-trial-adjustments
|
||||
- date: 2026-11-20 | flow: ship-feature | branch: feature/v1-2-anatomical-sheets
|
||||
- status: active
|
||||
|
||||
## REQUEST (verbatim — IMMUTABLE)
|
||||
J'ai terminé mes tests manuels U2 sur db:trial.
|
||||
|
||||
Tous les tests fonctionnent parfaitement, à l'exception de deux ajustements ergonomiques que je souhaite apporter.
|
||||
|
||||
1. Création d'un point
|
||||
|
||||
Je souhaite que l'utilisateur choisisse d'abord l'emplacement du point sur le schéma, puis que la modale des propriétés s'ouvre automatiquement.
|
||||
|
||||
Le parcours attendu est :
|
||||
|
||||
- Cliquer sur « Ajouter un point ».
|
||||
- Cliquer sur le squelette à l'emplacement souhaité.
|
||||
- Voir le point apparaître.
|
||||
- Ouvrir automatiquement la modale de création.
|
||||
- Renseigner les propriétés.
|
||||
- Valider ou abandonner.
|
||||
|
||||
Ce comportement semblait déjà prévu dans les maquettes U2. Vérifie donc pourquoi mon expérience réelle ne correspond pas à ce parcours et corrige si nécessaire.
|
||||
|
||||
2. Ergonomie des poignées sur tablette
|
||||
|
||||
Sur tablette, les poignées me paraissent globalement un peu grosses.
|
||||
|
||||
Lorsque je sélectionne un sommet, la bulle « − » masque régulièrement le « + » d'un segment voisin.
|
||||
|
||||
Je dois alors zoomer pour pouvoir ajouter un sommet.
|
||||
|
||||
Je souhaite améliorer cette ergonomie :
|
||||
|
||||
- Réduire légèrement l'encombrement visuel des poignées.
|
||||
- Éviter que la bulle « − » masque les commandes « + » voisines.
|
||||
- Conserver des zones tactiles confortables et accessibles.
|
||||
- Préserver la précision des manipulations.
|
||||
- Ne pas modifier les dimensions anatomiques enregistrées simplement en fonction du périphérique.
|
||||
|
||||
Je te laisse étudier la meilleure solution UX : tailles visuelles, positionnement des commandes, gestion des chevauchements ou autre approche pertinente.
|
||||
|
||||
L'objectif n'est pas nécessairement de tout réduire, mais de rendre les sommets et les commandes plus lisibles et plus faciles à manipuler au doigt.
|
||||
|
||||
Tous les autres tests manuels U2 sont validés :
|
||||
- sélection ;
|
||||
- modification des propriétés ;
|
||||
- déplacement des points ;
|
||||
- redimensionnement ;
|
||||
- manipulation des zones ;
|
||||
- ajout et retrait de sommets ;
|
||||
- déplacement et redessin ;
|
||||
- modales ;
|
||||
- Défaire/Refaire ;
|
||||
- gestes tactiles ;
|
||||
- loupe ;
|
||||
- sauvegarde et persistance.
|
||||
|
||||
Je suis globalement très satisfait du résultat.
|
||||
|
||||
Tu peux prendre en charge ces deux derniers ajustements avec ton orchestration habituelle et les vérifications adaptées.
|
||||
|
||||
Présente-moi ensuite le résultat pour une dernière vérification ciblée, avant la clôture de U2.
|
||||
|
||||
## CLARIFICATIONS
|
||||
Q: Root cause of item 1? / A: (verified, read-only) two entry points. The ToolColumn icon tool « Point » already places on click then opens the dialog (A2). The text button « Ajouter un point » under the drawing is the C7 keyboard path (plan 2026-11-03-v1-2-6-editor.md:195): centre placement + immediate dialog. The owner pressed the text button.
|
||||
Q: What should « Ajouter un point » do? / A: [gated 2026-11-20] a mouse click or a tap arms the point tool (click on the drawing, the point appears, the dialog opens); a keyboard activation (Enter, Space) keeps the centre placement + dialog (WCAG 2.1.1).
|
||||
Q: Do « Ajouter une zone » and « Ajouter un accès » follow? / A: [gated 2026-11-20] yes, the three buttons.
|
||||
Q: Criterion 32 of the U2 contract? / A: [gated 2026-11-20] validated, closed.
|
||||
Q: Item 2 UX solution? / A: delegated by the owner (« Je te laisse étudier la meilleure solution UX »); the solution is settled at the brainstorm and the STEP 3 gate.
|
||||
Q: Brainstorm design (four choices) / A: [gated 2026-11-20] all accepted: (1) the « − » bubble placed in the open sector (bisector of the larger angle between the vertex's two segments, then 30° steps if blocked, always inside the drawing); (2) coarse visuals: vertex 14 px, « + » 18 px, visible bubble 32 × 26 px, hit areas kept (44 px circles, 44 × 36 bubble), fine sizes unchanged; (3) the add buttons show the armed state (pressed); a second pointer press disarms (back to « Sélectionner »); keyboard keeps the centre path; focus returns to the pressed add button after « Abandonner »; (4) add buttons 44 px tall below 1 280 px (36 px from xl).
|
||||
Q: Owner precisions / A: [gated 2026-11-20] (a) the bubble placement accounts for the real hit areas (44 px circles, 44 × 36 bubble), not only the visible symbols: the centres of every shown « + » and of the « − » stay activable without ambiguity even when their hit areas are close; (b) the disarming second press never silently drops a started creation: the U2 guards and confirmations apply (R-12 question).
|
||||
Q: Pass B (plan) — armed add button look and semantics / A: delegated — « Je te laisse autonome sur les détails techniques »; default taken: armed = the tool column's pressed look (ink fill, white text, border kept so nothing moves; plan rev 2, after the challenge found the `primary` variant drops the border), `data-armed`; no `aria-pressed` on the add buttons (Enter does not toggle them; the tool column keeps `aria-pressed`).
|
||||
Q: STEP 3 gate (plan rev 2) / A: [gated 2026-11-20] approved, the 3 residual placements of 9 261 accepted. Owner precisions: (1) a screen-reader user keeps a real way to create without choosing a place on the drawing, even when an assistive activation arms the tool: approach delegated → Enter on the focused drawing with a creation tool armed places at the centre and opens the dialog, and a polite screen-reader announcement on arming names both ways; (2) criterion 32 is NOT closed: re-verify on the final code, short windows and several rows of view chips.
|
||||
Q: Criterion 32 status after re-verification (Task 7 Step 4b, 2026-11-20) / A: [recorded 2026-11-20, result of a gated check] OPEN, owner decision pending. One row of chips (equine): the whole editor-geometry spec passes, short windows included. Several rows (eight long-named views, 3-5 rows): the stuck column overflows the window bottom by 64.3 px (1024×768), 53.3 (1180×820), 76.0 (1180×700), 24.3 (1280×800); the test is committed as test.fixme. The one-row budget predates this change (U2 Task 17; at 1 280 px neither the add row nor the budget changed). Supersedes the « validated, closed » answer above.
|
||||
Q: Owner final check / A: both journeys on db:trial, the handles on the real « Vertèbres thoraciques » zone on the tablet.
|
||||
|
||||
## ACCEPTANCE CRITERIA
|
||||
1. A pointer activation (MouseEvent.detail > 0: mouse click or tap) of « Ajouter un point », « Ajouter une zone » or « Ajouter un accès » arms the matching tool (point, zone, link) with the same guard as the tool column (R-12 question when work is pending, focus kept on the pressed control); nothing is placed and no dialog opens until the drawing is pressed.
|
||||
2. With the tool armed from that button, a click or a tap inside the drawing places the point where pressed and the creation dialog opens automatically; for zone and link, the trace closes then the dialog opens. « Créer » inserts, « Abandonner » asks then drops, as today.
|
||||
3. A keyboard activation (Enter or Space, detail 0) of the same buttons keeps the C7 path unchanged: centre placement at the A5 size, dialog open at once, focus return to the pressed add button on « Abandonner ».
|
||||
4. Every unit test and e2e spec that pressed these buttons is migrated to its intent (keyboard activation for the centre path, or pointer arm + drawing press), none deleted or loosened; at least one unit test proves each of criteria 1, 2 and 3 and fails on the pre-change code.
|
||||
5. On a coarse pointer, when a vertex is chosen, the « − » control never covers a « + » shown for a neighbouring segment: for every vertex of a realistic equine zone at the zooms where « + » show, a press at each shown « + » centre resolves to that insert handle, and a press at the « − » centre resolves to remove. A test proves it and fails on the pre-change code.
|
||||
6. Touch hit circles stay ≥ 44 px on a coarse pointer (U2 criterion 18); the D2 « + » threshold and the R-18 hint keep their behaviour unless a [gated] criterion says otherwise.
|
||||
7. The visual footprint of the handles on a coarse pointer is reduced per the [gated] design; mouse (fine) sizes unchanged unless [gated].
|
||||
8. Stored geometry never depends on the pointer type: newPointSize/pointSize, inserted midpoints, saved coordinates unchanged by the device (verified by reading the consumers of the handle sizes and by an existing or new test).
|
||||
9. docs/ANNOTATION-RENDERING.md « Editor overlay » updated before the rendering change (U2 criterion 21); the handleSize.ts `shortcut:` and its TODO line resolved when the sizes are settled; docs/development/V1-2-6_UX_TESTS.md and the U2 contract record the change and the criterion 32 closure.
|
||||
10. Gates: `pnpm typecheck`, `pnpm lint`, `pnpm test:run` green; the shell specs touched pass on the sandbox (`pnpm db:sandbox e2e-shell <spec>`); a full shell run has no failure outside the 13 known on 3d6aacad (compared by name); `pnpm e2e:ui` green; no layout shift (A14) at 1 024, 1 180, 1 280 px.
|
||||
|
||||
### Design criteria [gated 2026-11-20] (STEP 3 enrichment)
|
||||
11. [gated 2026-11-20] The deciding property of criterion 5 (owner precision: real hit areas): the « − » hit rectangle intersects no shown « + » hit circle, proven by a unit sweep of the six equine main polygons, widths 621/679/694, zoom 1 to 6 (bounds = frame), with a control showing the old placement fails it; the centre presses of criterion 5 are a sanity check. Zoomed and panned (9 261 placements), the bubble is on screen when its vertex is and is unambiguous (no « + » centre in its hit rect, its centre in no « + » hit circle) except at most 3 placements (accepted by the owner).
|
||||
12. [gated 2026-11-20] A double-click on an add button leaves its tool armed; during a redraw « Ajouter une zone » does not show armed and a press arms a new zone behind the guard; the armed look keeps the button's size (no shift at 1 024, 1 180, 1 280 px).
|
||||
13. [gated 2026-11-20] Screen-reader path: with a creation tool armed and nothing traced, Enter on the focused drawing places the kind's shape at the centre and opens its dialog; arming from an add button fills an always-mounted polite status region with the way to place (drawing press, or Enter on the drawing); fr and en strings, dictionary test.
|
||||
14. [gated 2026-11-20] Below 1 280 px the pinned column budget counts the 44 px add row (9.75rem, pin threshold 40.75rem), documented first; criterion 32 re-verified on the final code: the whole editor-geometry spec plus a new several-rows-of-chips test at 1 024 × 768, 1 180 × 820, 1 180 × 700, 1 280 × 800; a failure is reported with measured overflow, never hidden by a layout change outside this contract.
|
||||
15. [gated 2026-11-20] Criterion 4 for criterion 3 is met by the discriminating test (a pointer click arms, then the keyboard path); keyboard-only assertions are regression guards. The full shell run uses the 33 baseline specs by full path, `--workers=2`, never editor-equine.
|
||||
|
||||
## FILE SCOPE
|
||||
apps/app/src/components/editor/annotations/{KeyboardAdd,EditableAnnotations,ZoneHandles,HandleLayer}.tsx;
|
||||
apps/app/src/editor/annotations/{handleSize,polygonEdit,press,creationAsk,usePlacement}.ts and a new pure placement helper under apps/app/src/editor/annotations/ if the design needs one;
|
||||
apps/app/tests/unit/* (the migrated and new tests); apps/app/e2e/shell/{editor-shell-crossing,editor-annotations,editor-touch,editor-zones}.spec.ts and apps/app/e2e/support/* helpers;
|
||||
docs/ANNOTATION-RENDERING.md, docs/development/V1-2-6_UX_TESTS.md, .claude/tasks/contracts/2026-11-17-v1-2-6-u2-implementation.md, .claude/tasks/TODO.md.
|
||||
Plan additions [gated 2026-11-20]: apps/app/src/editor/annotations/{creationWork,useCreationFollow}.ts; apps/app/src/components/editor/annotations/AnnotationCanvas.tsx; apps/app/src/styles/index.css; apps/app/src/i18n/{fr,en}.ts; apps/app/e2e/shell/{editor-zones,editor-geometry}.spec.ts (comments, new criterion 32 test); apps/app/src/editor/annotations/{uiState,workStore,removeBubble}.ts; apps/app/tests/helpers/addByKeyboard.ts; docs/design/v1-2-6-u2/REVUE.md (owner amendment section).
|
||||
Reference in new issue
Block a user