bchanot
99b669bf8f
feat(editor): header history, save line and Abandonner les modifications
...
Header Annuler/Retablir on every tab (aria-disabled, commit on pointerdown,
refused blur commit skips the undo). Save line: unsaved count selector
(savedDistance), saveLineState forms, server save time via readSaveTime
(lastSave in the store, never the browser clock). Discard relabelled and
names the stored copy. Tool column pair removed, glyphs in EditorGlyph.
Rewritten or removed assertions (R-24):
- editor-route.test: Revision 3 / unsaved text / Annuler les modifications
-> save-line testid, Abandonner label, copy sentence in the dialog
- editor-route-conflict, editor-route-recovery: Revision n and copy_cap/
copy_quota text queries -> save-line testid
- editor-no-loss: discard button label
- editor-annotations-tab: tool column undo/redo test -> no pair left
(behaviour moved to editor-history-buttons.test)
- e2e journey/annotations/recovery/structures/support saveDraft/lan:
undo/redo and revision/unsaved text -> historyButton, saveLine helpers;
structures toHaveCount(0) on old text -> exact Revision n line
- editor-shell clickability: header Annuler/Retablir added
2026-11-08 17:55:49 +01:00
bchanot
6689827a8d
feat(editor): kept-mounted tabs, sections and references panel
...
Each visited tab, Annotations section and the references panel stay
mounted in a KeptPlace (hidden, nested visibility). Composed canvases
detach while hidden. One JSON.parse per document text. Focus requests
reach only their owning place.
Rewritten assertions (R-24):
- editor-route.test.tsx:127: annotations testid toBeNull -> not.toBeVisible
- editor-sections.test.tsx: place('annotations.drawing') toBeNull -> not.toBeVisible
- editor-journey.spec.ts:311: page-wide getByLabel('Nom (FR)') -> scoped to place 'general'
- editor-tabs-lists.test.tsx: ReferencesPanel `open` prop dropped (the wrapper hides it)
- editor-annotations-tab, editor-focus-request, editor-sections tests: props gain `visited`
No assertion removed.
2026-11-06 20:50:40 +01:00
bchanot
bc2dba7c14
feat(editor): four tabs, Annotations sections, references from the header
...
U1 Lot B1. Four tabs (Général, Annotations, Constats, Vérification); views,
categories and regions become full-width Annotations sections opened from the
overview panel; references move to a header-toggled panel (minimal, Lot D
completes it); « Aller à » goes through EditorTarget and the navigation hook.
EditorWorkspace owns the navigation; DraftHeader split in HeaderActions and
SaveLine; EditorTabs split in TabList and MoreTabs.
R-24, assertions removed or rewritten (file: old -> new):
unit
- editor-route.test: seven tab names -> four; « Plus » at 800 px with
Références clicked -> no « Plus »; below 640 px five others -> Général,
Constats, and Constats opens the findings tab; + references panel cases
- editor-route-recovery.test: tab Références + editor-tab-references label ->
header button + editor-references-panel labelled by its heading
- editor-mode.test: small tier `more` of five -> [general, findings]
- editor-focus-request.test: {key,serial} -> {target,serial}; ReferencesTab and
VertebraeTab -> ReferencesPanel and RegionsSection; issueTarget tab/key ->
target place/section/key (vertebrae tab -> annotations/regions); consumed
context (serial) -> (serial, outcome); annotation case adds heading focus
- editor-verification.test: onGoTo('annotations', key) -> navigate(targetOfKey
(key), opener); props onSelectTab/onGoTo -> navigate
- editor-annotations-tab.test: props onSelectTab -> navigate + section props;
no_category text « (onglet Général) » -> « (Annotations, section
Catégories) »
- editor-tabs-general.test: categories cases render GeneralTab ->
CategoriesSection(doc); + Général holds no categories editor
- editor-tabs-lists.test: tab imports -> panel and section; read-only
references « no button » -> only « Fermer les références »
- editor-tabs-views, editor-drawing-upload, editor-repair.test: ViewsTab ->
ViewsSection import, assertions kept; editor-findings.test: navigate prop
e2e
- support/editor selectTab: exact name -> pattern (error badge in the name);
+ place, openSection, showDrawing, backToDrawing, openReferences, TABS
- support/warm-up: seven tabs -> four + sections + references panel
- editor-access: seven-tab axe loops -> four tabs + three sections + panel
(edit and read-only); narrow widths add panel overflow and axe
- editor-drawings: tab Vues -> openSection views; tab Annotations ->
showDrawing
- editor-structures: tab Général (categories) -> openSection categories, axe
label « general tab » -> « categories section »; tab Références ->
openReferences/closeReferences; tab Vertèbres -> openSection regions; tab
Annotations -> showDrawing
- editor-geometry: three tab Vues -> openSection views
- editor-equine: tab Général (categories add) -> openSection categories; five
tabs loop -> two tabs + sections + panel; tab Annotations -> showDrawing
- editor-journey: tab Vues, tab Général (category), tab Annotations ->
openSection views/categories, showDrawing; frozen axe scrolls to the header
- lan/trial-lan (not run): tab Vues -> Annotations tab + views entry
Verified: typecheck, lint, vitest 107 files / 1125 tests, whole shell suite on
the sandbox 151 passed, 49 skipped, 0 failed.
2026-11-06 20:25:35 +01:00