Skip to content

Commit

Permalink
Merge branch 'main' into iunia/misspaced-checkboxes
Browse files Browse the repository at this point in the history
  • Loading branch information
joshblack authored Nov 28, 2023
2 parents 5d8cc89 + 8c96909 commit 1aad0c1
Show file tree
Hide file tree
Showing 28 changed files with 248 additions and 137 deletions.
7 changes: 7 additions & 0 deletions .changeset/nervous-tomatoes-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@primer/react': minor
---

Adds "unavailable" status to StateLabel

<!-- Changed components: StateLabel -->
2 changes: 1 addition & 1 deletion .github/actions/pagerduty/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ runs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 20
- name: Get PagerDuty Schedule
id: pagerduty
uses: actions/github-script@v6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/assign_release_conductor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
- run: npm ci
- uses: ./.github/actions/pagerduty
id: pagerduty
Expand Down
32 changes: 16 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
Expand All @@ -41,7 +41,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'npm'

- name: Install dependencies
Expand All @@ -62,7 +62,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'npm'

- name: Install dependencies
Expand All @@ -83,7 +83,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'npm'

- name: Install dependencies
Expand All @@ -101,7 +101,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'npm'

- name: Install dependencies
Expand All @@ -126,10 +126,10 @@ jobs:
shard: [1, 2, 3, 4]
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18.x
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
Expand Down Expand Up @@ -163,10 +163,10 @@ jobs:
needs: vrt-runner
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18.x
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'npm'
- name: install dependencies
run: npm ci
Expand Down Expand Up @@ -194,10 +194,10 @@ jobs:
shard: [1, 2]
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18.x
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
Expand Down Expand Up @@ -231,10 +231,10 @@ jobs:
needs: aat-runner
steps:
- uses: actions/checkout@v4
- name: Use Node.js 18.x
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'npm'
- name: install dependencies
run: npm ci
Expand All @@ -259,10 +259,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Use Node.js 18.x
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
Expand All @@ -277,7 +277,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/consumer_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: npm
- name: Install dependencies
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20

- name: Get or Create Comment
uses: actions/github-script@v7
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-schedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
- name: Install packages for github-script
run: npm i date-fns
- name: Create Release Issue
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/statuses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
- name: Install node deps
run: npm ci
- name: Install ruby deps
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/storybook-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm i
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/vrt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18
v20
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion contributor-docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ If your component doesn't use DOM globals, it likely won't cause layout shift du

### Adding the `sx` prop

Each component should accept a prop called `sx` that allows for setting theme-aware ad-hoc styles. See the [overriding styles](https://primer.style/components/overriding-styles) doc for more information on using the prop.
Each component should accept a prop called `sx` that allows for setting theme-aware ad-hoc styles. See the [overriding styles](https://primer.style/react/overriding-styles) doc for more information on using the prop.

To add the `sx` prop to your component: import the default export from the `sx` module, add it to your style definition, and add the appropriate prop types. **The `sx` prop should go at the _very end_ of your style definition.**

Expand Down
27 changes: 27 additions & 0 deletions e2e/components/StateLabel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,33 @@ test.describe('StateLabel', () => {
}
})

test.describe('Unavailable', () => {
for (const theme of themes) {
test.describe(theme, () => {
test('default @vrt', async ({page}) => {
await visit(page, {
id: 'components-statelabel-features--unavailable',
globals: {
colorScheme: theme,
},
})

// Default state
expect(await page.screenshot()).toMatchSnapshot(`StateLabel.Unavailable.${theme}.png`)
})

test('axe @aat', async ({page}) => {
await visit(page, {
id: 'components-statelabel-features--unavailable',
globals: {
colorScheme: theme,
},
})
})
})
}
})

test.describe('Small', () => {
for (const theme of themes) {
test.describe(theme, () => {
Expand Down
Loading

0 comments on commit 1aad0c1

Please sign in to comment.