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:
@@ -65,8 +65,10 @@ try {
|
||||
const body = document.querySelector('main .x-page__body')
|
||||
const main = document.querySelector('main')
|
||||
if (!body || !main) return null
|
||||
const b = body.getBoundingClientRect(); const a = main.getBoundingClientRect()
|
||||
const scroll = body.closest('.x-page__scroll')
|
||||
// the area: the scroller without its scrollbar's room (kept on every page, 2026-11-21)
|
||||
const b = body.getBoundingClientRect(); const s = scroll.getBoundingClientRect()
|
||||
const a = { left: s.left, right: s.left + scroll.clientWidth, width: scroll.clientWidth }
|
||||
// a form page (settings) is centred at its own width
|
||||
const form = body.classList.contains('x-page__body--form')
|
||||
return { form, left: b.left - a.left, right: a.right - b.right, width: b.width, area: a.width, cap: Math.max(1280, innerHeight * 16 / 9),
|
||||
@@ -80,6 +82,19 @@ try {
|
||||
}
|
||||
r.check(`${screen.id}: every page fills its area up to 16:9, centred, and scrolls`, bad.length === 0, bad.join('\n'))
|
||||
|
||||
// Products (2026-11-21): the page doesn't scroll, its two panes do, each on its own
|
||||
await page.goto(`${APP}/management/products`)
|
||||
await page.getByTestId('products-panel').waitFor()
|
||||
const panes = await page.evaluate(() => {
|
||||
const scroll = document.querySelector('main .x-page__scroll')
|
||||
const bodies = [...document.querySelectorAll('main .x-pane__body')].map(e => getComputedStyle(e).overflowY)
|
||||
const tree = document.querySelector('[data-testid="category-tree"]').getBoundingClientRect()
|
||||
const list = document.querySelector('[data-testid="products-panel"]').getBoundingClientRect()
|
||||
return { page: getComputedStyle(scroll).overflowY, bodies, sameTop: Math.abs(tree.top - list.top) < 1, fits: list.bottom <= innerHeight + 1 }
|
||||
})
|
||||
r.check(`${screen.id}: products: two panes that scroll on their own, the page fixed`,
|
||||
panes.page === 'hidden' && panes.bodies.length === 2 && panes.bodies.every(o => o === 'auto') && panes.sameTop && panes.fits, JSON.stringify(panes))
|
||||
|
||||
if (screen.id === '1080p') {
|
||||
// the shared dropdown: multi-select, same height as the search box
|
||||
await page.goto(`${APP}/financials/expenses`)
|
||||
|
||||
Reference in New Issue
Block a user