@abgov/nx-adsp 13.15.0 → 13.15.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/nx-adsp",
3
- "version": "13.15.0",
3
+ "version": "13.15.2",
4
4
  "license": "Apache-2.0",
5
5
  "main": "src/index.js",
6
6
  "description": "Government of Alberta - Nx plugin for ADSP apps.",
@@ -1,3 +1,8 @@
1
+ // Design tokens must load before web-components' own CSS — every goa-*
2
+ // element styles itself through --goa-* custom properties (spacing,
3
+ // color, type) defined here; without them, headers/banners/buttons render
4
+ // with no spacing at all rather than looking unbranded but boxy.
5
+ import '@abgov/design-tokens/dist/tokens.css';
1
6
  import '@abgov/web-components';
2
7
  import '@abgov/web-components/index.css';
3
8
  import { StrictMode } from 'react';
@@ -36,6 +36,19 @@ describe('React App Generator', () => {
36
36
  expect(host.exists('apps/test/nginx.conf')).toBeTruthy();
37
37
  }, 30000);
38
38
 
39
+ it('loads design tokens before web-components CSS, so goa-* elements are actually styled', async () => {
40
+ // @abgov/web-components' own CSS only defines rules in terms of --goa-*
41
+ // custom properties — without the tokens stylesheet also loaded, every
42
+ // goa-* element (header, banner, buttons) renders with no spacing at
43
+ // all, not just unbranded. Regression guard for exactly that gap.
44
+ const host = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
45
+ await generator(host, options);
46
+
47
+ const mainTsx = host.read('apps/test/src/main.tsx').toString();
48
+ expect(mainTsx).toContain("import '@abgov/design-tokens/dist/tokens.css';");
49
+ expect(mainTsx).toContain("import '@abgov/web-components/index.css';");
50
+ }, 30000);
51
+
39
52
  it("runs nx-adsp's own workspace-root setup (ADSP SDK MCP server + VS Code settings)", async () => {
40
53
  const host = createTreeWithEmptyWorkspace({ layout: 'apps-libs' });
41
54
  await generator(host, options);
@@ -1,3 +1,8 @@
1
+ // Design tokens must load before web-components' own CSS — every goa-*
2
+ // element styles itself through --goa-* custom properties (spacing,
3
+ // color, type) defined here; without them, headers/banners/buttons render
4
+ // with no spacing at all rather than looking unbranded but boxy.
5
+ import '@abgov/design-tokens/dist/tokens.css';
1
6
  import '@abgov/web-components';
2
7
  import '@abgov/web-components/index.css';
3
8
  import { createApp } from 'vue';
@@ -63,6 +63,18 @@ describe('Vue App Generator', () => {
63
63
  expect(host.exists('.vscode/settings.json')).toBeTruthy();
64
64
  }, 30000);
65
65
 
66
+ it('loads design tokens before web-components CSS, so goa-* elements are actually styled', async () => {
67
+ // @abgov/web-components' own CSS only defines rules in terms of --goa-*
68
+ // custom properties — without the tokens stylesheet also loaded, every
69
+ // goa-* element (header, banner, buttons) renders with no spacing at
70
+ // all, not just unbranded. Regression guard for exactly that gap.
71
+ await generator(host, options);
72
+
73
+ const mainTs = host.read('apps/test/src/main.ts').toString();
74
+ expect(mainTs).toContain("import '@abgov/design-tokens/dist/tokens.css';");
75
+ expect(mainTs).toContain("import '@abgov/web-components/index.css';");
76
+ }, 30000);
77
+
66
78
  it('records the resolved env/tenant as project tags for the sandbox generator', async () => {
67
79
  await generator(host, options);
68
80
  const config = readProjectConfiguration(host, 'test');