Skip to content

Commit 643dbe1

Browse files
Merge branch 'main' into primitives.css-import
2 parents d7e9700 + 4e63592 commit 643dbe1

28 files changed

+3398
-2611
lines changed

.github/workflows/a11y-contrast.yml

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

1313
build:
1414
needs: changes
15-
if: needs.changes.outputs.tokens == 'true' || github.event_name == 'workflow_dispatch'
15+
if: needs.changes.outputs.tokens == 'true' || needs.changes.outputs.dependencies == 'true' || github.event_name == 'workflow_dispatch'
1616
name: Check design token color contrast
1717
runs-on: ubuntu-latest
1818
continue-on-error: true

.github/workflows/build_config.yml

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

1313
build:
1414
needs: changes
15-
if: needs.changes.outputs.buildConfig == 'true' || github.event_name == 'workflow_dispatch'
15+
if: needs.changes.outputs.buildConfig == 'true' || needs.changes.outputs.dependencies == 'true' || github.event_name == 'workflow_dispatch'
1616
name: Test if custom transforms, formats, etc. are working
1717
runs-on: ubuntu-latest
1818
steps:

.github/workflows/token-schema-validation.yml

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

1313
build:
1414
needs: changes
15-
if: needs.changes.outputs.tokens == 'true' || github.event_name == 'workflow_dispatch'
15+
if: needs.changes.outputs.tokens == 'true' || needs.changes.outputs.dependencies == 'true' || github.event_name == 'workflow_dispatch'
1616
name: Validate Design Tokens against Schema
1717
runs-on: ubuntu-latest
1818
steps:

.github/workflows/visual_regression_test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ jobs:
4444
sleep 5
4545
4646
- name: Run Visual Regression Tests
47-
uses: docker://mcr.microsoft.com/playwright:v1.49.0-jammy
47+
uses: docker://mcr.microsoft.com/playwright:v1.55.0-jammy
48+
4849
env:
4950
STORYBOOK_URL: 'http://172.17.0.1:6006'
5051
with:

CHANGELOG.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@
8585
### Patch Changes
8686

8787
- [#1154](https://github.com/primer/primitives/pull/1154) [`f86174b`](https://github.com/primer/primitives/commit/f86174b05a516b8d46b0f2ef5258c72b53ea6e82) Thanks [@lukasoppermann](https://github.com/lukasoppermann)! - Fix borderColor-closed-muted in dark-protanopia-deuteranopia and revert protanopia-deuteranopia open color to be orange again
88-
8988
- `borderColor-closed-muted` in dark-protanopia-deuteranopia is now `gray` instead of `orange`
9089
- `borderColor-open-[muted|emphasis]` in protanopia-deuteranopia is now `orange` again (instead of `blue`)
9190
- `fgColor-open` in protanopia-deuteranopia is now `orange` again (instead of `blue`)
@@ -228,13 +227,11 @@
228227
- [#1016](https://github.com/primer/primitives/pull/1016) [`39862e9`](https://github.com/primer/primitives/commit/39862e9839f39810bea1a2f8fd148a5673f1c850) Thanks [@langermank](https://github.com/langermank)! - # Updated neutral base color scales
229228

230229
## Changes
231-
232230
- Theme specific neutral scales have been replaced with two new scales: `light` and `dark`.
233231
- The new `light` and `dark` scales are inverted, where 0 is the lightest shade in `light` and the darkest shade in `dark`.
234232
- Functional color tokens have been updated to use the new `light` and `dark` scales, and several overrides have been removed due to the new inverted design.
235233

236234
## Migration
237-
238235
- Functional color tokens all work as expected and have been tested to meet minimum contrast requirements.
239236
- If you are using `primer/primitives` base color scales directly, you may need to update how those colors are applied. See the migration table which outlines approximately how the new colors map to the old colors.
240237

@@ -317,7 +314,6 @@
317314
- [#956](https://github.com/primer/primitives/pull/956) [`13f62d5`](https://github.com/primer/primitives/commit/13f62d5b313bf188ebfde22f114fcaf277a32821) Thanks [@lukasoppermann](https://github.com/lukasoppermann)! - Removed space tokens
318315

319316
- [#1026](https://github.com/primer/primitives/pull/1026) [`401fef1`](https://github.com/primer/primitives/commit/401fef13e3ef1706638260ed5db1c9911e5bb62f) Thanks [@langermank](https://github.com/langermank)! - - Update counter bg styles
320-
321317
- Contrast fixes
322318

323319
- [#968](https://github.com/primer/primitives/pull/968) [`d845fdf`](https://github.com/primer/primitives/commit/d845fdfec1b98e4674127eb6246b6416c0971d62) Thanks [@lukasoppermann](https://github.com/lukasoppermann)! - Rename data-[colorName]-color to data-[colorName]-color-emphasis
@@ -335,7 +331,6 @@
335331
- [#977](https://github.com/primer/primitives/pull/977) [`86a263b`](https://github.com/primer/primitives/commit/86a263b1004b5ecf75af8bf8f2af7bf17a178ec5) Thanks [@lukasoppermann](https://github.com/lukasoppermann)! - rm @ where it does not effect output
336332

337333
- [#1018](https://github.com/primer/primitives/pull/1018) [`abe900a`](https://github.com/primer/primitives/commit/abe900a8fd5d60038c04c7daabc4b36a1709c5f7) Thanks [@langermank](https://github.com/langermank)! - - Minor changes to prepare for adding more borders to high contrast themes
338-
339334
- Adds tooltip pattern to allow for an inverse style in dark high contrast
340335

341336
- [#1012](https://github.com/primer/primitives/pull/1012) [`2ac3905`](https://github.com/primer/primitives/commit/2ac39054630c2e043fab07b0c7ef227b5dd67124) Thanks [@lukasoppermann](https://github.com/lukasoppermann)! - add borderRadius.default token
@@ -542,7 +537,6 @@
542537
### Patch Changes
543538

544539
- [#789](https://github.com/primer/primitives/pull/789) [`0f97174`](https://github.com/primer/primitives/commit/0f9717440b376aae27d6e713bf7d17cb17a9ed6f) Thanks [@langermank](https://github.com/langermank)! - - fix fgColor for ToggleSwitch in dark high contrast
545-
546540
- darken borderColor-muted slightly in dark & light mode
547541

548542
- [#785](https://github.com/primer/primitives/pull/785) [`1c830ae`](https://github.com/primer/primitives/commit/1c830ae6dcf7a566342e2aea0e74f88d342b52ed) Thanks [@langermank](https://github.com/langermank)! - Build v8 tokens to `/dist`
@@ -594,7 +588,6 @@
594588
### Patch Changes
595589

596590
- [#743](https://github.com/primer/primitives/pull/743) [`5125c62`](https://github.com/primer/primitives/commit/5125c6275a0f03fa28227d06d34540b56dee949f) Thanks [@langermank](https://github.com/langermank)! - - Disabled state for transparent type controls is now transparent
597-
598591
- Reverted the selected color for transparent type controls back to the original (pulled from old source file)
599592
- Fixed the disabled fgColor for ToggleSwitch
600593

@@ -617,7 +610,6 @@
617610
### Patch Changes
618611

619612
- [#733](https://github.com/primer/primitives/pull/733) [`f431e7e`](https://github.com/primer/primitives/commit/f431e7e74350b6ec400b36dc5f1cb0a4046e5e4b) Thanks [@langermank](https://github.com/langermank)! - - Remove the default button inset shadow (its basically invisible)
620-
621613
- Switch danger button to use the same border strategy as primary for hover/active
622614

623615
- [#735](https://github.com/primer/primitives/pull/735) [`0d982b1`](https://github.com/primer/primitives/commit/0d982b1c7629afcdaa0a3168ffcfbfbae17aeeee) Thanks [@langermank](https://github.com/langermank)! - Add missing fallbacks for disabled buttons
@@ -682,7 +674,6 @@
682674
- [#666](https://github.com/primer/primitives/pull/666) [`5c18c74`](https://github.com/primer/primitives/commit/5c18c74788d18619bc4b94558d532ec4df3288aa) Thanks [@ctmayn](https://github.com/ctmayn)! - Adjust the value of entity highlighting so it meets the required color contrast on a diff deletion background.
683675

684676
- [#667](https://github.com/primer/primitives/pull/667) [`f8c7429`](https://github.com/primer/primitives/commit/f8c74297461cad1394148791a8c414bc6aad7fd8) Thanks [@langermank](https://github.com/langermank)! - - Update Overlay backdrop color for dark mode
685-
686677
- Add Overlay backdrop tokens to the old build
687678

688679
- [#671](https://github.com/primer/primitives/pull/671) [`2d3861e`](https://github.com/primer/primitives/commit/2d3861ec2949f1c0e75dd1a6a27a0699fad82b88) Thanks [@langermank](https://github.com/langermank)! - Add transparent fallbacks
@@ -734,7 +725,6 @@
734725
- [#643](https://github.com/primer/primitives/pull/643) [`6f1f6b6`](https://github.com/primer/primitives/commit/6f1f6b68ff42fdcd401b370397c2f1f2fc5e4eb2) Thanks [@langermank](https://github.com/langermank)! - Adds new color fallback docs and JSON to be used with PostCSS
735726

736727
- [#600](https://github.com/primer/primitives/pull/600) [`76f3122`](https://github.com/primer/primitives/commit/76f31227b6b1b1c7adc5bc8c549cdb3db87aaecc) Thanks [@lukasoppermann](https://github.com/lukasoppermann)! - - fix syntax tokens dark mode by moving prettylights tokens into the color parent
737-
738728
- invalid-illegal-text and carriage-return-bg were droped due to a json bug
739729

740730
- [#599](https://github.com/primer/primitives/pull/599) [`f67de6a`](https://github.com/primer/primitives/commit/f67de6afc7896270aac12813ddf2e75ce36fd291) Thanks [@lukasoppermann](https://github.com/lukasoppermann)! - Replace light-colorblind scale with overrides
@@ -766,7 +756,6 @@
766756
### Patch Changes
767757

768758
- [`ad20369`](https://github.com/primer/primitives/commit/ad203696f9591a32fb0c26d65f43ff14c27eebb1) Thanks [@lukasoppermann](https://github.com/lukasoppermann)! - ## Updated workflow for v8 tokens
769-
770759
- size-fine and size-coarse tokens are now wrapped in media queries
771760

772761
## 7.11.6
@@ -1340,7 +1329,6 @@
13401329
* [#137](https://github.com/primer/primitives/pull/137) [`4779983`](https://github.com/primer/primitives/commit/4779983fd0c95924cbc2b5b9ac98dac19ec0f205) Thanks [@Juliusschaeper](https://github.com/Juliusschaeper)! - HC palette update + exceptions for emphasis
13411330

13421331
- [#134](https://github.com/primer/primitives/pull/134) [`8b8cba7`](https://github.com/primer/primitives/commit/8b8cba7a61756c85d2f751392162abbaadcbfcec) Thanks [@auareyou](https://github.com/auareyou)! - Remapping updates
1343-
13441332
- Updated alerts to use roles instead of `fg-default`
13451333
- Rename `fg.inactive` to `fg.subtle`
13461334
- Deprecate `avatar-border`

eslint.config.mjs

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,28 @@ import jsxA11y from 'eslint-plugin-jsx-a11y'
88
import eslintPluginReactHooks from 'eslint-plugin-react-hooks'
99
import eslintPluginGithub from 'eslint-plugin-github'
1010
import eslintPluginTypescript from 'typescript-eslint'
11+
import eslintPluginImport from 'eslint-plugin-import'
1112

1213
export default tseslint.config([
13-
eslintPluginGithub.getFlatConfigs().recommended,
14-
eslintPluginGithub.getFlatConfigs().browser,
15-
eslintPluginGithub.getFlatConfigs().react,
16-
...eslintPluginGithub.getFlatConfigs().typescript,
17-
jsxA11y.flatConfigs.recommended,
18-
tseslint.configs.recommended,
14+
// register plugin objects up-front so merged rule sets can reference them
1915
{
2016
plugins: {
2117
react: eslintPluginReact,
2218
'react-hooks': fixupPluginRules(eslintPluginReactHooks),
19+
github: eslintPluginGithub,
20+
'jsx-a11y': jsxA11y,
2321
},
22+
},
23+
tseslint.configs.recommended,
24+
{
2425
rules: {
26+
// include jsx-a11y rules without redefining the plugin
27+
...jsxA11y.configs.recommended.rules,
2528
...eslintPluginReactHooks.configs.recommended.rules,
2629
...eslintPluginReact.configs['jsx-runtime'].rules,
27-
...eslintPluginGithub.getFlatConfigs().rules,
30+
// merge github rules but avoid including its flat configs (which register plugin entries)
31+
// Some versions of eslint-plugin-github do not provide getFlatConfigs; this check ensures compatibility with multiple versions.
32+
...(typeof eslintPluginGithub.getFlatConfigs === 'function' ? eslintPluginGithub.getFlatConfigs().rules : {}),
2833
},
2934
},
3035
eslintPluginPrettierRecommended,
@@ -60,6 +65,9 @@ export default tseslint.config([
6065
},
6166
},
6267
ignores: ['README.md'],
68+
plugins: {
69+
importPlugin: eslintPluginImport,
70+
},
6371
settings: {
6472
react: {
6573
version: 'detect',

0 commit comments

Comments
 (0)