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:
bchanot committed 2026-11-13 18:51:35 +01:00
1 parent 8e4f02620a
commit 18085cecf8
50 files changed
+2642 -1504

No files matched your search

+22 -7
View File
@@ -171,16 +171,31 @@ describe('typed values come back after a 1 024 px crossing', () => {
await keepsTypedValue(user, 'view-new-fr', 'Nom (FR)', 'Ajouter la vue')
})
it('the findings creation form', async () => {
it('the findings creation form: kept in its dialog, read-only while narrow, focus kept', async () => {
const user = await mount()
await user.click(tab('Constats'))
await user.click(button('Ajouter une zone'))
await keepsTypedValue(
user,
'finding-new-name-fr',
'Nom (FR)',
'Ajouter une zone',
)
const field = byId('finding-new-name-fr')
await user.type(field, 'Saisie')
expect(field).toHaveFocus()
cross(900)
// no edit part leaves the page: the dialog keeps the draft, says why, writes nothing
expect(field).toBeVisible()
expect(field).toHaveAttribute('readonly')
expect(field).toHaveAttribute('aria-readonly', 'true')
expect(field).toHaveValue('Saisie')
expect(field).toHaveFocus()
expect(screen.getByText(/Élargissez la fenêtre/)).toBeInTheDocument()
expect(button('Créer')).toBeDisabled()
expect(store.getState().unsaved).toBe(false)
cross(1280)
expect(byId('finding-new-name-fr')).toBe(field)
expect(field).not.toHaveAttribute('readonly')
expect(field).toHaveValue('Saisie')
expect(field).toHaveFocus()
expect(screen.queryByText(/Élargissez la fenêtre/)).toBeNull()
expect(button('Créer')).toBeEnabled()
expect(store.getState().unsaved).toBe(false)
})
it('the submission note', async () => {