feat(editor): finding dialog and citations side sheet in the history

Constats opens each element in one modal dialog (view, edit with a
local draft, creation) driven by the editor view layer of the browser
history. The citations panel becomes a modal side sheet stacked over
it; its geometry, exit machinery and page inertness are removed.
Back and Forward restore the layers, a dirty form asks first.
This commit is contained in:
bchanot committed 2026-11-13 18:51:35 +01:00
1 parent 8e4f02620a
commit 18085cecf8
50 files changed
+2642 -1504

No files matched your search

@@ -2,6 +2,7 @@ import { useEffect, useState, type RefObject } from 'react'
import type { ElementKey, Reference } from '@faunosteo/core-wasm/types'
import {
focusRow,
focusRowLater,
useFocusRequest,
type FocusRequest,
} from '@/editor/focusRequest'
@@ -59,7 +60,7 @@ function useReferenceFocus(
if (target.key === null || at < 0) return 'none'
tiles.reveal(keys[at])
if (referenceMatches(all[at], shown.view.query)) {
return focusRow(target.key) ? 'found' : 'none'
return focusRowLater(target.key) ? 'found' : 'none'
}
shown.update({ query: '' })
later(target.key)