[ui] DomiUi: Rosea's buttons and town search on @domi/ui v1.0.4 (CPAL-1.0, vendored by its own tool into packages/domi-ui), the licence credit at the foot of every screen, the README's copy line and public-domain sources; before-and-after pictures by pnpm look:shots
This commit is contained in:
@@ -6,6 +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.0.4 (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) |
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
# @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.0.4** (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).
|
||||
|
||||
## 1. Why and what, in the player's terms
|
||||
|
||||
Every Domi app now shares one set of controls:
|
||||
- a struck plate for an ordinary action, and a gilded leaf for the one main action of a screen;
|
||||
- a glint when pressed;
|
||||
- at least 48 px under a finger.
|
||||
|
||||
Rosea's buttons were her own: rounded outlines, plus underlined words for the quiet ones. They now wear the shared
|
||||
plate in her own colours, and her town search becomes the shared field with a search seal. Nothing else changes:
|
||||
- her colours, her system fonts, her art and her layout stay;
|
||||
- what each button does stays;
|
||||
- what she says stays.
|
||||
|
||||
## 2. Technical architecture
|
||||
|
||||
```mermaid
|
||||
flowchart LR
|
||||
subgraph vendored["packages/domi-ui = @domi/ui v1.0.4 (vendored, never edited)"]
|
||||
btn["components/Button.svelte"]
|
||||
tf["components/TextField.svelte"]
|
||||
css["css/tokens + base + components"]
|
||||
lib["lib/strike, keys, icons"]
|
||||
end
|
||||
script["domi-design tools/vendor.mjs"] -->|copies a CPAL tag| vendored
|
||||
tokens["packages/ui/src/tokens.css"] -->|@import| css
|
||||
rose["rose/*, scene/*, sunset/*, Shell"] --> btn & tf & lib
|
||||
html["apps/rosea/index.html<br/>data-domi-room=rosea, theme auto"] --> css
|
||||
```
|
||||
|
||||
### Decisions
|
||||
|
||||
| # | 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.0.4`, 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 | **Water, Touch her and *Move the chair* are the plate written as markup** (`class="domi-btn"`, `use:strike`), as INTEGRATE.md §3 allows. | `Button` sets its own `onkeydown` and `onblur` after the ones passed to it. That dropped the pour by a held Space and its stop on blur, and the rule that a held key is one touch (thorns.md T2); the unit tests caught it. *Move the chair* needs its element, so focus can come back after the sunset. |
|
||||
| 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. |
|
||||
| D7 | `<html data-domi-room="rosea" data-domi-theme="auto">` | Her room's ground equals her current colours in both themes, and she follows the device, as before. |
|
||||
| D9 | **The licence's credit** (CPAL-1.0 Exhibit B, for Rosea and for the copy): `Built on Domi · https://aula.marek-novak.cz · Copyright (c) 2026 Marek Novák`, in `--ink-soft` at 0.8 rem at the foot of every screen, from the first open on (the gardener, the garden, the Letter). It is the exact text of `DOMI_ATTRIBUTION_TEXT`, as plain text, **not** `DomiCredit`'s link. | INTEGRATE.md §6a and Mark ask for it in the interface. The garden is offline: a link opening a web page would carry the player out of her, and on Android, which has no internet, into a page that never loads. The plain form is the one §6a gives for a native window. CLAUDE.md says *Domi* never appears alone in public; this phrase is the licence's and Mark's own (review finding). |
|
||||
| D8 | **Not converted:** the gardener's choices stay her own picture-chips, not `Radio`. The *Bring her back* file picker stays a `<label>` around the browser's own input, wearing the plate's classes. | The brief was her buttons and the search. A file input cannot be a `Button`. |
|
||||
|
||||
## 3. Risk analysis
|
||||
|
||||
| Risk | Answer |
|
||||
|:--|:--|
|
||||
| A care gesture stops working (the pour by keyboard, blur, a held key) | D3, and the unit tests that caught it run on every commit |
|
||||
| The design system's English reaches the player | D2, D4. `lint:copy` also reads the vendored folder now (46 files) |
|
||||
| A carved, metallic look makes her garden feel colder | listed for Mark in the review with the pictures; her art rules are not changed |
|
||||
| A copy of private code in a public repository | Mark's decision (a). The Aula session told the design system session so that it can add a licence. `VENDORED.md` says so |
|
||||
| CSP | the vendored CSS is bundled into Rosea's own file. The one inline style (`style:` on a multi-line field) is set through the CSSOM and Rosea does not use it. Checked by the e2e suite, which fails on any CSP violation |
|
||||
|
||||
## 4. Gap analysis
|
||||
|
||||
- **Fixed by this:** Rosea's controls now meet the 48 px touch floor.
|
||||
- **Still open:**
|
||||
- the struck plate's look under docs/ART.md (review);
|
||||
- `Button`'s handler order, reported to the design system (D3);
|
||||
- a licence for the copy (the design system's).
|
||||
|
||||
## 5. Verification matrix
|
||||
|
||||
| Case | Kind | Where |
|
||||
|:--|:--|:--|
|
||||
| every button keeps its name, role and action | unit | `packages/ui/test/*` (88) |
|
||||
| the pour by a held Space and the stop on blur | unit | `rose.test.ts`, `planet.test.ts` |
|
||||
| a held key is one touch | unit | `touch.test.ts` |
|
||||
| Rosea's status line is still the one that speaks | unit | `test/said.ts` |
|
||||
| the built app: care, the town, the sunset, offline | e2e, offline | `pnpm test:e2e`, `pnpm test:offline` |
|
||||
| how it looks, light and dark, phone and desktop | pictures | `pnpm look:shots` (`ROSEA_LOOK=before|after`), in the PR |
|
||||
@@ -0,0 +1,97 @@
|
||||
# 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.0.4, 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
|
||||
|
||||
`ROSEA_LOOK=before|after pnpm look:shots` made the pictures: 28 of each (light and dark × phone and desktop × seven
|
||||
screens), from the BUILT app, `main` 60a9f14 against this branch. They are in the PR, not in git.
|
||||
|
||||
## What Mark should look at: where the carved look meets Rosea's art rules
|
||||
|
||||
Her art rules (docs/ART.md, art/STYLE.md) are not changed. These are the places where the new look and her old look
|
||||
differ, for him to judge:
|
||||
|
||||
1. **The rose colour leaves the buttons.**
|
||||
- Her ordinary buttons were outlined in `--rose`. They are now @domi/ui's neutral plate: warm grey on parchment,
|
||||
dark stone at night.
|
||||
- Her quiet buttons were underlined words in `--rose`. They are now plain words in `--domi-fg-2`, bold, with no
|
||||
underline.
|
||||
- Rose now shows only on focus, on the leaf (*Done* on the first screen), and on the search seal.
|
||||
2. **A heavier, more formal type in the controls.** The labels are bold (600) in her system face, where her text
|
||||
around them is regular. The field's label *Town or city* is bold too.
|
||||
3. **Two control styles on the first screen.** The gardener's choices stay her soft rose chips (D8). The *Done*
|
||||
below them is a gilded leaf.
|
||||
4. **Taller rows on a phone.** Every control is at least 48 px under a finger, so *Change gardener* now wraps to a
|
||||
line of its own under *Her numbers* and *Keep her safe*, with more air around it.
|
||||
5. **Dusk.** On the sunset scene the plate is recoloured locally to evening glass with the sunset's gold edge (D5).
|
||||
It is the one place with colours that are not @domi/ui's.
|
||||
6. **The glint and the strike** (a light sweep and a press ring) animate on press. With reduced motion on, Rosea's
|
||||
own rule turns every transition off, as before.
|
||||
|
||||
## Findings
|
||||
|
||||
1. **`Button` drops `onkeydown` and `onblur` passed to it.** Its own handlers come after `{...rest}`.
|
||||
- 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* by writing Water and Touch her as markup (D3).
|
||||
- *For the design system:* chain the passed handlers. The Aula session asked for improvements to go back as PRs
|
||||
to domi-design; this is the first.
|
||||
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.
|
||||
3. **The design system's English** ("Working", "Done", "Searched", "Could not search") would reach the player
|
||||
through a Promise or a search.
|
||||
- *Prevented* by D2 and `sentText=""`.
|
||||
- The seal's name is Rosea's own copy: *Search towns*.
|
||||
- `lint:copy` now reads 46 files, including the vendored folder: 0 problems.
|
||||
4. **A row of shared buttons does not wrap.** Their words stay on one line, and Rosea's links row had no
|
||||
`flex-wrap`, so on a 360 px phone it pushed the whole page sideways. The first after pictures showed it.
|
||||
- *Fixed:* `.more`, `.actions` and `.choices` wrap.
|
||||
5. **svelte-check could not type `Strike.svelte`** in v1.0.1, a component with no script. The first build here
|
||||
added `allowJs`. v1.0.4 gives it a script upstream, so `allowJs` is gone again: no change to Rosea's tsconfigs.
|
||||
6. **ESLint flagged three rules in the vendored `TextField.svelte`.** *Skipped:* `packages/domi-ui` is ignored,
|
||||
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.0.4**, 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
|
||||
file (counted: 0).
|
||||
8. **The credit** (D9) is the exact `DOMI_ATTRIBUTION_TEXT`, not `DomiCredit`, whose web address is a link that
|
||||
opens a new window. A tap must not carry the player out of an offline garden; on Android, with no internet,
|
||||
it would lead into a page that never loads. Mark approved the line (via the Aula session): one quiet line on
|
||||
every launch, never a splash.
|
||||
- It stands at the foot of every screen: the first open, the garden and the Letter.
|
||||
- A unit test holds the exact words and that no link to the address exists. The drill: without the line on
|
||||
the garden, that test failed.
|
||||
- The tension with CLAUDE.md's *Domi never appears alone* is Mark's to reconcile in his file. The phrase is the
|
||||
licence's.
|
||||
9. **The README** says what §6a asks: *Contains @domi/ui (CPAL-1.0, …), in `packages/domi-ui`*. It now names the
|
||||
public-domain sources of the candidate sentences and the origin of the placeholder art, as the domi-licence
|
||||
session asked. `tauri.conf.json` declares `"license": "CPAL-1.0"` for the bundles.
|
||||
|
||||
## Soul, privacy, reachability, offline
|
||||
|
||||
- **Soul:** no words changed except the seal's name, and no gesture changed. The look is Mark's call (above).
|
||||
- **Privacy:** nothing new leaves the device. The vendored CSS is bundled, with no font files and no requests;
|
||||
the e2e suite fails on any request outside the origin.
|
||||
- **Reachability:** none.
|
||||
- **Offline:** `pnpm test:offline` 1 passed.
|
||||
|
||||
## Gates (this branch, v1.0.4, 2026-11-23)
|
||||
|
||||
- `pnpm test`: **644 passed**. By package: cpu-guard 13, schema 19, identity 5, release 8, storage 70, content 88,
|
||||
art-prep 80, tauri 92, ui 90 (88 before + the 2 credit tests), engine 179.
|
||||
- `pnpm lint`, `pnpm typecheck`: clean. `pnpm lint:copy`: 30 files, 0 problems. `pnpm validate:library`: 13 of 13
|
||||
fixtures rejected.
|
||||
- `pnpm test:e2e`: **26 passed** against the built app, axe included. `pnpm test:offline`: **1 passed**.
|
||||
- `pnpm look:shots`: 28 pictures after, compared with the 28 before.
|
||||
|
||||
## Not verified
|
||||
|
||||
- The Android and Windows apps: same game, same CSS. Not rebuilt.
|
||||
- A screen reader. The roles and names are checked by the tests and axe, not heard.
|
||||
Reference in New Issue
Block a user