Skip to content

Commit 16d14dd

Browse files
authored
chore: harden recently updated scripts (#3680)
1 parent f817f73 commit 16d14dd

File tree

4 files changed

+22
-10
lines changed

4 files changed

+22
-10
lines changed

.github/workflows/development.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ jobs:
137137
styles_modified_files: ${{ needs.changed_files.outputs.styles_modified_files }}
138138
eslint_added_files: ${{ needs.changed_files.outputs.eslint_added_files }}
139139
eslint_modified_files: ${{ needs.changed_files.outputs.eslint_modified_files }}
140+
mdlint_added_files: ${{ needs.changed_files.outputs.mdlint_added_files }}
141+
mdlint_modified_files: ${{ needs.changed_files.outputs.mdlint_modified_files }}
140142
secrets: inherit
141143

142144
# -------------------------------------------------------------

.storybook/assets/base.css

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,31 @@ body {
2929
}
3030

3131
.spectrum {
32+
/* Gradient that changes with the color theme. */
33+
--spectrum-examples-gradient: linear-gradient(45deg, var(--spectrum-magenta-1500), var(--spectrum-blue-1500));
34+
35+
/* Gradients that do not change with the color theme, for use in static color backgrounds. */
36+
--spectrum-examples-gradient-static-black: linear-gradient(45deg, rgb(255 241 246), rgb(238 245 255));
37+
--spectrum-examples-gradient-static-white: linear-gradient(45deg, rgb(64 0 22), rgb(14 24 67));
38+
3239
color: var(--spectrum-neutral-content-color-default);
3340
background-color: var(--spectrum-background-base-color);
34-
-webkit-tap-highlight-color: rgba(0, 0, 0, 0%);
41+
-webkit-tap-highlight-color: rgb(0, 0, 0, 0%);
3542
}
3643

3744
.spectrum.spectrum--legacy {
3845
color: var(--spectrum-neutral-content-color-default);
3946
background-color: var(--spectrum-background-layer-1-color);
4047
}
4148

49+
.spectrum .spectrum-examples-static-black {
50+
background: var(--spectrum-examples-gradient-static-black);
51+
}
52+
53+
.spectrum .spectrum-examples-static-white {
54+
background: var(--spectrum-examples-gradient-static-white);
55+
}
56+
4257
/* Hide the SVG elements that only include references */
4358
svg:has(symbol):not(:has(use)) {
4459
display: none;
@@ -58,7 +73,7 @@ svg:has(symbol):not(:has(use)) {
5873
line-height: normal;
5974
letter-spacing: normal;
6075
text-transform: none;
61-
border-block-end: 1px solid hsla(203deg, 50%, 30%, 15%);
76+
border-block-end: 1px solid hsl(203deg, 50%, 30%, 15%);
6277
}
6378

6479
/* Force the modal wrapper to be contained by the frame not the viewport */

tasks/clean-up-after-migration.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@
1313
# After migrating from our old build system, there are a lot of empty folders hanging out still
1414
# This script aims to clean up those folders
1515

16-
# Legacy tools folder (included storybook & generator)
17-
# test -d "tools" && rm -rf tools
18-
19-
test -d "tools" && rm -rf tools
20-
2116
# Remove deprecated files
2217
for folder in components/*; do
2318
# Only processing nested folders, not top-level files

tokens/utilities/data-json-formatter.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const format = ({ dictionary, platform, file, options }) => {
99
);
1010

1111
const convertRef = (ref) => {
12-
return ref.replace(/\{(.*?)\}/g, `var(--${prefix}-$1)`);
12+
return ref?.toString()?.replace(/\{(.*?)\}/g, `var(--${prefix}-$1)`);
1313
};
1414

1515
const deconstructSets = (obj, scope = undefined) => {
@@ -23,11 +23,11 @@ export const format = ({ dictionary, platform, file, options }) => {
2323
if (data.ref) {
2424
data.ref = convertRef(data.ref);
2525

26-
if (data.ref === data.value) {
26+
if (data.ref?.toString() === data.value?.toString()) {
2727
delete data.ref;
2828
}
2929
}
30-
30+
3131
if (data.sets) {
3232
data = deconstructSets(data, context);
3333

0 commit comments

Comments
 (0)