Skip to content

Commit f25e2bb

Browse files
ampledatagbaclaude
authored
Use the AryaOS design kit instead of a local copy of the old palette (#5)
app.scss defined its own :root palette -- teal #35a58f accent, #74d8a4 ok, #ff8a7a danger -- which is the pre-kit console theme. cockpit-shared was already a dependency, but pinned at v1.0.0 and used only for its TypeScript modules, so the design system in theme.scss was never reaching this plugin at all. The local block was not merely redundant, it was the only palette. Bumps the dependency to v1.3.0 (the first tag containing theme.scss; 1.2.0 added it but was never tagged), imports the kit, and deletes the local override so the plugin inherits it. Verified in the built CSS rather than assumed: --sns-accent, --sns-brand, #56b4e9 and #e4610f are present, #35a58f appears zero times, and every relative url() in the bundle resolves on disk. build.js also now copies the kit's webfonts into dist/fonts. theme.scss references them as url(./fonts/*.woff2) relative to the stylesheet, and *.woff2 is listed in esbuild's `external`, so those URLs are emitted untouched. Without the copy the CSS still loads and the palette still applies -- only the typography silently falls back to system fonts. Claude-Session: https://claude.ai/code/session_0197da7dhvcPoHxYKamrYqyM Co-authored-by: gba <gba@brute.undef.net> Co-authored-by: Claude <noreply@anthropic.com>
1 parent 4736f24 commit f25e2bb

4 files changed

Lines changed: 23 additions & 20 deletions

File tree

build.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,21 @@ const context = await esbuild.context({
108108
const destAssets = path.join('dist', 'assets');
109109
fs.mkdirSync(destAssets, { recursive: true });
110110
fs.cpSync(srcAssets, destAssets, { recursive: true });
111+
112+
// AryaOS design-kit webfonts. theme.scss references these
113+
// as url(./fonts/*.woff2) relative to the stylesheet, and
114+
// *.woff2 is in `external` above, so esbuild leaves those
115+
// URLs untouched. Without these files the palette still
116+
// applies and only the typography silently falls back to
117+
// system fonts -- easy to miss, and missed on first pass.
118+
const srcFonts = path.join(
119+
'node_modules', '@snstac', 'cockpit-shared', 'src', 'fonts'
120+
);
121+
if (fs.existsSync(srcFonts)) {
122+
const destFonts = path.join('dist', 'fonts');
123+
fs.mkdirSync(destFonts, { recursive: true });
124+
fs.cpSync(srcFonts, destFonts, { recursive: true });
125+
}
111126
});
112127
}
113128
},

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"@patternfly/react-core": "6.1.0",
5454
"@patternfly/react-icons": "6.1.0",
5555
"@patternfly/react-styles": "6.3.1",
56-
"@snstac/cockpit-shared": "github:snstac/cockpit-shared#v1.1.0",
56+
"@snstac/cockpit-shared": "github:snstac/cockpit-shared#v1.3.0",
5757
"qrcode-generator": "1.4.4",
5858
"react": "18.3.1",
5959
"react-dom": "18.3.1"

src/app.scss

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,14 @@
11
@use "page.scss";
22

3+
// The AryaOS design kit: palette, type and spacing for every cockpit-*
4+
// plugin. Everything below inherits from it rather than redefining it.
5+
@use "@snstac/cockpit-shared/src/theme.scss";
6+
37
/* Spacing between stacked expandable cards only — do not set overflow on the Card (breaks PF / scrolling). */
48
.charontak-expandable-card {
59
margin-top: 1rem;
610
}
711

8-
/* AryaOS operations console dark theme (fleet standard). */
9-
:root {
10-
color-scheme: dark;
11-
--aos-bg: #071211;
12-
--aos-panel: #122322;
13-
--aos-panel-2: #172c2a;
14-
--aos-ink: #edf7f4;
15-
--aos-muted: #9bb2ad;
16-
--aos-border: rgb(124 170 160 / 28%);
17-
--aos-border-strong: rgb(124 170 160 / 40%);
18-
--aos-accent: #35a58f;
19-
--aos-accent-dark: #6ed4be;
20-
--aos-accent-ink: #071211;
21-
--aos-danger: #ff8a7a;
22-
--aos-ok: #74d8a4;
23-
}
2412

2513
* {
2614
box-sizing: border-box;

0 commit comments

Comments
 (0)