feat(editor): references dialog over the finding, view mode
A modal Dialog replaces the citations side sheet; families open it too (isCitable). The finding dialog shows only « Références citées » and « X références », also at zero; its edit form no longer carries reference_ids. A dirty form refusing « Aller à » or « Tout afficher » closes the clean references dialog first.
This commit is contained in:
1 parent
ff21b0315e
commit
abc781df52
29 files changed
+432
-858
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { vi } from 'vitest'
|
||||
import type { FindingLayer } from '@/editor/tabs'
|
||||
import CitationsSheet from '@/components/editor/references/CitationsSheet'
|
||||
import CitationsDialog from '@/components/editor/references/CitationsDialog'
|
||||
import FindingsTab from '@/components/editor/tabs/FindingsTab'
|
||||
import { findingLayerOf } from '@/editor/findingLayer'
|
||||
import { citationsOfView } from '@/editor/navigation'
|
||||
@@ -8,7 +8,7 @@ import { useEditorNavigation } from '@/editor/useEditorNavigation'
|
||||
import { ReadOnlyContext } from '@/editor/editingContext'
|
||||
|
||||
/**
|
||||
* Constats with the navigation that drives its dialog and the sheet over it (what the
|
||||
* Constats with the navigation that drives its dialog and the references dialog over it (what the
|
||||
* workspace gives it), without the rest of the editor.
|
||||
*/
|
||||
export default function FindingsHost({
|
||||
@@ -25,13 +25,11 @@ export default function FindingsHost({
|
||||
reloadSheet={vi.fn()}
|
||||
layer={findingLayerOf(nav)}
|
||||
/>
|
||||
<CitationsSheet
|
||||
<CitationsDialog
|
||||
citedBy={citationsOfView(nav.state)}
|
||||
readOnly={readOnly}
|
||||
onClose={nav.closeCitations}
|
||||
onShowAll={() => undefined}
|
||||
navigate={nav.navigate}
|
||||
onEdit={nav.references.open}
|
||||
returnFocus={nav.citationsTrigger}
|
||||
/>
|
||||
</ReadOnlyContext>
|
||||
|
||||
Reference in new issue
Block a user