feat(manager): UI review pass 3 (fees tabs, products panes, floor editor, permissions search, pricing heads)

- Online orders → Settings: the fee tabs breathe (inset strip); a rule's buttons
  and switch centred together.
- Products: categories and list as panes that scroll on their own, headers and
  footers stay; the list sunken with white rows; the category search is the
  shared SearchInput. Product editor: "Make main" text instead of a star, the
  left tabs share the width.
- Floor editor: no "+" next to a corner; − / fit width / whole plan / +;
  "Edit the floor's shape" → "Save shape" (saves the shape and size at once);
  sizes in grid cells by half cells (steppers; typing snapped every keystroke
  before), resize handles on every unrotated table and thing, half-cell snapping.
- MediaField: the picture's name under the buttons, Remove red on hover.
- Staff permissions: a search box at the top.
- Prep zone name hint fixed. Offers & pricing: title first, then tabs; every tab
  has its head with the New button at the top right.
- Tests: floor cells, e2e (cell steppers, no + near a corner, Save shape,
  permission search, products panes).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-20 17:51:17 +02:00
co-authored by Claude Opus 5.5
parent 181b2f16b0
commit 301502965c
20 changed files with 257 additions and 97 deletions
+23 -1
View File
@@ -427,6 +427,11 @@ try {
r.check('editor: grouped by module (Ordering, Kitchen display, Core…), cancel is off for a waiter',
await page.getByTestId('perm-group-ordering').count() === 1 && await page.getByTestId('perm-group-core').count() === 1 &&
await cancelRow.getAttribute('data-on') === 'false' && (await cancelRow.textContent()).includes('Cancel items already sent'))
// 2026-11-21: the search at the top finds a permission
await page.getByTestId('perm-search').fill('cancel items')
r.check('editor: the search keeps only the matching permissions',
await cancelRow.count() === 1 && await page.getByTestId('perm-group-core').count() === 0)
await page.getByTestId('perm-search').fill('')
await cancelRow.getByRole('switch').click()
await page.getByRole('button', { name: 'Save 1 change' }).click()
await editor.waitFor({ state: 'detached', timeout: 8000 }).catch(() => {})
@@ -1120,8 +1125,21 @@ try {
await page.mouse.move(tb.x + tb.width / 2 + 75, tb.y + tb.height / 2, { steps: 5 })
await page.mouse.move(tb.x + tb.width / 2 + 150, tb.y + tb.height / 2 + 60, { steps: 5 })
await page.mouse.up()
// 2026-11-21: sizes in grid cells: "+" on the width adds half a cell
await page.locator(`[data-testid="floor-canvas"] [data-testid="floor-table"][data-table="${secondId}"]`).click()
const widthOf = () => page.getByTestId('floor-width').locator('.x-stepper__value').textContent()
const w0 = await widthOf()
await page.getByTestId('floor-width').locator('button').last().click()
const w1 = await widthOf()
r.check('floor: a table\'s width grows by half a grid cell', parseFloat(w1.replace(',', '.')) - parseFloat(w0.replace(',', '.')) === 0.5, `${w0} → ${w1}`)
await page.keyboard.press('Escape')
// an irregular floor: a corner more, pulled in
await page.getByTestId('floor-shape-mode').click()
// 2026-11-21: right beside a corner there is no "+" (the corner's bubble removes it)
const c0 = await page.getByTestId('floor-corner').nth(1).boundingBox()
await page.mouse.move(c0.x + c0.width / 2, c0.y + c0.height / 2 + 14, { steps: 2 })
await sleep(100)
r.check('floor: no "+" right beside a corner', await page.getByTestId('floor-edge-add').count() === 0)
// 2026-11-20: a "+" shows on the edge under the pointer; pressing there adds a corner and drags it
const c1 = await page.getByTestId('floor-corner').nth(1).boundingBox()
const c2 = await page.getByTestId('floor-corner').nth(2).boundingBox()
@@ -1134,7 +1152,11 @@ try {
await page.mouse.move(mid.x - 120, mid.y + 10, { steps: 6 })
await page.mouse.up()
r.check('floor: pressing on the edge added a corner (5)', await page.getByTestId('floor-corner').count() === 5)
await page.getByTestId('floor-shape-mode').click()
// "Save shape" saves the shape at once and leaves the shape mode
await page.getByTestId('floor-shape-save').click()
await page.getByTestId('floor-shape-mode').waitFor({ timeout: 5000 })
const shaped = (await api('GET', '/api/floor-plans', { token: boss })).plans.find(x => x.name === 'E2E ground floor')
r.check('floor: "Save shape" saved the five-corner floor', shaped?.outline?.length === 5, JSON.stringify(shaped?.outline))
await page.screenshot({ path: path.join(OUT, 'manager-floor-editor.png') })
await page.getByTestId('floor-save').click()
let saved = null