[ui] DomiUi: @domi/ui v1.5.0: Move the chair is Button too (bind:element), so every button is the shared one

This commit is contained in:
2026-11-23 02:50:05 +01:00
parent 87ca83cd1b
commit a240d35ca2
11 changed files with 32 additions and 22 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ One row per feature, with its analysis document (CLAUDE.md §5.1). Gaps live in
| Feature | Phase | Status | Analysis | Review |
|:--|:--|:--|:--|:--|
| Released through Fabrica: `.fabrica/` (app, release and e2e pipelines, tests, Aula pictures), the Aula page's words, the version check, the APK signed in Custos, `domi-rosea://open` from the installer, the showcase pictures on demo data, the phone target | Platform track | Merged to `main` (9b8eb70). Not published: the first release waits for the author (G-F1, G6.1) | [fabrica-release.md](features/fabrica-release.md) | [feature-fabrica-release.md](reviews/feature-fabrica-release.md) |
| @domi/ui: the shared buttons and the town search field, vendored v1.4.0 (CPAL-1.0); the licence credit at the foot of every screen | Platform track | Built on `feature/domi-ui`; the look is Mark's to judge from the pictures | [domi-ui.md](features/domi-ui.md) | [feature-domi-ui.md](reviews/feature-domi-ui.md) |
| @domi/ui: the shared buttons and the town search field, vendored v1.5.0 (CPAL-1.0); the licence credit at the foot of every screen | Platform track | Built on `feature/domi-ui`; the look is Mark's to judge from the pictures | [domi-ui.md](features/domi-ui.md) | [feature-domi-ui.md](reviews/feature-domi-ui.md) |
| Atrium Domi adoption: the inventory (Tauri calls, data, network, accent, icon) and the plan for steps 1–8 of Atrium's Appendix A | Platform track | Plan merged (f4efc9e); step 1 = `domi-app.toml` alone (`feature/atrium-door`), the door skipped by Mark's ruling | [atrium-adoption.md](features/atrium-adoption.md) | [docs-atrium-adoption.md](reviews/docs-atrium-adoption.md), [feature-atrium-door.md](reviews/feature-atrium-door.md) |
| The APK for a release, tested on the Wave 10 through the phone queue: `reset: uninstall`, `maxMinutes`, the e2e pipeline's `phone` step, the release APK built and verified | Platform track | Merged (f5d8d2c); the phone test passed on the Wave 10 through the queue, 1 of 1 (2026-11-21). Blocked: `rosea-android` does not exist (G-F7); publication (G-F1) | [android-release-apk.md](features/android-release-apk.md) | [feature-android-release-apk.md](reviews/feature-android-release-apk.md) |
| Keep her safe in the apps: true words, Android's own save screen, the page kept between the system bars | Platform track | Merged to `main` 2026-11-17; built on this machine, not distributed. Closes G-T4 and, on Android, G-T5 | [keep-her-safe-apps.md](features/keep-her-safe-apps.md) | [feature-keep-her-safe-apps.md](reviews/feature-keep-her-safe-apps.md) |
+4 -4
View File
@@ -1,7 +1,7 @@
# @domi/ui in Rosea: the shared buttons and the town search
Status: built on `feature/domi-ui`, 2026-11-23. The brief was Mark's, passed on by the Aula session: adopt `@domi/ui`,
the Domi design system (`mnovak/domi-design`), at **v1.4.0** (CPAL-1.0 from v1.0.3). He chose **(a)**: Rosea may
the Domi design system (`mnovak/domi-design`), at **v1.5.0** (CPAL-1.0 from v1.0.3). He chose **(a)**: Rosea may
carry a public copy. Her buttons
and her town search take the new look, and the search field gets *search*, never *send*. Review:
[`feature-domi-ui.md`](../reviews/feature-domi-ui.md).
@@ -23,7 +23,7 @@ plate in her own colours, and her town search becomes the shared field with a se
```mermaid
flowchart LR
subgraph vendored["packages/domi-ui = @domi/ui v1.4.0 (vendored, never edited)"]
subgraph vendored["packages/domi-ui = @domi/ui v1.5.0 (vendored, never edited)"]
btn["components/Button.svelte"]
tf["components/TextField.svelte"]
css["css/tokens + base + components"]
@@ -39,9 +39,9 @@ flowchart LR
| # | Decision | Why |
|:--|:--|:--|
| D1 | **A vendored copy as a workspace package**, `packages/domi-ui` (`"@domi/ui": "workspace:*"`). It is made only by the design system's own `node tools/vendor.mjs <rosea>/packages/domi-ui v1.4.0`, which writes `src/` (css, components, lib, index.ts, types.ts, tokens/generated.ts), a `package.json` with no scripts, `LICENSE` (CPAL-1.0), `NOTICE` (the credit), `CHANGELOG.md` and `VERSION`, and refuses a tag that is not CPAL-1.0 (INTEGRATE.md §6a). It is never edited here. ESLint skips the folder. The three `@fontsource-variable` fonts arrive as its npm dependencies (OFL); Rosea never imports them, so none is bundled. | Rosea's repository is public and the design system's is private, so a public build cannot fetch it. Mark allowed the copy, under CPAL-1.0 from v1.0.3 (v1.0.2 was MPL-2.0 and is never used). A bump reruns the tool with the next tag. |
| D1 | **A vendored copy as a workspace package**, `packages/domi-ui` (`"@domi/ui": "workspace:*"`). It is made only by the design system's own `node tools/vendor.mjs <rosea>/packages/domi-ui v1.5.0`, which writes `src/` (css, components, lib, index.ts, types.ts, tokens/generated.ts), a `package.json` with no scripts, `LICENSE` (CPAL-1.0), `NOTICE` (the credit), `CHANGELOG.md` and `VERSION`, and refuses a tag that is not CPAL-1.0 (INTEGRATE.md §6a). It is never edited here. ESLint skips the folder. The three `@fontsource-variable` fonts arrive as its npm dependencies (OFL); Rosea never imports them, so none is bundled. | Rosea's repository is public and the design system's is private, so a public build cannot fetch it. Mark allowed the copy, under CPAL-1.0 from v1.0.3 (v1.0.2 was MPL-2.0 and is never used). A bump reruns the tool with the next tag. |
| D2 | **Rosea's buttons never hand `Button` a Promise.** Async handlers are called as `() => void save()`. | A Promise would make the button announce "Working" and "Done", the design system's English, not Rosea's copy (CLAUDE.md §7). Rosea's own status lines already speak. Its hidden status regions stay empty. |
| D3 | **Only *Move the chair* is the plate written as markup** (`class="domi-btn"`, `use:strike`), as INTEGRATE.md §3 allows, because focus comes back to its element after the sunset. Water and Touch her are `Button` again. | Up to 1.3.x, `Button` set its own `onkeydown` and `onblur` after the ones passed to it, dropping the pour by a held Space, its stop on blur, and *a held key is one touch* (thorns.md T2). The unit tests caught it. The fix went from here to domi-design (PR mnovak/domi-design#18) and is released in 1.4.0. |
| D3 | **Every button is `Button`.** *Move the chair* binds its element (`bind:element`, 1.5.0), so focus comes back to it after the sunset. Only the *Bring her back* file picker wears the plate's classes on a `<label>` (D8). | Up to 1.3.x, `Button` set its own `onkeydown` and `onblur` after the ones passed to it. That dropped the pour by a held Space, its stop on blur, and *a held key is one touch* (thorns.md T2); the unit tests caught it. The fix went from here to domi-design (PR mnovak/domi-design#18, released in 1.4.0), and `bind:element` came in 1.5.0 at this request. Until then these buttons were markup. |
| D4 | **The town search is `TextField`, `action="search"`,** with Rosea's label, a new seal name *Search towns*, and `sentText=""`. The list follows the typing as before, so the seal and Enter only confirm it. | Nothing is sent anywhere, so the seal never says *send*. `sentText=""` keeps the design system's "Searched" unsaid; the line *One town* already speaks. |
| D5 | **On the dusk scene the plate is recoloured locally**: evening glass, with the sunset's gold edge that Rosea's button had. | That scene is dusk in either theme. The room's light plate would be parchment on a night sky. |
| D6 | **Her system faces stay**: `--domi-font-hand` and `--domi-font-book` point at Rosea's own stacks. No font files are copied. | INTEGRATE.md §0.4; the font is Mark's open question in PALETTE.md. |
+7 -4
View File
@@ -1,7 +1,7 @@
# Review: `feature/domi-ui` (2026-11-23)
Analysis: [`../features/domi-ui.md`](../features/domi-ui.md). Rosea's buttons and her town search take `@domi/ui`'s
look, from a vendored copy. The copy is **v1.4.0, CPAL-1.0**, made by the design system's `tools/vendor.mjs` into `packages/domi-ui`. Aula's
look, from a vendored copy. The copy is **v1.5.0, CPAL-1.0**, made by the design system's `tools/vendor.mjs` into `packages/domi-ui`. Aula's
hold was lifted with that tag; v1.0.1, the copy first tried here, never left this machine.
## Before and after
@@ -37,7 +37,8 @@ differ, for him to judge:
- In Rosea that broke three things: the pour by a held Space, the stop on blur, and *a held key is one touch*.
The unit tests caught all three.
- *Fixed upstream:* PR mnovak/domi-design#18 from here, reviewed and released in @domi/ui 1.4.0. Its two tests
fail on the old Button. Water and Touch her are `Button` again; until 1.4.0 they were markup (D3).
fail on the old Button. Water and Touch her are `Button` again; until 1.4.0 they were markup (D3). *Move the
chair* became `Button` with 1.5.0's `bind:element`. Without the binding, the focus test fails (drill).
2. **Every `Button` carries its own `role="status"` region.** Rosea's tests that asked for "the" status found
several. *Fixed in the tests* (`test/said.ts`, and one e2e locator), not in the vendored code. Rosea never hands
a button a Promise (D2), so these regions stay empty and say nothing.
@@ -55,7 +56,7 @@ differ, for him to judge:
linted upstream, and never edited here.
7. **The licence.**
- v1.0.1 was `UNLICENSED` and v1.0.2 MPL-2.0; neither left this machine.
- The copy now is **v1.4.0**, made by the design system's own `tools/vendor.mjs`. It refuses any tag before the
- The copy now is **v1.5.0**, made by the design system's own `tools/vendor.mjs`. It refuses any tag before the
CPAL-1.0 v1.0.3, and writes `LICENSE`, `NOTICE`, `VERSION` and a `package.json` without scripts. It lives in
`packages/domi-ui` as `@domi/ui` (`workspace:*`).
- The three font packages arrive as its npm dependencies (OFL). Rosea imports none, and `dist/` has no font
@@ -88,7 +89,7 @@ differ, for him to judge:
- **Reachability:** none.
- **Offline:** `pnpm test:offline` 1 passed.
## Gates (this branch, v1.4.0, 2026-11-23)
## Gates (this branch, v1.5.0, 2026-11-23)
- `pnpm test`: **646 passed**. By package: cpu-guard 13, schema 19, identity 5, release 8, storage 70, content 88,
art-prep 80, tauri 92, ui 92 (88 before, plus 2 credit tests and 2 Android-field tests), engine 179.
@@ -97,6 +98,8 @@ differ, for him to judge:
- `pnpm test:e2e`: **26 passed** against the built app, axe included. `pnpm test:offline`: **1 passed**. The Aula
pictures: **2 passed**; their phone has an Android user agent and types into the editable box.
- No font file in `dist/`. `pnpm look:shots`: 28 pictures after, compared with the 28 before.
- v1.5.0 (*Move the chair* as `Button`): the same counts again: 646 tests, e2e 26, offline 1. The pictures were not
retaken: the button renders the same classes and label as the markup it replaces.
- Drills, each restored after:
- without the credit on the garden, the credit test fails;
- with `DomiCredit`'s link back on, it fails;
+2 -2
View File
@@ -4,7 +4,7 @@ Rewritten at the end of each session (CLAUDE.md §5.1).
## Latest — 2026-11-23: @domi/ui, the shared look, and the credit
- **`feature/domi-ui`**: Rosea's buttons and her town search wear @domi/ui v1.4.0 (CPAL-1.0). On Android the town field is an editable box, so no Autofill request goes to Google.
- **`feature/domi-ui`**: Rosea's buttons and her town search wear @domi/ui v1.5.0 (CPAL-1.0). On Android the town field is an editable box, so no Autofill request goes to Google.
- It is vendored unchanged into `packages/domi-ui` by the design system's `tools/vendor.mjs`.
- Her colours, system fonts, art and layout stay.
- The licence credit stands at the foot of every screen, in its exact words, as plain text.
@@ -14,7 +14,7 @@ Rewritten at the end of each session (CLAUDE.md §5.1).
- Before and after pictures: `ROSEA_LOOK=before|after pnpm look:shots`.
- **To upgrade @domi/ui:** from a domi-design clone, `node tools/vendor.mjs <rosea>/packages/domi-ui <tag>`.
- **The Button fix** went from here to domi-design (PR mnovak/domi-design#18, released in 1.4.0): Water and Touch her
are `Button` again. Only *Move the chair* stays markup, because focus comes back to it after the sunset.
are `Button` again, and *Move the chair* too, with 1.5.0's `bind:element`.
## Earlier — 2026-11-23: the licence
+5
View File
@@ -1,5 +1,10 @@
# Changelog
## 1.5.0 (2026-11-23)
- `Button bind:element`: the `<button>` itself, for focusing it from outside (return focus after a dialog or a scene
change). Asked by Rosea.
## 1.4.0 (2026-11-23)
- `DomiCredit link={false}`: the same credit with the URL as plain text, for an offline app (asked by Rosea). The licence
+1 -1
View File
@@ -1,4 +1,4 @@
This folder is @domi/ui v1.4.0, copied unchanged from domi-design by tools/vendor.mjs.
This folder is @domi/ui v1.5.0, copied unchanged from domi-design by tools/vendor.mjs.
Licence: Common Public Attribution License 1.0 (LICENSE). Original Code: @domi/ui. Initial Developer: Marek Novák.
Attribution Information (Exhibit B). Any app built with this code shows, prominently in its user interface when
+1 -1
View File
@@ -1 +1 @@
v1.4.0
v1.5.0
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "@domi/ui",
"version": "1.4.0",
"description": "The Domi design system: tokens for every Domi app, struck buttons and fields with an integrated send button, Svelte 5 components. Vendored copy of v1.4.0: do not edit here; change domi-design and vendor the next tag.",
"version": "1.5.0",
"description": "The Domi design system: tokens for every Domi app, struck buttons and fields with an integrated send button, Svelte 5 components. Vendored copy of v1.5.0: do not edit here; change domi-design and vendor the next tag.",
"license": "CPAL-1.0",
"type": "module",
"svelte": "./src/index.ts",
@@ -35,6 +35,8 @@
force?: string;
class?: string;
children?: Snippet;
/** The <button> element, for focusing it from outside (bind:element), e.g. to return focus after a dialog. */
element?: HTMLButtonElement | null;
}
let {
@@ -59,6 +61,7 @@
// Taken out of rest, so the button can run them before its own (a spread before the attribute would lose them).
onkeydown: passedKeydown,
onblur: passedBlur,
element = $bindable(null),
...rest
}: Props = $props();
@@ -117,6 +120,7 @@
</script>
<button
bind:this={element}
{...rest}
{type}
{disabled}
+1 -1
View File
@@ -2,7 +2,7 @@
/* eslint-disable */
export const tokens = {
"name": "@domi/ui",
"version": "1.4.0",
"version": "1.5.0",
"note": "GENERATED by tools/build-tokens.mjs. Colours are sRGB hex. Use roles, never the hex in a component.",
"themes": {
"dark": {
+4 -6
View File
@@ -1,5 +1,5 @@
<script lang="ts">
import { Button, DomiCredit, strike } from '@domi/ui';
import { Button, DomiCredit } from '@domi/ui';
import { PRODUCT_NAME, type Gardener } from '@rosea/schema';
import { tick } from 'svelte';
import { en } from './copy/en.js';
@@ -80,7 +80,7 @@
let sunLine = $state<HTMLElement>();
/** The in-game sunset is showing (chair-sunset.md). */
let watching = $state(false);
let chairButton = $state<HTMLButtonElement>();
let chairButton = $state<HTMLButtonElement | null>(null);
async function stopWatching(): Promise<void> {
watching = false;
@@ -225,10 +225,8 @@
<p class="hint">{en.sunset.notKept}</p>
{/if}
<Button variant="quiet" onclick={() => (changing = true)}>{place ? en.sunset.change : en.sunset.choose}</Button>
<!-- @domi/ui's quiet button written as markup (INTEGRATE.md §3): focus comes back here after the sunset. -->
<button type="button" class="domi-btn domi-btn--quiet" bind:this={chairButton} use:strike onclick={() => (watching = true)}>
<span class="domi-btn__label">{en.chair.move}</span>
</button>
<!-- Focus comes back here after the sunset (bind:element, @domi/ui 1.5.0). -->
<Button variant="quiet" bind:element={chairButton} onclick={() => (watching = true)}>{en.chair.move}</Button>
</div>
{#if watching}
<ChairSunset {place} guessed={choice?.kind === 'device-zone'} now={sunset.now} onclose={stopWatching} />