[web] Domi UI: the web UI on @domi/ui v1.0.4, vendored (CPAL-1.0), with the Built on Domi credit (PR #14, squashed)
@domi/ui v1.0.4 vendored unchanged in packages/domi-ui by domi-design's tools/vendor.mjs and used as workspace:*, so the Nix build fetches nothing from Gitea (web.nix sources the folder; fetchPnpmDeps hash from the NixOS runner). Its fonts, roles (data-domi-room="ianitor", the same hex) and controls replace Ianitor's copies: Button through Ianitor's adapter (desktop sizes kept), every text field a TextField with its seal, Checkbox, Select, Segmented. Ianitor's 22 role names renamed to --domi-*. <DomiCredit /> on every screen and in About, with the CPAL section 15 note beside the source link; the README names the vendored package. Disabled buttons are natively disabled.
This commit was merged in pull request #14.
This commit is contained in:
+14
-1
@@ -170,7 +170,7 @@ Identity gate, tunnel, Domi templates, ACME server, HTTP/3, migrating public sit
|
||||
## 10. Handover
|
||||
(Rewritten at the end of every session: what changed, what was not verified, which build is deployed, the next step.)
|
||||
|
||||
**2026-11-23: Ianitor is CPAL-1.0 (Mark's decision for every public Domi repo; F:Akcedomi-licence).**
|
||||
**2026-11-23: Ianitor is CPAL-1.0 (Mark's decision for every public Domi repo; F:\Akce\domi-licence).**
|
||||
- **Changed:** LICENSE is the kit's template with only `{ORIGINAL_CODE}` = Ianitor. Every header (166 files) is an
|
||||
`SPDX-License-Identifier: CPAL-1.0` notice; Cargo.toml, the fuzz crate, the three package.json, the Nix package
|
||||
meta (`lib.licenses.cpal10`), the OpenAPI document, README, CLAUDE.md, decision 9 and the docs say CPAL-1.0.
|
||||
@@ -181,6 +181,19 @@ Identity gate, tunnel, Domi templates, ACME server, HTTP/3, migrating public sit
|
||||
and control's API tests 5/5 in WSL. The rest of the Rust suites were not rerun (headers only).
|
||||
- **Deployed:** nothing. **Not verified:** the phone layout of the credit by eye; the Nix build (`cpal10`).
|
||||
|
||||
**2026-11-23: the web UI on @domi/ui, the shared Domi design system (docs/domi-ui.md); PR 14, squash-merged.**
|
||||
- **Changed:** `@domi/ui` v1.0.4 vendored in packages/domi-ui (domi-design tools/vendor.mjs; CPAL-1.0, unedited) and used as `workspace:*`; `<DomiCredit />` is the credit on every screen; its fonts, roles (`data-domi-room="ianitor"`,
|
||||
the same hex) and controls replace Ianitor's copies. Buttons are its Button through Ianitor's adapter (desktop sizes
|
||||
kept); every text field is its TextField with a seal; checkboxes, the secret picker and segmented controls are its
|
||||
components. Ianitor's 22 role names are renamed to `--domi-*`; its own tokens and components stay in packages/ui.
|
||||
Disabled buttons are natively disabled now (their reasons are visible text).
|
||||
- **Tests:** vitest 23; svelte-check clean; Playwright web 6/6 (the Apply lookup is exact now), aula 5/5; 13 screens
|
||||
compared before and after (in the PR). No Rust change.
|
||||
- **Deployed:** nothing.
|
||||
- **Nix:** `fetchPnpmDeps`'s hash is the one the NixOS runner reported (no Gitea login needed any more).
|
||||
- **Not verified:** the full Nix build of .#ianitor; a phone (the 48 px touch sizes).
|
||||
|
||||
|
||||
**2026-11-22: Phase 4, hardening and release.**
|
||||
- **Changed:**
|
||||
- Edge: a 60 s header deadline (slowloris), lookups on its own bounded resolver threads with one lookup per name, pipelining on both listeners, a proxy socket (`/run/ianitor-proxy/edge.sock`, sticky 3770) on which edge trusts Caddy's X-Forwarded-For, and `unix:` upstreams with a strict charset.
|
||||
|
||||
@@ -0,0 +1,93 @@
|
||||
# Ianitor on @domi/ui
|
||||
|
||||
The web UI's controls and roles come from **@domi/ui**, the shared Domi design system (Gitea `mnovak/domi-design`,
|
||||
its `docs/INTEGRATE.md` §6a and `docs/MIGRATION.md`). It is **vendored** at a tag in `packages/domi-ui` (CPAL-1.0,
|
||||
like Ianitor; `VERSION` names the tag, v1.0.4; `LICENSE`, `NOTICE` and `VERSION` there stay unchanged) and used as a
|
||||
workspace package by `apps/web` and `packages/ui`:
|
||||
|
||||
```json
|
||||
"@domi/ui": "workspace:*"
|
||||
```
|
||||
|
||||
Why vendored: domi-design is private on Gitea, and the Nix build (`deploy/nixos/web.nix`) fetches the pnpm
|
||||
dependencies in a sandbox without credentials. A token there would land in the world-readable Nix store and be needed
|
||||
on every builder. The vendored copy is offline, reproducible and secret-free; the lockfile names no Gitea repository.
|
||||
|
||||
**Do not edit `packages/domi-ui`.** Changes go to domi-design as a PR. To upgrade, read the next tag's CHANGELOG.md,
|
||||
then from a clone of domi-design run `node tools/vendor.mjs <this repo>/packages/domi-ui vX.Y.Z`, `pnpm install`, and
|
||||
update `fetchPnpmDeps`'s hash in `deploy/nixos/web.nix` (`lib.fakeHash`, build, paste the hash Nix reports).
|
||||
|
||||
## What comes from where
|
||||
|
||||
| Part | From | Notes |
|
||||
| :-- | :-- | :-- |
|
||||
| Fonts (Cinzel, Cormorant Garamond, Manrope; latin and latin-ext) | @domi/ui `domi.css` | bundled from npm, nothing fetched at run time. The `@fontsource` packages are gone |
|
||||
| Roles: ground, text, accent, leaf, ok, warning, danger | @domi/ui, `data-domi-room="ianitor"` on `<html>` | the same hex as before (domi-design PALETTE.md). Ianitor's old names are renamed to `--domi-*` (MIGRATION.md, ianitor table); no legacy alias file |
|
||||
| Buttons | @domi/ui `Button`, through Ianitor's `Button.svelte` | see the mapping below |
|
||||
| Text fields | @domi/ui `TextField`, every one with its seal | see the actions below |
|
||||
| Checkboxes, the secret picker, segmented controls | @domi/ui `Checkbox`, `Select`, `Segmented` | Ianitor's `Segmented.svelte` keeps the visible name above the choices |
|
||||
| Banners, dialogs, status, chips, lists, menus, toasts, the number and file inputs | Ianitor (`packages/ui`, `ia-*`) | Ianitor's own tokens (status names, washes, type sizes, spacing, radii) stay in `packages/ui/src/tokens.css` |
|
||||
|
||||
`packages/ui` is now Ianitor's own components on top of @domi/ui. Its old `.domi-btn`, `.domi-field` and
|
||||
`.domi-input` rules are gone (they had the same class names as @domi/ui's); the link-style button is `.ia-link`.
|
||||
|
||||
## Buttons
|
||||
|
||||
| Ianitor | @domi/ui | Desktop height |
|
||||
| :-- | :-- | :-- |
|
||||
| default (`quiet`), `outline` | `plate`, size `lg` | 44 px, as before |
|
||||
| `primary` | `primary` (the leaf), size `xl` | 50 px, as before |
|
||||
| `danger` | `danger`, size `lg` | 44 px |
|
||||
| `small` | size `md` | 34 px (was 36) |
|
||||
| `full` | `block` | |
|
||||
| `pending` | `status="loading"` (the interpuncts) | |
|
||||
| `label` | the accessible name, through `aria-labelledby` | "+ Host" is still "Add a host" |
|
||||
|
||||
On a touch screen every button is at least 48 px (@domi/ui). An `onclick` that returns a Promise shows loading,
|
||||
then a check or a refusal, by itself.
|
||||
|
||||
**A change in behaviour:** a disabled button is now natively disabled, so it is skipped by Tab. Before, it was
|
||||
`aria-disabled` and stayed focusable so its reason could be read. Every disabled button with a reason (Apply,
|
||||
Restore this version, + Host while changes are blocked) shows that reason as visible text beside it, which is
|
||||
@domi/ui's rule ("say elsewhere why"). Copy link is *working*, not disabled, while the link is being made, so the
|
||||
share dialog still opens with the focus on it.
|
||||
|
||||
## Text fields and their seals
|
||||
|
||||
| Field | Seal | Enter |
|
||||
| :-- | :-- | :-- |
|
||||
| Host form: every text field but the last | `next` | goes to the next field |
|
||||
| Host form: the last text field shown | `save`, "Apply this host" | applies the form, as Apply does |
|
||||
| Share link: only addresses starting with | `save`, "Make the link for these addresses" | makes a new link (as leaving the field did) |
|
||||
| Share link: password | `save`, "Ask for this password on the link" | as Use this password |
|
||||
| Device name | `send`, "Request the certificate" | as Issue |
|
||||
| New token's name | `save`, "Rename the token" | renames it now (before, only when the dialog closed) |
|
||||
| Signed certificate (pasted) | `send`, "Use the pasted certificate" | a new line (`enterSends="never"`); Ctrl+Enter or the seal uses it |
|
||||
|
||||
The host form still checks a field when the focus leaves it, now when it leaves the field and its seal.
|
||||
|
||||
## The credit
|
||||
|
||||
@domi/ui and Ianitor are both CPAL-1.0 with the same Exhibit B, so one credit covers both: `<DomiCredit />` renders
|
||||
"Built on Domi · https://aula.marek-novak.cz · Copyright (c) 2026 Marek Novák" in the sidebar (every desktop screen),
|
||||
at the foot of every page on a phone, and in Settings, About. `apps/web/src/lib/credit.ts` holds the same words as
|
||||
plain data for the e2e real-data check, and a unit test keeps them equal to @domi/ui's. The README says the repo
|
||||
contains @domi/ui in `packages/domi-ui` (INTEGRATE.md §6a).
|
||||
|
||||
History: the first pins were v1.0.0 and v1.0.1 (a git dependency), then v1.0.2 was vendored (MPL-2.0). That copy
|
||||
stays in this PR's branch history by Mark's choice; the PR is squash-merged, so main only ever holds v1.0.4
|
||||
(v1.0.4 is v1.0.3 with a script block in `Strike.svelte`, so no tsconfig workaround is needed).
|
||||
|
||||
## Risks
|
||||
|
||||
- **The Nix hash** in `deploy/nixos/web.nix` is the one Fabrica's NixOS runner reported for this lockfile (run
|
||||
`rp8rw56wvg5k2`, 2026-11-23); v1.0.3 and v1.0.4 left the lockfile byte-identical. A verify-nix run on the branch confirms it.
|
||||
- A visual change Mark has not seen beyond the asked-for controls: the field labels are @domi/ui's (13 px, 600),
|
||||
and Ianitor's group labels (Certificate, Visit log, What is it) follow them so a form reads as one; the
|
||||
segmented controls are as wide as their choices, not the panel.
|
||||
|
||||
## Atrium Domi
|
||||
|
||||
Ianitor runs on the home server; Atrium Domi lists programs on Mark's PC (Atrium `docs/APP_CONTRACT.md`), so
|
||||
Ianitor has no room there and no `domi-app.toml`. If it ever gets one: `free = true` (Mark's pricing: Ianitor is
|
||||
free).
|
||||
@@ -119,6 +119,9 @@ That is a remote API with its own authentication (control's API tokens, docs/api
|
||||
So Ianitor stops before Part A. If a Domi app ever needs to ask Ianitor for something, the answer is a scoped API
|
||||
token and a documented call, written in its own design doc.
|
||||
|
||||
For the same reason Ianitor has no room in Atrium Domi, which lists programs on Mark's PC. Mark's pricing, should it
|
||||
ever get one: Ianitor is free (`free = true`; docs/domi-ui.md).
|
||||
|
||||
## 5. Showcase: the e2e suite, screenshots and videos
|
||||
|
||||
`apps/web/playwright.config.ts`, `apps/web/e2e/`:
|
||||
|
||||
@@ -39,6 +39,10 @@ Conventions in this file:
|
||||
|
||||
## 1. Design tokens (packages/ui)
|
||||
|
||||
> Since 2026-11-22 the roles, fonts and controls come from @domi/ui (docs/domi-ui.md): the colours below are its
|
||||
> `--domi-*` roles with Ianitor's values, and the buttons and fields are its components. The rest of this section
|
||||
> still describes what Ianitor keeps.
|
||||
|
||||
### 1.1 The block to paste
|
||||
|
||||
`packages/ui/src/tokens.css`. Apply the class `ia` to `<body>` (the artifact puts the tokens on `.ia`;
|
||||
|
||||
Reference in New Issue
Block a user