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
@@ -35,6 +35,7 @@ import {
|
||||
store,
|
||||
versionAnswer,
|
||||
} from '../helpers/editorHarness'
|
||||
import { openFinding } from '../helpers/findingDialog'
|
||||
import { mountDraft, setWidth } from '../helpers/editorRoute'
|
||||
|
||||
vi.mock('@/lib/supabase', () => ({ getSupabaseClient: () => ({}) }))
|
||||
@@ -126,9 +127,7 @@ function referenceText(): string {
|
||||
/** Constats, the node selected, its « 1 référence » trigger pressed. */
|
||||
async function openCitations(user: Awaited<ReturnType<typeof mount>>) {
|
||||
await user.click(tab('Constats'))
|
||||
await user.click(screen.getByRole('treeitem', { name: /Cat A/ }))
|
||||
await user.keyboard('{ArrowRight}')
|
||||
await user.click(screen.getByRole('treeitem', { name: /Node A/ }))
|
||||
await openFinding(user, /Node A/)
|
||||
await user.click(screen.getByRole('button', { name: '1 référence' }))
|
||||
}
|
||||
|
||||
@@ -203,7 +202,9 @@ describe('text typed in a place that is left', () => {
|
||||
const user = await mount()
|
||||
await user.click(tab('Références'))
|
||||
await user.click(
|
||||
inPlace('references').getByRole('button', { name: 'Ajouter une référence' }),
|
||||
inPlace('references').getByRole('button', {
|
||||
name: 'Ajouter une référence',
|
||||
}),
|
||||
)
|
||||
const field = inPlace('references').getByLabelText('Citation', {
|
||||
selector: '#tab-reference-new-citation',
|
||||
|
||||
Reference in new issue
Block a user