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:
1 parent
8e4f02620a
commit
18085cecf8
50 files changed
+2642
-1504
No files matched your search
@@ -7,7 +7,6 @@ import {
|
||||
isTextField,
|
||||
visibleElement,
|
||||
} from '@/editor/focusRequest'
|
||||
import { ReferencesOpenContext } from '@/editor/editingContext'
|
||||
import { CANVAS_BOX } from '@/editor/useEditorNavigation'
|
||||
import { useT } from '@/i18n/useT'
|
||||
|
||||
@@ -102,8 +101,7 @@ export function useSelectionEscape(
|
||||
) {
|
||||
const asideRef = useRef<HTMLElement>(null)
|
||||
const deselect = useDeselect(id, clear)
|
||||
const citationsOf = useContext(ReferencesOpenContext)
|
||||
useEscapeDeselect(active && citationsOf === null, (event) =>
|
||||
useEscapeDeselect(active, (event) =>
|
||||
deselect.byKey(asideRef.current?.contains(event.target as Node) ?? false),
|
||||
)
|
||||
return { asideRef, byDrawing: deselect.byDrawing }
|
||||
|
||||
Reference in new issue
Block a user