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:
@@ -101,3 +101,16 @@ test('the Slides library: what is saved, and a copy for a playlist', async () =>
|
||||
copy.content.widgets[0].kind = 'clock'
|
||||
assert.equal(saved.content.widgets[0].kind, 'name') // a copy, never the kept slide
|
||||
})
|
||||
|
||||
test('a colour with its opacity: #rrggbbaa, typed by hand (owner review 4)', async () => {
|
||||
const { COLOUR_PRESETS, joinAlpha, splitAlpha, typedColour } = await import('../src/pages/signage/signageLogic.js')
|
||||
assert.equal(COLOUR_PRESETS.length, 12)
|
||||
assert.deepEqual(splitAlpha('#FF0000'), { rgb: '#ff0000', alpha: 100 })
|
||||
assert.deepEqual(splitAlpha('#ff000080'), { rgb: '#ff0000', alpha: 50 })
|
||||
assert.equal(joinAlpha('#ff0000', 100), '#ff0000')
|
||||
assert.equal(joinAlpha('#ff0000', 50), '#ff000080')
|
||||
assert.equal(joinAlpha('#ff0000', 0), '#ff000000')
|
||||
assert.equal(typedColour('abc'), '#aabbcc')
|
||||
assert.equal(typedColour(' #11223344 '), '#11223344')
|
||||
assert.equal(typedColour('#12345'), null)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user