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
@@ -88,6 +88,20 @@ describe('mount', () => {
|
||||
expect(written()?.id).toBe('old')
|
||||
})
|
||||
|
||||
it('a reload never reopens a form: the creation layer is replaced by the view without it', async () => {
|
||||
const create = {
|
||||
...defaultView('findings'),
|
||||
finding: { create: { kind: 'zone', parent: null } },
|
||||
}
|
||||
const entries = [{ pathname: path, state: foreign({ view: create }) }]
|
||||
mountDraft({ probe, entries })
|
||||
await ready()
|
||||
expect(selected()).toBe('Constats')
|
||||
await waitFor(() => expect(written()?.view.finding).toBeNull())
|
||||
expect(written()?.id).toBe('old')
|
||||
expect(screen.queryByRole('dialog')).toBeNull()
|
||||
})
|
||||
|
||||
it('replaces an entry of another sheet or account by the default view', async () => {
|
||||
const entries = [{ pathname: path, state: foreign({ sheetId: 'other' }) }]
|
||||
mountDraft({ probe, entries })
|
||||
|
||||
Reference in new issue
Block a user