feat(editor): reference dialog, reading tiles and finding filter in the history

R2F-5 and R2F-6: the reference dialog is a view layer above the References tab or the citations sheet (local draft, one command per changed save, creation entry becomes the reference's own). Tiles only read. « Tout afficher » filters the library by the finding, « Revenir au constat » pops or pushes. Inline tile edit, draft tile and their guards removed.
This commit is contained in:
bchanot committed 2026-11-13 20:27:00 +01:00
1 parent e2d020bd3d
commit 8031e0078f
28 files changed
+1072 -1512

No files matched your search

+24
View File
@@ -3,6 +3,7 @@ import type { EditorTarget, EditorView, FocusRequest } from './navigation'
import { unmeasuredViews } from './issues'
import type { TabTier } from './useViewport'
import type { Guards } from './useEditorNavigation'
import type { AddedReference } from './useReferenceMoves'
export const EDITOR_TABS = [
'general',
@@ -54,6 +55,27 @@ export interface FindingLayer {
announce: (text: string) => void
}
/**
* What the References tab and the reference dialog need of the navigation (R2F-5, R2F-6):
* the layer and the filter the view holds, and the moves on them.
*/
export interface ReferenceLayer {
view: EditorView['reference']
/** The finding whose citations the library lists; null for the whole bibliography. */
filter: ElementKey | null
guards: Guards
open: (id: string, opener?: HTMLElement | null) => void
start: (opener?: HTMLElement | null) => void
close: (forced?: boolean) => boolean
replace: (id: string | null, text?: string) => void
created: (id: string) => void
added: AddedReference | null
opener: () => HTMLElement | null
clearFilter: (text?: string) => void
backToFinding: (key: ElementKey) => void
announce: (text: string) => void
}
/** Props of every place (tab body, Annotations section). */
export interface EditorPlaceProps {
/** Not editable now: a mode that cannot save, or a recovery offer not answered yet. */
@@ -64,6 +86,8 @@ export interface EditorPlaceProps {
focus?: FocusRequest
/** The finding dialog and the citations sheet over it (only Constats has them). */
layer?: FindingLayer
/** The reference dialog and the filter (only the References tab and the sheet use them). */
references?: ReferenceLayer
/** Bumped by « Tout afficher »: the references library resets its search once per bump. */
libraryReset?: number
/** Reads the sheet's overview again (after a submission: the round freezes the draft). */