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.
This commit is contained in:
1 parent
ca184da4d9
commit
6689827a8d
18 files changed
+847
-81
No files matched your search
@@ -43,6 +43,7 @@ vi.mock('@faunosteo/supabase', async (orig) => ({
|
||||
const base = { readOnly: false, navigate: vi.fn(), reloadSheet: vi.fn() }
|
||||
const section = {
|
||||
section: 'drawing' as const,
|
||||
visited: ['drawing'] as const,
|
||||
onOpenSection: vi.fn(),
|
||||
onBack: vi.fn(),
|
||||
}
|
||||
@@ -253,11 +254,13 @@ function Probe({ go, tier }: { go: EditorTarget; tier: 'wide' | 'small' }) {
|
||||
<button onClick={() => nav.navigate(go)}>go</button>
|
||||
<EditorTabBody
|
||||
tab={state.tab}
|
||||
visited={state.visitedTabs}
|
||||
{...base}
|
||||
navigate={nav.navigate}
|
||||
focus={ownedBy(state.focus, state.tab)}
|
||||
focus={state.focus}
|
||||
annotations={{
|
||||
section: state.section,
|
||||
visited: state.visitedSections,
|
||||
onOpenSection: nav.openSection,
|
||||
onBack: nav.backToDrawing,
|
||||
}}
|
||||
|
||||
Reference in new issue
Block a user