Brand kit: secondary colour + logo dialog (circular crop, zoom, background) — DDR 0227 #1328

Closed
opened 2026-09-08 17:34:12 +00:00 by ben · 2 comments
Owner

Task

Build DDR 0227 (docs/adr/0227-design-brand-kit-secondary-colour-and-logo-dialog.md) — the brand kit gains a secondary colour and the logo becomes a designed circle via a dialog. Design contract = the amended wireframes docs/ux/wireframes/p1-founding/p1-s3-brand-kit.html (both frames + the new data-frame="logo-dialog" frame) and docs/ux/wireframes/shell/shell-ds2-settings-brand-kit.html; keep every data-field / data-action name.

Acceptance

  1. Seam (internal/brandkit): Palette.Secondary (optional hex; Compile derives a complementary tint from Accent when empty, the way Background is derived); Kit carries a second logo asset — the cropped circle (LogoCircle AssetRef, bytes + chosen background colour) beside the original Logo; goldens updated; Validate warns (never blocks) on secondary contrast like the accent.
  2. Operator app P1-S3 (app/): the COLOURS field grows the SECONDARY row (secondary-colour / secondary-hex, native picker + synced hex, hint "derived from your accent until you pick one"); LOGO: Add logo… (design-logo) / Edit… (edit-logo) open the logo dialog — circular crop stage with drag-to-position + zoom slider, FILE row with the unchanged upload gate (five types, 256 KB, 1024×1024, fail-loud), BACKGROUND swatches (secondary preselected, accent, white, transparent, custom + hex), preview at sign-in-mark and app-icon sizes, Use this logo / Cancel; the chosen state shows the circular mark (logo-mark); Edit… re-opens with the crop intact; Remove returns to the letter-mark frame. The cropped circle is rendered client-side (canvas) into the kit's LogoCircle; the original bytes still travel (DDR 0124).
  3. Dashboard DS2 (dashboard/): same SECONDARY row and the same logo dialog (shared component or same anatomy), Apply recompiles with the circle.
  4. Sign-in mini on both screens wears the circular mark on its background colour.
  5. Tests: seam (derivation, goldens, validate), app + dashboard component specs for the dialog's states (no-logo, chosen, edit-reopens-with-crop, cancel), e2e leg in the founding drive that adds a logo through the dialog and asserts the kit carries both assets.

Two-way door (ADR 0174): purely additive; a kit without Secondary / LogoCircle compiles as today. Consumers of the circle (kanidm push, Coa hand-off) are their own tickets.

## Task Build **DDR 0227** (`docs/adr/0227-design-brand-kit-secondary-colour-and-logo-dialog.md`) — the brand kit gains a **secondary colour** and the logo becomes a **designed circle** via a dialog. Design contract = the amended wireframes `docs/ux/wireframes/p1-founding/p1-s3-brand-kit.html` (both frames + the new `data-frame="logo-dialog"` frame) and `docs/ux/wireframes/shell/shell-ds2-settings-brand-kit.html`; keep every `data-field` / `data-action` name. ### Acceptance 1. **Seam** (`internal/brandkit`): `Palette.Secondary` (optional hex; `Compile` derives a complementary tint from `Accent` when empty, the way `Background` is derived); `Kit` carries a second logo asset — the cropped circle (`LogoCircle AssetRef`, bytes + chosen background colour) beside the original `Logo`; goldens updated; `Validate` warns (never blocks) on secondary contrast like the accent. 2. **Operator app P1-S3** (`app/`): the COLOURS field grows the SECONDARY row (`secondary-colour` / `secondary-hex`, native picker + synced hex, hint "derived from your accent until you pick one"); LOGO: **Add logo…** (`design-logo`) / **Edit…** (`edit-logo`) open the **logo dialog** — circular crop stage with drag-to-position + zoom slider, FILE row with the unchanged upload gate (five types, 256 KB, 1024×1024, fail-loud), BACKGROUND swatches (secondary preselected, accent, white, transparent, custom + hex), preview at sign-in-mark and app-icon sizes, **Use this logo** / **Cancel**; the chosen state shows the circular mark (`logo-mark`); Edit… re-opens with the crop intact; Remove returns to the letter-mark frame. The cropped circle is rendered client-side (canvas) into the kit's `LogoCircle`; the original bytes still travel (DDR 0124). 3. **Dashboard DS2** (`dashboard/`): same SECONDARY row and the same logo dialog (shared component or same anatomy), Apply recompiles with the circle. 4. **Sign-in mini** on both screens wears the circular mark on its background colour. 5. Tests: seam (derivation, goldens, validate), app + dashboard component specs for the dialog's states (no-logo, chosen, edit-reopens-with-crop, cancel), e2e leg in the founding drive that adds a logo through the dialog and asserts the kit carries both assets. Two-way door (ADR 0174): purely additive; a kit without `Secondary` / `LogoCircle` compiles as today. Consumers of the circle (kanidm push, Coa hand-off) are their own tickets.

swarm-claim host=matou-dev-server-01 run=20168
(automated multi-host claim — lowest live claim id works this ticket)

swarm-claim host=matou-dev-server-01 run=20168 (automated multi-host claim — lowest live claim id works this ticket)

close-report for #1328 — status success

✅ close-report gates passed — every claim verified against main; issue closed.

envelope
{
  "issue": 1328,
  "status": "success",
  "commits": [
    "5fc2fee4"
  ],
  "changed_files": [
    "app/src/components/founding/FoundingBrandKit.vue",
    "app/src/lib/founding.ts",
    "app/tests/e2e/fixtures/wizard.ts",
    "app/tests/e2e/preview-harness/brand-kit-preview.spec.ts",
    "app/tests/unit/foundingBrandKit.test.ts",
    "app/tests/unit/foundingWizard.test.ts",
    "dashboard/src/components/shell/BrandKitScreen.vue",
    "dashboard/src/lib/api/generated.ts",
    "dashboard/src/lib/brandkit.ts",
    "dashboard/tests/unit/brandKitTheming.test.ts",
    "docs/adr/0227-design-brand-kit-secondary-colour-and-logo-dialog.md",
    "docs/ux/wireframes/p1-founding/p1-s3-brand-kit.html",
    "docs/ux/wireframes/shell/shell-ds2-settings-brand-kit.html",
    "internal/brandkit/boundary_test.go",
    "internal/brandkit/brand-kit.schema.json",
    "internal/brandkit/color.go",
    "internal/brandkit/compile.go",
    "internal/brandkit/compile_test.go",
    "internal/brandkit/golden_test.go",
    "internal/brandkit/kit.go",
    "internal/brandkit/surface.go",
    "internal/brandkit/testdata/golden/contrast-shortfall.snapshot",
    "internal/brandkit/testdata/golden/extras-nextcloud.snapshot",
    "internal/brandkit/testdata/golden/palette-full.snapshot",
    "internal/brandkit/testdata/golden/preset-forest-empty-greeting.snapshot",
    "internal/brandkit/testdata/golden/preset-matou-default.snapshot",
    "internal/brandkit/testdata/golden/preset-plum-derived-secondary.snapshot",
    "internal/brandkit/testdata/golden/preset-reef-service.snapshot",
    "internal/brandkit/testdata/golden/preset-tussock-status-override.snapshot",
    "internal/brandkit/testdata/golden/secondary-and-circle.snapshot",
    "internal/brandkit/token.go",
    "internal/brandkit/validate.go",
    "internal/brandkit/validate_test.go",
    "internal/controlapi/settings.go",
    "internal/founding/draft.go",
    "internal/founding/logo_test.go",
    "packages/openapi-spec/openapi.yaml",
    "packages/ui-kit/package.json",
    "packages/ui-kit/src/components/LogoDialog.vue",
    "packages/ui-kit/src/logoCircle.ts",
    "packages/ui-kit/tests/unit/logoDialog.test.ts"
  ],
  "tests": [
    {
      "command": "go test -count=1 ./internal/brandkit/ ./internal/founding/ ./internal/controlapi/",
      "exit_code": 0
    },
    {
      "command": "go test ./internal/idp/ ./internal/clan/ ./internal/catalogue/",
      "exit_code": 0
    },
    {
      "command": "node_modules/.bin/vitest run (app: 114 files, 1441 tests)",
      "exit_code": 0
    },
    {
      "command": "node_modules/.bin/vitest run (dashboard: 122 files, 1420 tests)",
      "exit_code": 0
    },
    {
      "command": "node_modules/.bin/vitest run (packages/ui-kit incl logoDialog.test.ts)",
      "exit_code": 0
    },
    {
      "command": "vue-tsc -p tsconfig.json (app, dashboard, ui-kit)",
      "exit_code": 0
    },
    {
      "command": "eslint (changed files) + prettier --check",
      "exit_code": 0
    },
    {
      "command": "node scripts/generate-client.mjs --check (openapi client in sync)",
      "exit_code": 0
    }
  ],
  "criteria": {
    "1. Seam: Palette.Secondary derived-when-empty; Kit.LogoCircle (bytes+background); goldens; Validate warns on secondary contrast": "internal/brandkit/{kit.go,color.go,compile.go,surface.go,token.go,validate.go,brand-kit.schema.json}; TestCompile_SecondaryDerivedFromAccent/SecondaryExplicitWins/LogoCircleIsAdditive (compile_test.go); TestValidate_SecondaryContrastWarnsNeverBlocks/BadSecondaryHexIsError (validate_test.go); regenerated testdata/golden/*.snapshot (+secondary-and-circle, +preset-plum-derived-secondary)",
    "2. App P1-S3: SECONDARY row (secondary-colour/secondary-hex); Add logo…(design-logo)/Edit…(edit-logo) open the logo dialog (crop+zoom, gate, bg swatches, dual preview, use/cancel); logo-mark chosen state; Edit re-opens crop; Remove→letter-mark; circle rendered client-side, source bytes still travel": "app/src/components/founding/FoundingBrandKit.vue + packages/ui-kit/src/components/LogoDialog.vue + logoCircle.ts; app/src/lib/founding.ts (BrandDraft secondary+circle); app/tests/unit/foundingBrandKit.test.ts + foundingWizard.test.ts (dialog states)",
    "3. Dashboard DS2: same SECONDARY row and shared logo dialog; Apply recompiles with the circle": "dashboard/src/components/shell/BrandKitScreen.vue (shared LogoDialog); dashboard/src/lib/brandkit.ts; internal/controlapi/settings.go (KitFromDraft threads secondary+circle) + openapi.yaml + regenerated generated.ts; dashboard/tests/unit/brandKitTheming.test.ts (both-assets + secondary applied)",
    "4. Sign-in mini on both screens wears the circular mark on its background": "FoundingBrandKit.vue + BrandKitScreen.vue signin-logo = logoCircleData on markStyle background; asserted in foundingBrandKit.test.ts (DDR 0227 circle-on-background) and brandKitTheming.test.ts",
    "5. Tests: seam + app/dashboard component specs (no-logo, chosen, edit-reopens-with-crop, cancel) + e2e founding-drive leg adds a logo through the dialog and asserts both assets": "internal/brandkit/*_test.go; app+dashboard+ui-kit vitest specs; app/tests/e2e/fixtures/wizard.ts s3BrandKit drives the dialog and asserts logo-mark+signin-logo+both assets; preview-harness spec updated to the circle"
  },
  "summary": "Brand kit gains a derived-when-empty secondary colour and a shared designed-circle logo dialog across the operator app P1-S3 and dashboard DS2, plus the seam, control-plane, DDR 0227 and amended wireframes — all purely additive.",
  "blockers": []
}
**close-report** for #1328 — status `success` :white_check_mark: **close-report gates passed** — every claim verified against main; issue closed. <details><summary>envelope</summary> ```json { "issue": 1328, "status": "success", "commits": [ "5fc2fee4" ], "changed_files": [ "app/src/components/founding/FoundingBrandKit.vue", "app/src/lib/founding.ts", "app/tests/e2e/fixtures/wizard.ts", "app/tests/e2e/preview-harness/brand-kit-preview.spec.ts", "app/tests/unit/foundingBrandKit.test.ts", "app/tests/unit/foundingWizard.test.ts", "dashboard/src/components/shell/BrandKitScreen.vue", "dashboard/src/lib/api/generated.ts", "dashboard/src/lib/brandkit.ts", "dashboard/tests/unit/brandKitTheming.test.ts", "docs/adr/0227-design-brand-kit-secondary-colour-and-logo-dialog.md", "docs/ux/wireframes/p1-founding/p1-s3-brand-kit.html", "docs/ux/wireframes/shell/shell-ds2-settings-brand-kit.html", "internal/brandkit/boundary_test.go", "internal/brandkit/brand-kit.schema.json", "internal/brandkit/color.go", "internal/brandkit/compile.go", "internal/brandkit/compile_test.go", "internal/brandkit/golden_test.go", "internal/brandkit/kit.go", "internal/brandkit/surface.go", "internal/brandkit/testdata/golden/contrast-shortfall.snapshot", "internal/brandkit/testdata/golden/extras-nextcloud.snapshot", "internal/brandkit/testdata/golden/palette-full.snapshot", "internal/brandkit/testdata/golden/preset-forest-empty-greeting.snapshot", "internal/brandkit/testdata/golden/preset-matou-default.snapshot", "internal/brandkit/testdata/golden/preset-plum-derived-secondary.snapshot", "internal/brandkit/testdata/golden/preset-reef-service.snapshot", "internal/brandkit/testdata/golden/preset-tussock-status-override.snapshot", "internal/brandkit/testdata/golden/secondary-and-circle.snapshot", "internal/brandkit/token.go", "internal/brandkit/validate.go", "internal/brandkit/validate_test.go", "internal/controlapi/settings.go", "internal/founding/draft.go", "internal/founding/logo_test.go", "packages/openapi-spec/openapi.yaml", "packages/ui-kit/package.json", "packages/ui-kit/src/components/LogoDialog.vue", "packages/ui-kit/src/logoCircle.ts", "packages/ui-kit/tests/unit/logoDialog.test.ts" ], "tests": [ { "command": "go test -count=1 ./internal/brandkit/ ./internal/founding/ ./internal/controlapi/", "exit_code": 0 }, { "command": "go test ./internal/idp/ ./internal/clan/ ./internal/catalogue/", "exit_code": 0 }, { "command": "node_modules/.bin/vitest run (app: 114 files, 1441 tests)", "exit_code": 0 }, { "command": "node_modules/.bin/vitest run (dashboard: 122 files, 1420 tests)", "exit_code": 0 }, { "command": "node_modules/.bin/vitest run (packages/ui-kit incl logoDialog.test.ts)", "exit_code": 0 }, { "command": "vue-tsc -p tsconfig.json (app, dashboard, ui-kit)", "exit_code": 0 }, { "command": "eslint (changed files) + prettier --check", "exit_code": 0 }, { "command": "node scripts/generate-client.mjs --check (openapi client in sync)", "exit_code": 0 } ], "criteria": { "1. Seam: Palette.Secondary derived-when-empty; Kit.LogoCircle (bytes+background); goldens; Validate warns on secondary contrast": "internal/brandkit/{kit.go,color.go,compile.go,surface.go,token.go,validate.go,brand-kit.schema.json}; TestCompile_SecondaryDerivedFromAccent/SecondaryExplicitWins/LogoCircleIsAdditive (compile_test.go); TestValidate_SecondaryContrastWarnsNeverBlocks/BadSecondaryHexIsError (validate_test.go); regenerated testdata/golden/*.snapshot (+secondary-and-circle, +preset-plum-derived-secondary)", "2. App P1-S3: SECONDARY row (secondary-colour/secondary-hex); Add logo…(design-logo)/Edit…(edit-logo) open the logo dialog (crop+zoom, gate, bg swatches, dual preview, use/cancel); logo-mark chosen state; Edit re-opens crop; Remove→letter-mark; circle rendered client-side, source bytes still travel": "app/src/components/founding/FoundingBrandKit.vue + packages/ui-kit/src/components/LogoDialog.vue + logoCircle.ts; app/src/lib/founding.ts (BrandDraft secondary+circle); app/tests/unit/foundingBrandKit.test.ts + foundingWizard.test.ts (dialog states)", "3. Dashboard DS2: same SECONDARY row and shared logo dialog; Apply recompiles with the circle": "dashboard/src/components/shell/BrandKitScreen.vue (shared LogoDialog); dashboard/src/lib/brandkit.ts; internal/controlapi/settings.go (KitFromDraft threads secondary+circle) + openapi.yaml + regenerated generated.ts; dashboard/tests/unit/brandKitTheming.test.ts (both-assets + secondary applied)", "4. Sign-in mini on both screens wears the circular mark on its background": "FoundingBrandKit.vue + BrandKitScreen.vue signin-logo = logoCircleData on markStyle background; asserted in foundingBrandKit.test.ts (DDR 0227 circle-on-background) and brandKitTheming.test.ts", "5. Tests: seam + app/dashboard component specs (no-logo, chosen, edit-reopens-with-crop, cancel) + e2e founding-drive leg adds a logo through the dialog and asserts both assets": "internal/brandkit/*_test.go; app+dashboard+ui-kit vitest specs; app/tests/e2e/fixtures/wizard.ts s3BrandKit drives the dialog and asserts logo-mark+signin-logo+both assets; preview-harness spec updated to the circle" }, "summary": "Brand kit gains a derived-when-empty secondary colour and a shared designed-circle logo dialog across the operator app P1-S3 and dashboard DS2, plus the seam, control-plane, DDR 0227 and amended wireframes — all purely additive.", "blockers": [] } ``` </details>
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#1328
No description provided.