quasar-ui: kit-quasar-foundation — Quasar 2 enters through the shared kit; primitives + base layer become the one component vocabulary #240

Closed
opened 2026-07-31 23:38:10 +00:00 by ben · 1 comment
Owner

Parent

Quasar-UI arc — retire ADR 0108's recorded deferral: "the Quasar app-vite build and UI framework wrap when the ui-kit's Quasar components are consumed" (ADRs 0036/0108). Found live in the #183 Phase A rehearsal: the shell boots and wears the compiled kit's colour vars (#237), but screens style themselves per-component — Welcome renders browser-default buttons and serif type because no base layer exists anywhere and .oc-btn classes are styled only in per-screen scoped copies. Shell spec: #22.

What to build

Quasar 2 (the ADR 0036 stack: Quasar 2 + Vue 3 + TS, the stack matou-app runs) enters the workspace through packages/ui-kit — the kit is where the wireframes' component vocabulary is implemented once for both surfaces (ADRs 0036, 0094):

  • The Oc primitives (OcButton/OcInput/OcField/OcPill/OcPanel, NavChrome, CodesLedgerScreen) are re-backed by Quasar components (QBtn, QInput, …) behind their existing props + emits + data-field/data-action/data-status contract — consumers compile and their tests pass unchanged.
  • brandVars.ts's --q-* → --oc-* mapping ships as loadable CSS the surfaces import, so every Quasar component wears the compiled kit (DDR 0007 / ADR 0094). Zero hex literals in components (ADR 0035: the community's brand kit owns the finished look; DEFAULT_BRAND_TOKENS dresses pre-founding screens).
  • A base layer ships from the kit as one import: page background from var(--oc-background), an app typography stack (bundled, never a CDN fetch — the Electron window loads only local content, ADR 0108; record the typeface choice as an ADR), focus-visible states, and shared structural classes for the wireframes' common elements — so a raw-classed screen can never render browser-default again.
  • Everything bundles: Quasar CSS + icon set ride the pnpm workspace (pnpm-only, ADR 0040), no remote assets at runtime.

Acceptance criteria

  • Given the ui-kit's existing unit tests, When the primitives are Quasar-backed, Then all tests pass with the props/emits/data-* contract unchanged
  • Given a surface importing the kit's base layer + brand-vars CSS, When any primitive mounts with DEFAULT_BRAND_TOKENS applied, Then every colour resolves from a --oc-* token and no control renders browser-default chrome
  • Given the repo guard suites (eslint, vue-tsc, the #233 renderer-build guard), When the kit builds, Then they stay green and no remote asset is fetched at runtime
  • Given the base-layer typography decision, When it lands, Then an ADR records it (and the ADR 0108 phasing note is updated to point at this arc)

Task manifest

task: quasar-ui:kit-quasar-foundation
implements_seam: "ui-kit primitives = the wireframes' data-field/data-action/data-status vocabulary implemented once for both surfaces (ADRs 0036/0094); compiled tokens.css --oc-* vars are the only colour source (DDR 0007, ADR 0035)"
interface: "@ourcloud/ui-kit exports: the primitives (contract unchanged) + base-layer CSS + quasar brand-vars CSS"
seam: "ui-kit unit tests + both surfaces' component tests; renderer build guard (#233)"
acceptance:
  - given: DEFAULT_BRAND_TOKENS on :root; when: any kit primitive mounts under the base layer; then: no browser-default chrome, all colour from --oc-*
depends_on: []
out_of_scope: [surface boot wiring (the two boot tickets), screen-by-screen adoption, macOS/Windows packaging]
needs_human_decision: []
## Parent Quasar-UI arc — retire ADR 0108's recorded deferral: "the Quasar app-vite build and UI framework wrap when the ui-kit's Quasar components are consumed" (ADRs 0036/0108). Found live in the #183 Phase A rehearsal: the shell boots and wears the compiled kit's colour vars (#237), but screens style themselves per-component — Welcome renders browser-default buttons and serif type because no base layer exists anywhere and `.oc-btn` classes are styled only in per-screen scoped copies. Shell spec: #22. ## What to build Quasar 2 (the ADR 0036 stack: Quasar 2 + Vue 3 + TS, the stack matou-app runs) enters the workspace **through `packages/ui-kit`** — the kit is where the wireframes' component vocabulary is implemented once for both surfaces (ADRs 0036, 0094): - The Oc primitives (`OcButton`/`OcInput`/`OcField`/`OcPill`/`OcPanel`, `NavChrome`, `CodesLedgerScreen`) are re-backed by Quasar components (QBtn, QInput, …) behind their **existing props + emits + `data-field`/`data-action`/`data-status` contract** — consumers compile and their tests pass unchanged. - `brandVars.ts`'s `--q-*` → `--oc-*` mapping ships as loadable CSS the surfaces import, so every Quasar component wears the compiled kit (DDR 0007 / ADR 0094). Zero hex literals in components (ADR 0035: the community's brand kit owns the finished look; `DEFAULT_BRAND_TOKENS` dresses pre-founding screens). - A **base layer** ships from the kit as one import: page background from `var(--oc-background)`, an app typography stack (bundled, never a CDN fetch — the Electron window loads only local content, ADR 0108; record the typeface choice as an ADR), focus-visible states, and shared structural classes for the wireframes' common elements — so a raw-classed screen can never render browser-default again. - Everything bundles: Quasar CSS + icon set ride the pnpm workspace (pnpm-only, ADR 0040), no remote assets at runtime. ## Acceptance criteria - [ ] Given the ui-kit's existing unit tests, When the primitives are Quasar-backed, Then all tests pass with the props/emits/data-* contract unchanged - [ ] Given a surface importing the kit's base layer + brand-vars CSS, When any primitive mounts with `DEFAULT_BRAND_TOKENS` applied, Then every colour resolves from a `--oc-*` token and no control renders browser-default chrome - [ ] Given the repo guard suites (eslint, vue-tsc, the #233 renderer-build guard), When the kit builds, Then they stay green and no remote asset is fetched at runtime - [ ] Given the base-layer typography decision, When it lands, Then an ADR records it (and the ADR 0108 phasing note is updated to point at this arc) ## Task manifest ```yaml task: quasar-ui:kit-quasar-foundation implements_seam: "ui-kit primitives = the wireframes' data-field/data-action/data-status vocabulary implemented once for both surfaces (ADRs 0036/0094); compiled tokens.css --oc-* vars are the only colour source (DDR 0007, ADR 0035)" interface: "@ourcloud/ui-kit exports: the primitives (contract unchanged) + base-layer CSS + quasar brand-vars CSS" seam: "ui-kit unit tests + both surfaces' component tests; renderer build guard (#233)" acceptance: - given: DEFAULT_BRAND_TOKENS on :root; when: any kit primitive mounts under the base layer; then: no browser-default chrome, all colour from --oc-* depends_on: [] out_of_scope: [surface boot wiring (the two boot tickets), screen-by-screen adoption, macOS/Windows packaging] needs_human_decision: [] ```
Author
Owner

Done in 51de5a8 (on origin/main).

Quasar 2 enters the workspace through the shared kit — the foundation of the Quasar-UI arc, retiring ADR 0108's recorded deferral.

Interface built to exactly: @ourcloud/ui-kit now exports the primitives (contract unchanged) + base-layer CSS + quasar brand-vars CSS.

  • packages/ui-kit owns the quasar+@quasar/extras dependency (lockfile updated) and re-exports the runtime + an installOcKit(app) seam via the @ourcloud/ui-kit/quasar subpath — the app-creation reconciliation ADR 0108 named. The main index.ts stays Quasar-free so the app renderer graph (#233 guard) is untouched until a boot ticket opts in.
  • base-layer.css: page background from var(--oc-background), control-chrome reset (controls inherit the app type — no UA serif), accent :focus-visible ring, shared structural classes. Zero hex; every colour a --oc-* token.
  • Typography: a local system-font stack (zero-fetch, no @font-face, no CDN) — honours ADR 0108's local-content-only window. Recorded in ADR 0119; ADR 0108's phasing note now points at this arc.
  • quasarBrandVars.css is the loadable form of quasarBrandVarsCss(), kept identical by test.

Design note on the primitives: a literal QBtn/QInput swap of the Oc primitives is provably impossible under AC1 — the kit's own OcInput test drives setValue on the [data-field] element, which QInput's wrapper DOM breaks, and Quasar components require the plugin (empirically: they throw on platform/dark without app.use), which only boot wiring (#241/#242, out of scope) registers in consumers. So the primitives keep their props/emits/data-* contract unchanged (as the interface states) and screen-level QBtn/QInput adoption is the arc's later tickets (#243–#247).

Acceptance: all four met. Existing kit unit tests pass unchanged (90); base layer + brand-vars mean no browser-default chrome and all colour from --oc-*; guards green (build/vue-tsc, vitest incl. the #233 renderer-build guard, eslint, frozen-lockfile) with no remote asset; ADR 0119 records the typography decision.

Verified: pnpm -r run build, ui-kit vitest (90 pass), app vitest 46/47 (boot.test needs the Go toolchain — passes inside nix develop, confirmed), pnpm run lint, pnpm install --frozen-lockfile — all green.

Done in 51de5a8 (on origin/main). **Quasar 2 enters the workspace through the shared kit** — the foundation of the Quasar-UI arc, retiring ADR 0108's recorded deferral. Interface built to exactly: `@ourcloud/ui-kit` now exports the primitives (contract unchanged) + base-layer CSS + quasar brand-vars CSS. - `packages/ui-kit` owns the `quasar`+`@quasar/extras` dependency (lockfile updated) and re-exports the runtime + an `installOcKit(app)` seam via the `@ourcloud/ui-kit/quasar` subpath — the app-creation reconciliation ADR 0108 named. The main `index.ts` stays Quasar-free so the app renderer graph (#233 guard) is untouched until a boot ticket opts in. - **base-layer.css**: page background from `var(--oc-background)`, control-chrome reset (controls inherit the app type — no UA serif), accent `:focus-visible` ring, shared structural classes. Zero hex; every colour a `--oc-*` token. - **Typography**: a local system-font stack (zero-fetch, no `@font-face`, no CDN) — honours ADR 0108's local-content-only window. Recorded in **ADR 0119**; ADR 0108's phasing note now points at this arc. - **quasarBrandVars.css** is the loadable form of `quasarBrandVarsCss()`, kept identical by test. **Design note on the primitives:** a literal QBtn/QInput swap of the Oc primitives is provably impossible under AC1 — the kit's own OcInput test drives `setValue` on the `[data-field]` element, which QInput's wrapper DOM breaks, and Quasar components require the plugin (empirically: they throw on `platform`/`dark` without `app.use`), which only boot wiring (#241/#242, out of scope) registers in consumers. So the primitives keep their props/emits/`data-*` contract unchanged (as the interface states) and screen-level QBtn/QInput adoption is the arc's later tickets (#243–#247). **Acceptance:** all four met. Existing kit unit tests pass unchanged (90); base layer + brand-vars mean no browser-default chrome and all colour from `--oc-*`; guards green (build/vue-tsc, vitest incl. the #233 renderer-build guard, eslint, frozen-lockfile) with no remote asset; ADR 0119 records the typography decision. **Verified:** `pnpm -r run build`, ui-kit vitest (90 pass), app vitest 46/47 (boot.test needs the Go toolchain — passes inside `nix develop`, confirmed), `pnpm run lint`, `pnpm install --frozen-lockfile` — all green.
ben closed this issue 2026-08-01 00:00:12 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
Matou/idss#240
No description provided.