feat(FN-3011): merge fusion/fn-3011
Commits merged: - test(FN-3011): complete Step 2 — harden light-theme source assertions - feat(FN-3011): complete Step 1 — restore global token scope - fix(FN-3011): complete Step 3 — satisfy lint/test/typecheck/build gates - test(FN-3011): complete Step 2 — harden light-theme source assertions - feat(FN-3011): complete Step 1 — restore default light token ownership Files changed: .../app/__tests__/status-colors-theme.test.ts | 100 +++++-- .../app/components/CustomModelDropdown.css | 6 - .../__tests__/ModelOnboardingModal.test.tsx | 4 +- packages/dashboard/app/styles.css | 299 +++++++++++---------- packages/dashboard/app/test/cssFixture.ts | 11 +- 5 files changed, 242 insertions(+), 178 deletions(-) Fusion-Task-Id: FN-3011
This commit is contained in:
@@ -5,6 +5,13 @@ const APP_DIR = resolve(__dirname, "..");
|
||||
const COMPONENTS_DIR = join(APP_DIR, "components");
|
||||
|
||||
let cached: string | null = null;
|
||||
let stylesCached: string | null = null;
|
||||
|
||||
export function loadStylesCss(): string {
|
||||
if (stylesCached !== null) return stylesCached;
|
||||
stylesCached = readFileSync(join(APP_DIR, "styles.css"), "utf-8");
|
||||
return stylesCached;
|
||||
}
|
||||
|
||||
export function loadAllAppCss(): string {
|
||||
if (cached !== null) return cached;
|
||||
@@ -12,7 +19,9 @@ export function loadAllAppCss(): string {
|
||||
// tests), then component CSS files in alphabetical order. This keeps both
|
||||
// styles.css's intra-file order intact AND lets co-located component base
|
||||
// rules be matched before any cross-file @media override referencing them.
|
||||
const parts: string[] = [readFileSync(join(APP_DIR, "styles.css"), "utf-8")];
|
||||
// NOTE: public/theme-data.css is intentionally excluded here; tests that
|
||||
// validate per-color-theme contracts should load it explicitly.
|
||||
const parts: string[] = [loadStylesCss()];
|
||||
const entries = readdirSync(COMPONENTS_DIR, { withFileTypes: true })
|
||||
.filter((e) => e.isFile() && e.name.endsWith(".css"))
|
||||
.map((e) => e.name)
|
||||
|
||||
Reference in New Issue
Block a user