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
+14
View File
@@ -192,3 +192,17 @@ test("a menu's look part by part: sizes against the board's text, colours fall b
assert.deepEqual(menuLook({ dot_style: { style: 'none' } }).dots, { borderBottom: 'none' })
assert.equal(priceChars([{ items: [{ price: 4.5 }, { price: 12 }, { price: null }] }], p => `€${p.toFixed(2)}`), 6)
})
test('owner review 4: a part\'s widgets (one stored as `widget` too), badges that read', async () => {
const { cellWidgets, menuLook, readableOn } = await import('../src/logic.js')
assert.deepEqual(cellWidgets({ widgets: [{ kind: 'clock' }, { kind: 'date' }] }).map(w => w.kind), ['clock', 'date'])
assert.deepEqual(cellWidgets({ widget: { kind: 'qr' } }).map(w => w.kind), ['qr'])
assert.deepEqual(cellWidgets({ slide_id: 3 }), [])
assert.equal(readableOn('#111827'), '#ffffff')
assert.equal(readableOn('#1e3a8acc'), '#ffffff')
assert.equal(readableOn('#f59e0b'), '#111111')
assert.equal(readableOn('#fff'), '#111111')
assert.deepEqual(menuLook({ accent_colour: '#1e3a8a' }).badge, { background: '#1e3a8a', color: '#ffffff' })
assert.deepEqual(menuLook({ accent_colour: '#1e3a8a', badge_text_colour: '#fde68a' }).badge, { background: '#1e3a8a', color: '#fde68a' })
assert.equal(menuLook({ accent_colour: '#123456', heading_style: { colour: '#ff0000' } }).title, '#ff0000')
})