From 0abbb839cbfe09790c632c722796800f4fff66b6 Mon Sep 17 00:00:00 2001 From: Danila Poyarkov Date: Sat, 18 Jul 2026 00:23:38 +0300 Subject: [PATCH] refactor(app): finish visual state theming - Theme Variables, collaboration, presence, and provider status states\n- Expose semantic default, resizing, following, connection, and tone attributes\n- Remove the final dynamic-state allowlist and document enforced Vue template rules --- AGENTS.md | 1 + src/app.css | 2 + .../CollabPanel/CollabAvatarStack.vue | 19 +++--- .../CollabPanel/CollabSharePopover.vue | 20 ++++--- .../MobileHud/MobilePresencePopover.vue | 31 +++++----- .../chat/ProviderConnectionTestButton.vue | 9 ++- .../binding/demo/BindingFieldDemoItem.vue | 3 +- src/components/variables/VariablesDialog.vue | 30 ++++++---- src/theme/collaboration.ts | 58 +++++++++++++++++++ src/theme/status.ts | 19 ++++++ src/theme/variable-table.ts | 24 ++++++++ tests/e2e/chat/panel.spec.ts | 2 +- tests/e2e/variables/dialog.spec.ts | 1 + .../steiger-rules/dynamic-tailwind-classes.ts | 11 ---- .../tests/dynamic-classes.test.ts | 4 +- 15 files changed, 175 insertions(+), 59 deletions(-) create mode 100644 src/theme/collaboration.ts create mode 100644 src/theme/status.ts create mode 100644 src/theme/variable-table.ts diff --git a/AGENTS.md b/AGENTS.md index c0ece2d1f..f1d6f32f6 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -273,6 +273,7 @@ Self-review checklist: - Use reka-ui for UI components (Splitter, ContextMenu, DropdownMenu, etc.) - Vue UI styling APIs follow the Nuxt UI architecture: static Tailwind Variants themes live under `src/theme/**` with `slots`, `variants`, `compoundVariants`, and `defaultVariants`; components resolve the theme with `tv()` and merge per-instance `ui` overrides at each rendered slot. Single-root components expose `class` rather than a one-slot `ui` object. Do not add one-off `fooClass`, `barClass`, `emptyActionClass`, etc. props. Use `UI` casing in type names (`SelectUI`, not `SelectUi`). +- Steiger parses Vue templates and rejects visual-state Tailwind utility branches, template-time `use*UI()` calls, and raw SVG app icons. Bind semantic state through `data-*` attributes and resolve typed theme variants in script instead of bypassing the rule. - Storybook is the internal component-state workshop (`bun run storybook`, `bun run build-storybook`), while VitePress is the canonical public SDK documentation. Colocate `*.stories.ts` with app UI components and use toolbar themes for light/dark states instead of adding test-only routes or showcase pages to the app. - Reuse colocated Vue demo components between Storybook and VitePress rather than maintaining separate examples. Style shared demos with Tailwind; the docs theme scans Vue SDK primitive demos through its dedicated Tailwind source. - Public component API tables are generated from Vue source and JSDoc with `vue-component-meta`; do not manually duplicate props, events, slots, or exposed APIs in Markdown. SDK examples are processed by VitePress Twoslash and must resolve against the public `@open-pencil/vue` API. diff --git a/src/app.css b/src/app.css index a24ecec14..da781610b 100644 --- a/src/app.css +++ b/src/app.css @@ -57,6 +57,7 @@ --color-warning-text: #fde68a; --color-warning-action: #fcd34d; --color-success: #4ade80; + --color-error: #f87171; --color-success-bg: #16a34a; --color-success-bg-hover: #15803d; --color-code-tag: #7dd3fc; @@ -93,6 +94,7 @@ html[data-theme='light'] { --color-warning-text: #92400e; --color-warning-action: #78350f; --color-success: #15803d; + --color-error: #b91c1c; --color-success-bg: #16a34a; --color-success-bg-hover: #15803d; --color-code-tag: #0369a1; diff --git a/src/components/CollabPanel/CollabAvatarStack.vue b/src/components/CollabPanel/CollabAvatarStack.vue index c5f3491d1..48847126a 100644 --- a/src/components/CollabPanel/CollabAvatarStack.vue +++ b/src/components/CollabPanel/CollabAvatarStack.vue @@ -1,13 +1,22 @@