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
@@ -28,6 +28,7 @@ import {
|
||||
serverRevision,
|
||||
shapeWith,
|
||||
toolButton,
|
||||
twinSelectionTag,
|
||||
UNSAVED_LINE,
|
||||
} from '../support/editor'
|
||||
|
||||
@@ -247,7 +248,7 @@ test.describe('deselect and D6b (editor, mouse and keyboard)', () => {
|
||||
await toolButton(page, dict, 'zone').click()
|
||||
await clickAt(page, { x: 300, y: 500 })
|
||||
await clickAt(page, { x: 400, y: 500 })
|
||||
const bar = page.getByTestId('tracing-bar')
|
||||
const bar = page.getByTestId('tracing-commands')
|
||||
await expect(bar).toBeVisible()
|
||||
await box(page).focus()
|
||||
await page.keyboard.press('Escape')
|
||||
@@ -327,7 +328,8 @@ test.describe('deselect and D6b (editor, mouse and keyboard)', () => {
|
||||
] as [string, { x: number; y: number }][]) {
|
||||
await clickAt(page, at)
|
||||
await expectSelected(page, name)
|
||||
await expect(selectionTag(page)).toHaveCSS('position', 'absolute')
|
||||
// The name shows in the fixed-height strip, which never moves the drawing.
|
||||
await expect(page.getByTestId('edit-strip')).toHaveCSS('height', '64px')
|
||||
expect(await top(), `${name} selected`).toBe(before)
|
||||
await clickAt(page, IN_ROOT)
|
||||
await expectDeselected(page)
|
||||
@@ -745,23 +747,23 @@ test.describe('deselect and D6b (read-only twin at 375 px)', () => {
|
||||
|
||||
await takeRecord(page)
|
||||
await tap(cdp, await markerAt())
|
||||
await expect(selectionTag(page)).toContainText(POINT)
|
||||
await expect(twinSelectionTag(page)).toContainText(POINT)
|
||||
await shoot(info, 'r1-panel-375', properties(page))
|
||||
await report('twin tap on a marker')
|
||||
|
||||
await takeRecord(page)
|
||||
await tap(cdp, await twinAt(IN_RECT.x, IN_RECT.y))
|
||||
await expect(selectionTag(page)).toHaveCount(0)
|
||||
await expect(twinSelectionTag(page)).toHaveCount(0)
|
||||
await expect(canvas).toBeFocused()
|
||||
await report('twin tap on the rect')
|
||||
|
||||
await tap(cdp, await markerAt())
|
||||
await expect(selectionTag(page)).toContainText(POINT)
|
||||
await expect(twinSelectionTag(page)).toContainText(POINT)
|
||||
await takeRecord(page)
|
||||
const from = await twinAt(IN_CIRCLE.x, IN_CIRCLE.y)
|
||||
await drag(cdp, from, { x: from.x + 30, y: from.y + 10 })
|
||||
await frames(page)
|
||||
await expect(selectionTag(page)).toContainText(POINT)
|
||||
await expect(twinSelectionTag(page)).toContainText(POINT)
|
||||
const drag1 = guards(await report('twin one-finger drag'))
|
||||
expect(drag1.clicks, 'twin drag: no click').toBe(0)
|
||||
expect(
|
||||
@@ -774,7 +776,7 @@ test.describe('deselect and D6b (read-only twin at 375 px)', () => {
|
||||
await touch(cdp, 'touchStart', [two, { x: two.x + 30, y: two.y }])
|
||||
await touch(cdp, 'touchEnd', [])
|
||||
await frames(page)
|
||||
await expect(selectionTag(page)).toContainText(POINT)
|
||||
await expect(twinSelectionTag(page)).toContainText(POINT)
|
||||
const pair = guards(await report('twin two-finger tap'))
|
||||
expect(pair.nonPrimary, 'twin: a non-primary pointerdown').toBeGreaterThan(
|
||||
0,
|
||||
@@ -819,12 +821,12 @@ test.describe('deselect and D6b (read-only twin at 375 px)', () => {
|
||||
[LINK, { x: 825, y: 575 }],
|
||||
] as [string, { x: number; y: number }][]) {
|
||||
await tap(cdp, await twinAt(at.x, at.y))
|
||||
await expect(selectionTag(page)).toHaveCount(1)
|
||||
await expect(selectionTag(page)).toContainText(name)
|
||||
await expect(selectionTag(page)).toHaveCSS('position', 'absolute')
|
||||
await expect(twinSelectionTag(page)).toHaveCount(1)
|
||||
await expect(twinSelectionTag(page)).toContainText(name)
|
||||
await expect(twinSelectionTag(page)).toHaveCSS('position', 'absolute')
|
||||
expect(await top(), `${name} selected`).toBe(before)
|
||||
await tap(cdp, await twinAt(IN_RECT.x, IN_RECT.y))
|
||||
await expect(selectionTag(page)).toHaveCount(0)
|
||||
await expect(twinSelectionTag(page)).toHaveCount(0)
|
||||
expect(await top(), `${name} deselected`).toBe(before)
|
||||
}
|
||||
})
|
||||
@@ -850,7 +852,7 @@ test.describe('deselect and D6b (read-only twin at 375 px)', () => {
|
||||
x: marker!.x + marker!.width / 2,
|
||||
y: marker!.y + marker!.height / 2,
|
||||
})
|
||||
await expect(selectionTag(page)).toContainText(POINT)
|
||||
await expect(twinSelectionTag(page)).toContainText(POINT)
|
||||
|
||||
const more = page.locator('#editor-tabs-more-button')
|
||||
await more.click()
|
||||
@@ -859,10 +861,13 @@ test.describe('deselect and D6b (read-only twin at 375 px)', () => {
|
||||
await page.keyboard.press('Escape')
|
||||
await expect(more).toHaveAttribute('aria-expanded', 'false')
|
||||
await expect(more).toBeFocused()
|
||||
await expectKept(page, POINT)
|
||||
await frames(page)
|
||||
await expect(twinSelectionTag(page)).toContainText(POINT)
|
||||
|
||||
await page.keyboard.press('Escape')
|
||||
await expectDeselected(page)
|
||||
await expect(twinSelectionTag(page)).toHaveCount(0)
|
||||
await expect(properties(page)).toHaveCount(0)
|
||||
await expect(overview(page)).toBeVisible()
|
||||
await expect(liveRegion(page)).toHaveCount(1)
|
||||
expect(saves).toEqual([])
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user