feat(signage): look rows that wrap, one colour field with opacity, badges' text, several widgets per stack part, pages up to 2200 px (owner review 4)

- Menu text look: each field names its part ("Headings size"), rows wrap in aligned columns on
  alternating bands; names align left / right; line and letter spacing as lists (Auto default);
  each field changes only itself (followers frozen before the other changes); badge colour +
  badge text colour (auto: readableOn); "Reset the look" with a question.
- ColourField everywhere in signage: a Popover panel (new @xenia/ui Popover, portal, kept in the
  window) with 12 presets, picker, opacity (#rrggbbaa) and typed code; HEX accepts 8 digits.
- Stacks: Cell.widgets (a stored `widget` still reads), several widgets per part laid across the
  stack's direction; extras by path stack.part.place; Add a widget adds, each removable / ordered.
- Page rule: --x-page-max is 2200px (no longer follows the window height).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-21 12:53:14 +02:00
co-authored by Claude Opus 5.5
parent e8c8ec825e
commit aaa0914778
22 changed files with 663 additions and 281 deletions
+36 -2
View File
@@ -318,8 +318,8 @@ try {
await waitFor(async () => (await textCard.getByTestId('signage-widget-position').textContent()).includes('Custom'), 4000, 200) === true)
await mgr.getByTestId('signage-widget-add-hstack').click()
const stackCard = mgr.locator('[data-testid="signage-widget"][data-kind="stack"]')
await stackCard.getByTestId('signage-stack-shows').first().click()
await mgr.getByRole('option', { name: 'Clock', exact: true }).click()
await stackCard.getByTestId('signage-stack-cell-editor').first().getByTestId('signage-stack-add').click()
await mgr.getByTestId('signage-stack-add-clock').click()
// the parts sized by dragging the line between them on the bar (owner review 3)
const bar = await stackCard.getByTestId('signage-stack-bar').first().boundingBox()
const ln = await stackCard.getByTestId('signage-stack-line').first().boundingBox()
@@ -338,6 +338,17 @@ try {
await mgr.getByTestId('signage-stack-add-date').click()
r.check('2026-11-21 (3): "Add a widget" puts a date in the second part',
await waitFor(async () => (await mgr.getByTestId('signage-preview').getByTestId('signage-stack-cell').nth(1).getByTestId('signage-w-date').count()) === 1, 6000, 300) === true)
// owner review 4: a second widget in the same part, then one removed
await stackCard.getByTestId('signage-stack-cell-editor').nth(1).getByTestId('signage-stack-add').click()
await mgr.getByTestId('signage-stack-add-text').click()
await stackCard.getByTestId('signage-stack-cell-editor').nth(1).locator('[data-testid="signage-stack-part-widget"][data-kind="text"]').getByTestId('signage-widget-own-text').fill('Two in one')
const part2 = () => mgr.getByTestId('signage-preview').getByTestId('signage-stack-cell').nth(1)
r.check('2026-11-21 (4): a part holds two widgets (a date and a text), one over the other',
await waitFor(async () => (await part2().getByTestId('signage-stack-place').count()) === 2 && (await part2().getByTestId('signage-w-text').count()) === 1
&& (await part2().getByTestId('signage-w-date').count()) === 1, 6000, 300) === true)
await stackCard.getByTestId('signage-stack-cell-editor').nth(1).locator('[data-testid="signage-stack-part-widget"][data-kind="date"]').getByTestId('signage-stack-part-remove').click()
r.check('2026-11-21 (4): …and one of them removed',
await waitFor(async () => (await part2().getByTestId('signage-stack-place').count()) === 1 && (await part2().getByTestId('signage-w-date').count()) === 0, 6000, 300) === true)
// Delete removes the picked widget (picked on its card)
await stackCard.locator('span', { hasText: 'Horizontal stack' }).first().click()
await mgr.keyboard.press('Delete')
@@ -349,6 +360,29 @@ try {
await mgr.getByTestId('signage-item-name-input').fill('Signature dish')
await mgr.getByTestId('signage-item-name-input').press('Enter')
await mgr.getByTestId('signage-look-item_style-align-right').click()
// owner review 4: each look field changes only itself; the colour panel stays inside the window
r.check('2026-11-21 (4): names align left or right only', (await mgr.getByTestId('signage-look-item_style-align-center').count()) === 0)
const setRange = (loc, v) => loc.evaluate((el, x) => {
Object.getOwnPropertyDescriptor(HTMLInputElement.prototype, 'value').set.call(el, String(x))
el.dispatchEvent(new Event('input', { bubbles: true }))
}, v)
const headSize = async () => mgr.getByTestId('signage-look-heading_style-size').inputValue()
const before = await headSize()
await setRange(mgr.getByTestId('signage-look-item_style-size'), 180)
const headColour = async () => (await mgr.getByTestId('signage-look-heading_style-colour-open').textContent()).trim()
const colourBefore = await headColour()
await mgr.getByTestId('signage-accent-open').click()
const panel = await mgr.getByTestId('signage-accent-panel').boundingBox()
const vw = await mgr.evaluate(() => innerWidth)
r.check('2026-11-21 (4): the colour panel opens inside the window (12 ready colours)',
panel && panel.x >= 0 && panel.x + panel.width <= vw && (await mgr.getByTestId('signage-accent-preset').count()) === 12, JSON.stringify(panel))
await mgr.getByTestId('signage-accent-preset').nth(10).click()
r.check('2026-11-21 (4): the names size and the badges colour leave the headings as they were',
(await headSize()) === before && (await headColour()) === colourBefore, `${before} → ${await headSize()}, ${colourBefore} → ${await headColour()}`)
await mgr.getByTestId('signage-look-dots-colour-open').click()
await setRange(mgr.getByTestId('signage-look-dots-colour-opacity'), 50)
r.check('2026-11-21 (4): a see-through colour (#rrggbbaa)', /^#[0-9a-f]{8}$/.test((await mgr.getByTestId('signage-look-dots-colour-open').textContent()).trim()))
await mgr.keyboard.press('Escape')
r.check('2026-11-21 (3): a product named for this board only shows on the preview, the catalogue name under it in the list',
await waitFor(async () => (await mgr.getByTestId('signage-preview').getByText('Signature dish').count()) > 0
&& (await mgr.getByTestId('signage-menu-board').getByText(/Catalogue:/).count()) > 0, 6000, 300) === true)