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
@@ -128,16 +128,14 @@ describe('navigationReducer', () => {
|
||||
})
|
||||
})
|
||||
|
||||
it('open_citations opens for a finding node only', () => {
|
||||
it('open_citations opens for a family or a finding node only', () => {
|
||||
const base = initialNavigation('findings')
|
||||
const opened = run(base, { type: 'open_citations', citedBy: node })
|
||||
expect(citationsOfView(opened)).toBe(node)
|
||||
expect(opened.finding).toEqual({ key: node, citations: true })
|
||||
for (const refused of [
|
||||
finding,
|
||||
view,
|
||||
{ kind: 'zone', id: 'z1' } as const,
|
||||
]) {
|
||||
for (const citable of [node, finding]) {
|
||||
const opened = run(base, { type: 'open_citations', citedBy: citable })
|
||||
expect(citationsOfView(opened)).toBe(citable)
|
||||
expect(opened.finding).toEqual({ key: citable, citations: true })
|
||||
}
|
||||
for (const refused of [view, { kind: 'zone', id: 'z1' } as const]) {
|
||||
const state = run(base, { type: 'open_citations', citedBy: refused })
|
||||
expect(state).toBe(base)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user