Skip to content

Commit 1b8d3f0

Browse files
committed
chore: merge main:
2 parents b5ba2d3 + a374260 commit 1b8d3f0

File tree

35 files changed

+4142
-1276
lines changed

35 files changed

+4142
-1276
lines changed

.changeset/bold-ducks-end.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@spectrum-web-components/field-label': patch
3+
'@spectrum-web-components/help-text': patch
4+
---
5+
6+
Fix missing CSS custom property overrides for field-label and help-text components
7+
8+
Previously, these components had empty override files despite having corresponding `--system-*` tokens defined in the system theme bridge. This caused the components to not properly apply size-specific spacing tokens for top and bottom text positioning. The fix adds the missing CSS custom property mappings to ensure proper theming across all component sizes (s, m, l, xl).

.circleci/config.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ parameters:
2222
# 3. Commit this change to the PR branch where the changes exist.
2323
current_golden_images_hash:
2424
type: string
25-
default: 89cb380330cef18d34c0d4cf893790d9c7167b08
25+
default: b88c1b90e553e4f212ad60a5d96abc4dc9ed6be0
2626
wireit_cache_name:
2727
type: string
2828
default: wireit
@@ -297,7 +297,9 @@ jobs:
297297
command: cp 1st-gen/projects/documentation/custom-elements.json 1st-gen/storybook/
298298
- run:
299299
name: Build documentation with path prefix
300-
command: echo "SWC_DIR=beta/docs" >> $BASH_ENV
300+
command: |
301+
echo "export SWC_DIR=beta/docs" >> $BASH_ENV
302+
source $BASH_ENV
301303
- run:
302304
name: Build documentation
303305
command: yarn workspace @spectrum-web-components/1st-gen docs:build

.stylelintignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,4 @@ HEADER
88
!*.css
99
1st-gen/projects/example-project/dist
1010
1st-gen/tools/styles
11-
1st-gen/spectrum-*.css
12-
1st-gen/test/playwright-a11y/report/
13-
2nd-gen/test/playwright-a11y/report/
11+
1st-gen/spectrum-*.css

1st-gen/package.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,6 @@
6262
"storybook:quick": "run-p build:watch storybook:run",
6363
"storybook:run": "web-dev-server --config wds-storybook.config.js",
6464
"test": "yarn test:focus unit",
65-
"test:a11y": "playwright test --config=../2nd-gen/playwright.a11y.config.ts",
66-
"test:a11y:1st": "playwright test --config=../2nd-gen/playwright.a11y.config.ts --project=1st-gen",
67-
"test:a11y:2nd": "playwright test --config=../2nd-gen/playwright.a11y.config.ts --project=2nd-gen",
68-
"test:a11y:report": "playwright show-report ../2nd-gen/test/playwright-a11y/report",
69-
"test:a11y:ui": "playwright test --config=../2nd-gen/playwright.a11y.config.ts --ui",
7065
"test:bench": "yarn build:tests && node test/benchmark/cli.js",
7166
"test:changed": "node ./scripts/test-changes.js",
7267
"test:ci": "yarn test:start",
@@ -92,11 +87,10 @@
9287
"react/*"
9388
],
9489
"devDependencies": {
95-
"@axe-core/playwright": "^4.11.0",
9690
"@changesets/changelog-github": "0.5.1",
9791
"@changesets/cli": "2.29.7",
9892
"@commitlint/cli": "19.8.1",
99-
"@commitlint/config-conventional": "^19.8.1",
93+
"@commitlint/config-conventional": "19.8.1",
10094
"@custom-elements-manifest/analyzer": "0.10.6",
10195
"@geometricpanda/storybook-addon-badges": "2.0.5",
10296
"@lit/react": "1.0.8",
@@ -173,7 +167,7 @@
173167
"jsonc-eslint-parser": "2.4.1",
174168
"latest-version": "9.0.0",
175169
"lightningcss": "1.30.1",
176-
"lint-staged": "^16.1.2",
170+
"lint-staged": "16.2.6",
177171
"lit": "^2.5.0 || ^3.1.3",
178172
"lit-analyzer": "2.0.3",
179173
"lit-html": "^2.4.0 || ^3.1.3",
@@ -187,7 +181,7 @@
187181
"prettier-plugin-package": "1.4.0",
188182
"pretty-bytes": "7.1.0",
189183
"re-template-tag": "2.0.1",
190-
"replace-in-file": "^8.3.0",
184+
"replace-in-file": "8.3.0",
191185
"rimraf": "6.0.1",
192186
"rollup": "4.52.2",
193187
"sinon": "17.0.2",

1st-gen/packages/badge/test/badge.a11y.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import { expect, test } from '@playwright/test';
1414
import AxeBuilder from '@axe-core/playwright';
15-
import { gotoStory } from '../../../../2nd-gen/test/a11y-helpers.js';
15+
import { gotoStory } from '../../../test/a11y-helpers.js';
1616

1717
/**
1818
* Accessibility tests for Badge component

1st-gen/packages/field-label/src/field-label-overrides.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,23 @@
99
* OF ANY KIND, either express or implied. See the License for the specific language
1010
* governing permissions and limitations under the License.
1111
*/
12+
13+
:host {
14+
--spectrum-field-label-top-to-text: var(--system-field-label-top-to-text);
15+
--spectrum-field-label-bottom-to-text: var(--system-field-label-bottom-to-text);
16+
}
17+
18+
:host([size="s"]) {
19+
--spectrum-field-label-top-to-text: var(--system-field-label-top-to-text-small);
20+
--spectrum-field-label-bottom-to-text: var(--system-field-label-bottom-to-text-small);
21+
}
22+
23+
:host([size="l"]) {
24+
--spectrum-field-label-top-to-text: var(--system-field-label-top-to-text-large);
25+
--spectrum-field-label-bottom-to-text: var(--system-field-label-bottom-to-text-large);
26+
}
27+
28+
:host([size="xl"]) {
29+
--spectrum-field-label-top-to-text: var(--system-field-label-top-to-text-extra-large);
30+
--spectrum-field-label-bottom-to-text: var(--system-field-label-bottom-to-text-extra-large);
31+
}

1st-gen/packages/help-text/src/help-text-overrides.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,23 @@
99
* OF ANY KIND, either express or implied. See the License for the specific language
1010
* governing permissions and limitations under the License.
1111
*/
12+
13+
:host {
14+
--spectrum-helptext-top-to-text: var(--system-helptext-top-to-text);
15+
--spectrum-helptext-bottom-to-text: var(--system-helptext-bottom-to-text);
16+
}
17+
18+
:host([size="s"]) {
19+
--spectrum-helptext-top-to-text: var(--system-helptext-top-to-text-small);
20+
--spectrum-helptext-bottom-to-text: var(--system-helptext-bottom-to-text-small);
21+
}
22+
23+
:host([size="l"]) {
24+
--spectrum-helptext-top-to-text: var(--system-helptext-top-to-text-large);
25+
--spectrum-helptext-bottom-to-text: var(--system-helptext-bottom-to-text-large);
26+
}
27+
28+
:host([size="xl"]) {
29+
--spectrum-helptext-top-to-text: var(--system-helptext-top-to-text-extra-large);
30+
--spectrum-helptext-bottom-to-text: var(--system-helptext-bottom-to-text-extra-large);
31+
}

1st-gen/packages/status-light/test/status-light.a11y.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
import { expect, test } from '@playwright/test';
1414
import AxeBuilder from '@axe-core/playwright';
15-
import { gotoStory } from '../../../../2nd-gen/test/a11y-helpers.js';
15+
import { gotoStory } from '../../../test/a11y-helpers.js';
1616

1717
/**
1818
* Accessibility tests for Status Light component

1st-gen/projects/documentation/scripts/component-template-parts.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,17 +157,21 @@ ${
157157
tag.members.length &&
158158
tag.attributes.filter((attribute) => {
159159
const member = tag.members.find((member) => {
160-
return member.name === attribute.name;
160+
const attrName = attribute.fieldName || attribute.name;
161+
return member.name === attrName;
161162
});
162-
return member?.privacy === 'public';
163+
// Treat missing privacy as public; skip only explicit private
164+
return member && member.privacy !== 'private';
163165
}).length
164166
? buildTable(
165167
'Attributes and Properties',
166168
tag.attributes.filter((attribute) => {
167169
const member = tag.members.find((member) => {
168-
return member.name === attribute.fieldName;
170+
const attrName = attribute.fieldName || attribute.name;
171+
return member.name === attrName;
169172
});
170-
return member?.privacy === 'public';
173+
// Treat missing privacy as public; skip only explicit private
174+
return !!member && member.privacy !== 'private';
171175
}),
172176
['Property', 'Attribute', 'Type', 'Default', 'Description'],
173177
[
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ export async function waitForStoryReady(
5959
await element.waitFor({ state: 'visible' });
6060

6161
// Step 4: Wait for Web Component to be fully upgraded (has shadow root if applicable)
62-
await element.evaluate((el) => {
62+
await element.evaluate(async (el) => {
6363
// If it's a custom element, wait for it to be fully upgraded
6464
if (el.tagName.includes('-')) {
65-
return customElements.whenDefined(el.tagName.toLowerCase());
65+
await customElements.whenDefined(el.tagName.toLowerCase());
6666
}
6767
});
6868

@@ -84,7 +84,9 @@ export async function gotoStory(
8484
elementSelector: string
8585
): Promise<Locator> {
8686
// Navigate to story (baseURL is set by Playwright project config)
87-
await page.goto(`/iframe.html?id=${storyId}&viewMode=story`);
87+
await page.goto(`/iframe.html?id=${storyId}&viewMode=story`, {
88+
waitUntil: 'domcontentloaded',
89+
});
8890

8991
// Wait for story to be ready
9092
return waitForStoryReady(page, elementSelector);

0 commit comments

Comments
 (0)