From 8f1f0e8803cf55bfc4305d2077c0a3668953dcaf Mon Sep 17 00:00:00 2001 From: LHaghfoss Date: Tue, 24 Nov 2026 11:00:08 +0100 Subject: [PATCH 1/2] fix(desktop): use theme shadows on the table toolbar and drag ghost index.css resets --shadow-*, so shadow-sm and shadow-lg generated no CSS. design.test.ts now rejects any shadow class the theme does not declare. --- apps/desktop/src/design.test.ts | 11 ++++++++++- apps/desktop/src/ui/HeaderButtonsSetting.tsx | 2 +- apps/desktop/src/ui/Markdown.tsx | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/apps/desktop/src/design.test.ts b/apps/desktop/src/design.test.ts index 70d4f1491..631ac74e4 100644 --- a/apps/desktop/src/design.test.ts +++ b/apps/desktop/src/design.test.ts @@ -2,7 +2,7 @@ // palette classes outside the tokens, no retired class names, no arbitrary // radii, no native selects, hand-timed hover, hand-made blur or menu items, // no hand-styled labelled buttons, no spacing off the scale, no native `title` -// tips on controls, and index.css's built-in themes equal to BUILTIN_THEMES. +// tips on controls, no shadow outside the theme, and index.css's built-in themes equal to BUILTIN_THEMES. import { describe, expect, test } from "bun:test"; import { readdirSync, readFileSync, statSync } from "node:fs"; @@ -26,6 +26,12 @@ const RETIRED = /(? m[1]), +); +const SHADOW_CLASS = /(? { if (PALETTE.test(line)) violations.push(`${where} palette class: ${line.trim()}`); if (RETIRED.test(line)) violations.push(`${where} retired token: ${line.trim()}`); if (ARBITRARY_RADIUS.test(line)) violations.push(`${where} arbitrary radius: ${line.trim()}`); + for (const [, name] of line.matchAll(SHADOW_CLASS)) + if (name !== "none" && !THEME_SHADOWS.has(name)) + violations.push(`${where} shadow-${name} is not a theme shadow: ${line.trim()}`); if (NATIVE_SELECT.test(line)) violations.push(`${where} native select, use Select: ${line.trim()}`); if (HAND_TIMED_HOVER.test(line)) violations.push(`${where} hover is timed in index.css: ${line.trim()}`); diff --git a/apps/desktop/src/ui/HeaderButtonsSetting.tsx b/apps/desktop/src/ui/HeaderButtonsSetting.tsx index b346e9223..db5b47ec3 100644 --- a/apps/desktop/src/ui/HeaderButtonsSetting.tsx +++ b/apps/desktop/src/ui/HeaderButtonsSetting.tsx @@ -298,7 +298,7 @@ export function HeaderButtonsSetting() {
diff --git a/apps/desktop/src/ui/Markdown.tsx b/apps/desktop/src/ui/Markdown.tsx index 11d6c11cc..cad3f3d05 100644 --- a/apps/desktop/src/ui/Markdown.tsx +++ b/apps/desktop/src/ui/Markdown.tsx @@ -180,7 +180,7 @@ function MarkdownTable({ children }: { children: ReactNode }) { {children}
-
+
{button("md", "Markdown")} {button("csv", "CSV")}
From 660972f68e0a603a397a14768088abc675f99282 Mon Sep 17 00:00:00 2001 From: LHaghfoss Date: Tue, 24 Nov 2026 11:01:53 +0100 Subject: [PATCH 2/2] fix(desktop): drop the new comment lines from the shadow guard --- apps/desktop/src/design.test.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/apps/desktop/src/design.test.ts b/apps/desktop/src/design.test.ts index 631ac74e4..959a89cb5 100644 --- a/apps/desktop/src/design.test.ts +++ b/apps/desktop/src/design.test.ts @@ -26,8 +26,6 @@ const RETIRED = /(? m[1]), );