chore(memory): BDR-118 references dialog, plan Rev 5, contract 26-31
This commit is contained in:
1 parent
ebd1d6ddbe
commit
ae02f48853
4 files changed
+115
No files matched your search
@@ -285,3 +285,98 @@ or without prior activation, and preventDefault keeps the page on its entry.
|
||||
adjusted, a §4.12 « Vérifications manuelles finales » list, labels, BROWSER_TESTS.
|
||||
- U2 orientation (controller text, `u2-orientation.md` in the SDD folder) into V1-2-6_UX_PLAN §U2, V1-2-6_UX_DECISIONS
|
||||
and docs/design/README.md (boards 02 to 06 and 13 to redraw at U2 planning, validated before U2 code).
|
||||
|
||||
## Rev 5: owner trial follow-up 2026-11-15 (two UX adjustments before R2 closure, autonomous mandate)
|
||||
|
||||
Owner brief 2026-11-15: the finding dialog's edit mode must not hold citations; a real references dialog, stacked over
|
||||
the finding dialog, replaces the side sheet, with its own « Modifier ». One tab order on every width; « Plus » becomes a
|
||||
vertical dropdown. Keep history, focus, Défaire/Refaire and the unsaved-changes protection (BDR-115, LRN-141).
|
||||
Controller rulings (autonomous mandate, reported to the owner): families (categories) get the same dialog as nodes
|
||||
(both hold citations; the edit form no longer does); the view mode is read only (no « Modifier » on its tiles); the
|
||||
edit mode offers « Nouvelle référence » (created and cited in the draft); on phones the visible tabs are the first two
|
||||
of the order (Général, Annotations), the rest under « Plus » in order.
|
||||
|
||||
### Task 10: one tab order, vertical « Plus » dropdown (owner item 2)
|
||||
- `editor/tabs.ts` small tier: shown = first two of EDITOR_TABS (`general`, `annotations`), « Plus » = the rest in
|
||||
order (`findings`, `references`, `verification`). initialTab and its comment follow (Général now shown on small).
|
||||
- « Plus » shows the blocking-error count of Vérification while that tab sits under it (same text as the tab's badge).
|
||||
- MoreList: a vertical list anchored under « Plus » (right-aligned to it), one entry per line, full-width rows
|
||||
≥ 48 px high, comfortable padding, `rounded-lg` panel with shadow, max width `calc(100vw - 2rem)`, no sideways scroll
|
||||
at 320 and 375 px. Active entry: accent background tint + check icon + `aria-current="true"` (text, not colour only).
|
||||
Motion: opacity + 6 px slide + 0.98 scale from the top, ~160 ms ease-out in, ~120 ms out; none under reduced motion.
|
||||
ArrowDown/ArrowUp (wrap), Home, End move the focus between entries. Every existing dismissal (Escape, outside
|
||||
press, CloseWatcher, Tab-out, tab change) and the panel focus after a keyboard pick unchanged.
|
||||
- Tests: unit (tabsFor order per tier; Plus count; arrows); e2e at 375 (row order, vertical list geometry: entries
|
||||
stacked, each ≥ 44 px, inside the viewport; axe); update every spec that assumed the old small split.
|
||||
|
||||
### Task 11: the references dialog replaces the side sheet (view mode) (owner item 1)
|
||||
- New `CitationsDialog` (components/editor/references): a `Dialog` (ModalDialog, D13) stacked over the finding dialog,
|
||||
title « Références du constat », the finding path under it, hosted where CitationsSheet was (after the tab body,
|
||||
before ReferenceDialog). Same history layer as the sheet (`finding.citations`), so Back, the leave cascade, the
|
||||
reload restore and « Aller à » keep working; returnFocus = « X références ». CitationsSheet and its motion go.
|
||||
- View mode: the cited references as tiles (expand to read, « Aller à » a citer), dangling ids named, « Tout afficher
|
||||
dans l'onglet Références », close (✕, Escape, backdrop per Dialog, Back) back to the finding dialog. No « Modifier »
|
||||
on tiles in this dialog (tile readOnly for edit actions); its own « Modifier » button (edit tier only, hidden when
|
||||
read-only) switches to the edit mode (Task 12).
|
||||
- Citable keys: categories and nodes (`isCitable`, replaces `isFindingNode` for citations, the references filter and
|
||||
history read-back in navigation.ts, useEditorNavigation.ts, history/entry.ts, references/filter.ts as needed).
|
||||
- Finding dialog: view and edit modes both show only « Références citées » + the « X références » button (count of
|
||||
the document's citations, also at 0 so a reference can be added; zones none). FindingEditCitations, CitationList's
|
||||
remove path, the family inline list and `editor/findings/citationDraft.ts` (shortcut store) go. FindingEditForm's
|
||||
draft and patch no longer carry `reference_ids` (its save never rewrites citations).
|
||||
- Tests: unit (dialog shows the cited tiles, no edit controls in view mode, button at 0, family opens it, the finding
|
||||
edit patch keeps the current reference_ids); e2e editor-citations / editor-reference-journey / editor-finding-dialog
|
||||
updated to the dialog (owner journey A → « 2 références » → « Tout afficher » → Back back on A with the references
|
||||
dialog open; keyboard and touch at 375; axe).
|
||||
|
||||
### Task 12: edit mode of the references dialog (owner item 1)
|
||||
- « Modifier » turns the dialog into a form (local mode, no history entry, like the finding dialog): the draft list
|
||||
of cited references, each with « Modifier la référence » (the reference dialog stacked over this one, edits saved
|
||||
by that dialog as today) and « Retirer » (dangling ids removable); « Citer une référence existante » (the library
|
||||
references not cited yet); « Nouvelle référence » (the reference creation dialog stacked over this one: the
|
||||
reducer allows `create_reference` over an open citations layer without leaving the tab; history read-back allows it;
|
||||
on « Créer » the new id is appended to the draft). « Enregistrer » writes ONE `update` of the element's
|
||||
`reference_ids` (one Défaire), pristine save none, then back to the view mode with « Enregistré » and focus on
|
||||
« Modifier ». « Annuler » with changes asks « Abandonner les modifications ? ».
|
||||
- Guard: a new layer name `citations` between `finding` and `reference` (LAYERS order = stacking). A dirty draft
|
||||
refuses ✕, Escape, backdrop, Back and the editor leave cascade like the finding form (useFormDraft with layer
|
||||
`citations`, FormActions, DiscardConfirm); the Back planner counts the citations layer as guarded only when it
|
||||
holds a draft. « Tout afficher » and « Aller à » are not offered in edit mode.
|
||||
- A finding edit draft under it and a references draft are independent (two fields of the same element, two saves,
|
||||
two undo steps, neither overwrites the other). Undo/redo while the form is open follows the existing form rule.
|
||||
- Tests: unit (stage add/remove/new, one save = one undo, pristine none, Annuler asks, guard refuses Back, creation
|
||||
appends the new id, finding draft + references draft both saved); e2e (edit, cite, remove, save, one header
|
||||
« Défaire »; dirty Back asks; stacked reference dialog from the edit list).
|
||||
|
||||
### Task 13: docs
|
||||
- V1-2-6_U1_CORRECTIONS §R2 (subsection « Owner follow-up 2026-11-15 »; fix lines that describe the side sheet or
|
||||
citing in the finding edit form), V1-2-6_OWNER_TRIAL (§4.11/§4.12 adjusted; new §4.13 « Vérification des deux
|
||||
ajustements » short db:trial procedure), V1-2-6_R2_LABELS (keys added/removed), BROWSER_TESTS clauses,
|
||||
docs/design/README.md (board 25 side sheet replaced by the references dialog; board 05 phone split changed by the
|
||||
owner 2026-11-15).
|
||||
|
||||
### Rev 5 challenge rulings (binding on Tasks 10-13; 3 lenses, 2026-11-15)
|
||||
- T10: keep the overlay geometry (`absolute inset-x-0 top-full`, no measuring) as a vertical `flex-col` list, rows ≥ 48 px,
|
||||
accent tint + check icon + `aria-current`; motion unchanged in kind (light fade/slide, none under reduced motion). No
|
||||
arrow-key navigation (Tab moves, Tab-out closes). `initialTab` drops its tier parameter. e2e locates « Plus » without an
|
||||
exact name (it may carry the error count); checks at 320 and 375 (each entry box inside the viewport).
|
||||
- T11: CitationsDialog = `Dialog layer` around CitationsPanel's body (keeps `data-place="citations"`, heading id
|
||||
`editor-citations-title`, path, « Tout afficher », tiles with `readOnly` for edit actions, MissingRow, focus rescue);
|
||||
CitationsSheet goes. `isFindingNode` widened to categories and nodes and renamed in place (`isCitable`). FindingEditCitations
|
||||
and CitationList (with its remove path) MOVE to the dialog's edit mode (Task 12), not deleted. citationDraft.ts goes. If a
|
||||
dirty finding form below refuses « Aller à » / « Tout afficher », the clean citations layer closes first so the question
|
||||
is visible. Support helpers updated (`openTab` split, `findingDialog`, `showCitations`, `closeCitations`), sheet
|
||||
geometry checks → dialog-in-viewport.
|
||||
- T12: edit form keyed by `JSON.stringify(citedBy)`. Draft held as adds and removes, applied to the element's CURRENT
|
||||
list at save (a reload never overwrites citations silently). Reuse useItemMode/useFocusEditButton (button id param),
|
||||
keys `editor.findings.saved`, `editor.findings.reference_add`. Read-only flip: the draft stays, every control disabled,
|
||||
only « Abandonner » (BDR-115). « Nouvelle référence »: the new id reaches the draft through a callback the open edit form
|
||||
registers on the navigation (only for a creation it started); `added` is not set on that path; a `{create}` over the
|
||||
citations layer is never read back from history (POP/reload drop it). A reference created then a draft abandoned stays
|
||||
in the library uncited (its own undo step): tested and documented. Guard sites: `LAYERS` = finding, citations,
|
||||
reference; `LAYERS_TOP_DOWN` (leftDraft.ts) derived from LAYERS; `leavingLayers` gets a citations condition (flag drops
|
||||
or cited key changes); `closeCitations` asks the citations guard (user close refusable); `askLeave` clearAbove and
|
||||
`refusePop` close only the layers above the refusing one (citations → reference). Tests: Back closing only the
|
||||
citations dialog with a draft asks; topDirtyLayer order; citations under a clean reference dialog in POP and cascade;
|
||||
jump-out cascade e2e (editor-leave-confirm) with dirty citations; sign-out flag for a citations draft.
|
||||
- T13: also the CLAUDE.md folder-map line for the citations sheet.
|
||||
Reference in new issue
Block a user