refactor(ui): switch surfaces to shared shadow tokens

This commit is contained in:
2026-04-21 21:43:17 -04:00
parent e0b6120cd3
commit a2d9782d8f
20 changed files with 63 additions and 52 deletions

View File

@@ -168,7 +168,7 @@ describe("AI capture redesign", () => {
test("attachments panel is a first-class surfaced region, not an inline footer affordance", () => {
const source = readToolbarSource();
expect(source).toContain("rounded-[10px] bg-card p-3 shadow-[0_0_0_1px_rgba(0,0,0,0.08)]");
expect(source).toContain("rounded-[10px] bg-card p-3 shadow-sm");
});
});

View File

@@ -19,7 +19,7 @@ describe("EventDialog public modes", () => {
const source = readFileSync("src/components/ui/dialog.tsx", "utf8");
expect(source).toContain("rounded-[10px]");
expect(source).toContain("shadow-[0_0_0_1px_rgba(0,0,0,0.08)");
expect(source).toContain("shadow-xl");
expect(source).not.toContain("rounded-lg border p-6 shadow-lg");
});

View File

@@ -11,23 +11,28 @@ import { EVENT_CARD_SURFACE_CLASSES } from "@/components/event-card";
describe("app shell surfaces", () => {
test("header surface is a thin structural bar instead of a glass panel", () => {
expect(APP_HEADER_SURFACE_CLASSES).toContain("min-h-14");
expect(APP_HEADER_SURFACE_CLASSES).toContain("border-b");
expect(APP_HEADER_SURFACE_CLASSES).toContain("shadow-[inset_0_-1px_0_0_var(--color-border)]");
expect(APP_HEADER_SURFACE_CLASSES).not.toContain("glass-surface");
});
test("section and action surfaces use tokenized shell classes instead of glass helpers", () => {
test("section and action surfaces use tokenized shell classes instead of frozen light-mode shadows", () => {
expect(APP_SECTION_SURFACE_CLASSES).not.toContain("glass-panel");
expect(APP_ACTION_BAR_CLASSES).not.toContain("glass-subtle");
expect(APP_NAV_SURFACE_CLASSES).not.toContain("glass-surface");
expect(APP_SECTION_SURFACE_CLASSES).toContain("shadow");
expect(APP_SECTION_SURFACE_CLASSES).not.toContain("rgba(0,0,0,0.08)");
expect(APP_ACTION_BAR_CLASSES).toContain("shadow-sm");
expect(APP_ACTION_BAR_CLASSES).not.toContain("rgba(0,0,0,0.08)");
expect(APP_NAV_SURFACE_CLASSES).toContain("shadow-lg");
expect(APP_NAV_SURFACE_CLASSES).not.toContain("rgba(0,0,0,0.08)");
});
});
describe("event cards", () => {
test("event cards use the redesigned console card treatment", () => {
expect(EVENT_CARD_SURFACE_CLASSES).toContain("rounded-[10px]");
expect(EVENT_CARD_SURFACE_CLASSES).toContain(
"shadow-[0_0_0_1px_rgba(0,0,0,0.08)",
);
expect(EVENT_CARD_SURFACE_CLASSES).toContain("shadow");
expect(EVENT_CARD_SURFACE_CLASSES).not.toContain("rgba(0,0,0,0.08)");
});
});