feat(editor): fixed edit strip and message line without layout shift
U2 Task 3 (A6, A14, R-2). A fixed-height strip over the drawing and the right column replaces the tool line, the sr-only selection tag of the edit body and TracingBar: lead (name + status, type + detail), notice (refusal, first geometry issue + n, unmeasured view with its link, no category, no child view), commands (Fermer le trace, Retirer le dernier sommet, Annuler le trace). A fixed-height line under the drawing holds the add buttons and the gesture message: a kept drop says « Point deplace » with « Defaire » (same store undo as the header), a refused drop says « Deplacement refuse : ... » as a red alert. 6 s, held by mouse hover and focus inside, closed by any commit, undo or redo. trace_pop and Backspace remove the last vertex. The busy « Aller a » target is the strip's tracing commands. scrollbar-gutter stable, scoped to the editor. e2e helper expectNoShift (boxes, scroll height, gutter, client width, layout-shift sum). DraftHeader untouched: no shift seen. Rewritten assertions (old -> new): - tab unit « Sélection : point » on annotation-selection-tag -> strip detail « Point » - tab unit tag sr-only, not live -> strip lead outside any live region - tab unit « 1 sommet posé. » -> « 1 sommet posé » (board 04 wording) - tab unit D6b tag present / « zone » -> strip detail « Point » / « Zone · 3 sommets » - keep-alive, sections, escape units: tracing-bar -> tracing-commands - e2e selectionTag helper -> strip title with data-selection; the twin's tag is twinSelectionTag (deselect 375 px describe) - e2e deselect « tag position absolute » (edit) -> strip height 64 px, drawing top unchanged; twin Escape test keeps tag 0, properties 0, overview visible - e2e deselect and journey tracing-bar / annotation-selection-tag -> tracing-commands / selectionTag - e2e historyButton scoped to history-buttons (the message's « Défaire » has the same accessible name)
This commit is contained in:
1 parent
b2d78f9621
commit
1deb037fac
23 files changed
+1228
-181
No files matched your search
@@ -228,9 +228,11 @@ describe('the shown view disappears (undo)', () => {
|
||||
)
|
||||
await user.click(screen.getByRole('button', { name: 'Zone' }))
|
||||
pressAt(screen.getByTestId('annotation-canvas'), 20, 30)
|
||||
expect(screen.getByTestId('tracing-bar')).toBeInTheDocument()
|
||||
expect(screen.getByTestId('tracing-commands')).toBeInTheDocument()
|
||||
act(() => void store.getState().undoStep())
|
||||
await waitFor(() => expect(screen.queryByTestId('tracing-bar')).toBeNull())
|
||||
await waitFor(() =>
|
||||
expect(screen.queryByTestId('tracing-commands')).toBeNull(),
|
||||
)
|
||||
})
|
||||
|
||||
it('dispatches nothing while the shown view still exists', async () => {
|
||||
@@ -268,7 +270,7 @@ describe('« Aller à » an annotation while something is in progress', () => {
|
||||
expect(screen.queryByTestId('annotation-properties')).toBeNull()
|
||||
})
|
||||
|
||||
it('an open zone tracing is kept: the bar takes the focus', async () => {
|
||||
it('an open zone tracing is kept: the strip tracing commands take the focus', async () => {
|
||||
const { consumed, announce } = await withProgress(async (user) => {
|
||||
await waitFor(() =>
|
||||
expect(screen.getByRole('button', { name: 'Zone' })).toBeEnabled(),
|
||||
@@ -277,7 +279,7 @@ describe('« Aller à » an annotation while something is in progress', () => {
|
||||
pressAt(screen.getByTestId('annotation-canvas'), 20, 20)
|
||||
})
|
||||
await waitFor(() => expect(consumed).toHaveBeenCalledWith(7, 'kept'))
|
||||
expect(document.activeElement).toBe(screen.getByTestId('tracing-bar'))
|
||||
expect(document.activeElement).toBe(screen.getByTestId('tracing-commands'))
|
||||
expect(announce).toHaveBeenCalledWith(
|
||||
expect.stringContaining('tracé est en cours'),
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user