Extend NDS patterns and migrate shared UI surfaces
All checks were successful
Deploy Sokko G / deploy (push) Successful in 17s

This commit is contained in:
Shinuwa 2026-09-02 15:50:04 +02:00
parent fef7735a1d
commit 9aa98c892d
41 changed files with 1035 additions and 405 deletions

View file

@ -20,9 +20,28 @@ test("style entrypoint and theme layers are wired", async () => {
const styleShell = await readFile("website/src/styles/_shell.scss", "utf8");
const styleCards = await readFile("website/src/styles/_cards.scss", "utf8");
const styleSurfaces = await readFile("website/src/styles/design-system/_surfaces.scss", "utf8");
const styleControls = await readFile("website/src/styles/design-system/_controls.scss", "utf8");
const styleAttributes = await readFile("website/src/styles/design-system/_attributes.scss", "utf8");
const styleControlsPatterns = await readFile("website/src/styles/design-system/controls/_patterns.scss", "utf8");
const styleAttributesPatterns = await readFile("website/src/styles/design-system/attributes/_patterns.scss", "utf8");
const styleControlsButtons = await readFile("website/src/styles/design-system/controls/_buttons.scss", "utf8");
const styleAttributesButtons = await readFile("website/src/styles/design-system/attributes/_buttons.scss", "utf8");
const goalTreeBranch = await readFile("website/src/features/toolboxes/modules/GoalTreeBranch.jsx", "utf8");
const ndsPatternConsumers = await readJoinedStyles([
"website/src/pages/HomePage.jsx",
"website/src/pages/LibraryPage.jsx",
"website/src/pages/AboutPage.jsx",
"website/src/features/games/GamesPage.jsx",
"website/src/features/games/GameFiltersPanel.jsx",
"website/src/features/games/diablo4/Diablo4AffixCard.jsx",
"website/src/features/toolboxes/ToolboxCard.jsx",
"website/src/features/toolboxes/ToolboxPages.jsx",
"website/src/components/AppOverlays.jsx",
"website/src/components/StorageQuota.jsx",
"website/src/components/ToolboxModals.jsx",
"website/src/features/toolboxes/modules/AddToolControls.jsx",
"website/src/features/toolboxes/modules/TextImportModal.jsx"
]);
const styleHome = await readJoinedStyles([
"website/src/styles/_home.scss",
"website/src/styles/home/_shared.scss",
@ -152,7 +171,7 @@ test("style entrypoint and theme layers are wired", async () => {
assert.match(styleHome, /\.dialogue-line i/);
assert.match(styleHome, /font-style: italic/);
assert.match(styleHome, /\.about-page/);
assert.match(styleHome, /\.nebula-panel/);
assert.doesNotMatch(styleHome, /\.nebula-panel\s*\{/);
assert.match(styleHome, /\.home-onboarding-layout/);
assert.match(styleHome, /\.home-onboarding-slider figcaption/);
assert.match(styleHome, /\.home-onboarding-dots/);
@ -223,8 +242,38 @@ test("style entrypoint and theme layers are wired", async () => {
assert.match(styleSurfaces, /@mixin card-surface/);
assert.match(styleSurfaces, /@mixin card-surface-hover/);
assert.match(styleSurfaces, /@mixin card-cover-divider/);
assert.match(styleCards, /@use "design-system\/surfaces"/);
assert.match(styleCards, /surfaces\.card-surface/);
assert.match(styleControls, /@forward "controls\/patterns"/);
assert.match(styleAttributes, /@use "attributes\/patterns"/);
assert.match(styleControlsPatterns, /@mixin panel-surface/);
assert.match(styleControlsPatterns, /@mixin toast-pattern/);
assert.match(styleAttributesPatterns, /\.nds-panel/);
assert.match(styleAttributesPatterns, /\.nds-card/);
assert.match(styleAttributesPatterns, /\.nds-tool-panel/);
assert.match(styleAttributesPatterns, /\.nds-badge/);
assert.match(styleAttributesPatterns, /\.nds-chip/);
assert.match(styleAttributesPatterns, /\.nds-empty-state/);
assert.match(styleAttributesPatterns, /\.nds-inline-notice/);
assert.match(styleAttributesPatterns, /\.nds-progress/);
assert.match(styleAttributesPatterns, /\.nds-filter-panel/);
assert.match(styleAttributesPatterns, /\.nds-modal/);
assert.match(styleAttributesPatterns, /\.nds-drawer-panel/);
assert.match(styleAttributesPatterns, /\.nds-toast/);
assert.match(ndsPatternConsumers, /nds-page-hero/);
assert.match(ndsPatternConsumers, /nds-panel/);
assert.match(ndsPatternConsumers, /nds-card/);
assert.match(ndsPatternConsumers, /nds-card-cover/);
assert.match(ndsPatternConsumers, /nds-tool-panel/);
assert.match(ndsPatternConsumers, /nds-filter-panel/);
assert.match(ndsPatternConsumers, /nds-chip/);
assert.match(ndsPatternConsumers, /nds-badge/);
assert.match(ndsPatternConsumers, /nds-empty-state/);
assert.match(ndsPatternConsumers, /nds-inline-notice/);
assert.match(ndsPatternConsumers, /nds-progress/);
assert.match(ndsPatternConsumers, /nds-modal/);
assert.match(ndsPatternConsumers, /nds-drawer-panel/);
assert.match(ndsPatternConsumers, /nds-toast/);
assert.doesNotMatch(styleCards, /@use "design-system\/surfaces"/);
assert.doesNotMatch(styleCards, /controls\.card-pattern/);
assert.match(styleGames, /@use "\.\.\/design-system\/surfaces"/);
assert.match(styleGames, /surfaces\.card-surface/);
assert.match(styleGames, /surfaces\.card-cover-divider/);
@ -234,7 +283,7 @@ test("style entrypoint and theme layers are wired", async () => {
assert.match(styleMhwilds, /surfaces\.card-surface/);
assert.match(styleMhwilds, /surfaces\.card-cover-divider/);
assert.doesNotMatch(styleMhwilds, /\.game-(home-card|layout|grid)/);
assert.match(styleCards, /compact-data-card/);
assert.doesNotMatch(styleCards, /\.compact-data-card\s*\{/);
assert.doesNotMatch(
[
goalTreeBranch,