Skip to content

Commit

Permalink
Merge branch 'main' of github.com:primer/react into mp/spinner-a11y
Browse files Browse the repository at this point in the history
  • Loading branch information
mperrotti committed Jun 6, 2024
2 parents 12c5383 + d876224 commit dd463c0
Show file tree
Hide file tree
Showing 3,787 changed files with 108,706 additions and 153,368 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 5 additions & 0 deletions .changeset/chatty-phones-admire.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': patch
---

Adds full `aria-expanded` (true/false) state to `AnchoredOverlay`, and components that consume it
5 changes: 5 additions & 0 deletions .changeset/clever-pots-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': minor
---

RelativeTime: Adds `noTitle` prop if you want to not render the `title` attribute with full date time.
2 changes: 1 addition & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
"ignore": ["docs", "example-*", "codesandbox"]
}
5 changes: 5 additions & 0 deletions .changeset/few-paws-confess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Explicitly set the `type` attribute for `SegmentedControl.Button`
5 changes: 0 additions & 5 deletions .changeset/fifty-cooks-try.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/young-monkeys-sniff.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': patch
---

Bumps @github/relative-time-element to v4.4.1
8 changes: 8 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
**/node_modules/**
**/storybook-static/**
**/.next/**
**/lib/**
**/lib-esm/**
**/dist/**

script/**/*.ts
21 changes: 14 additions & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ module.exports = {
'consumer-test/**/*',
'contributor-docs/adrs/*',
'examples/nextjs/**',
'examples/codesandbox/**',
// Note: this file is inlined from an external dependency
'src/utils/polymorphic.ts',
'packages/react/src/utils/polymorphic.ts',
'storybook-static',
'CHANGELOG.md',
],
Expand All @@ -67,7 +68,11 @@ module.exports = {
camelcase: [
'error',
{
allow: ['dark_dimmed'],
allow: [
'dark_dimmed',
// Allow feature flag names that start with `primer_react_`
'^primer_react_',
],
},
],
'primer-react/no-deprecated-colors': ['warn', {checkAllStrings: true}],
Expand Down Expand Up @@ -107,21 +112,22 @@ module.exports = {
// rules which apply only to TS
{
parserOptions: {
project: 'tsconfig.json',
project: ['./tsconfig.json', './packages/**/tsconfig.json', './examples/**/tsconfig.json'],
},
files: ['**/*.{ts,tsx}'],
extends: ['plugin:@typescript-eslint/recommended'],
rules: {
'@typescript-eslint/no-explicit-any': 2,
'@typescript-eslint/no-unnecessary-condition': 2,
'@typescript-eslint/consistent-type-imports': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-unnecessary-condition': 'error',
'@typescript-eslint/explicit-module-boundary-types': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
argsIgnorePattern: '^_',
},
],
'@typscript-eslint/no-shadow': 'off',
'@typescript-eslint/no-shadow': 'off',
'@typescript-eslint/no-empty-function': 'off',
'@typescript-eslint/ban-ts-comment': [
'error',
Expand Down Expand Up @@ -159,7 +165,7 @@ module.exports = {

// Tests
{
files: ['src/**/*.test.{ts,tsx}'],
files: ['**/*.test.{ts,tsx}'],
extends: ['plugin:jest/recommended', 'plugin:testing-library/react'],
rules: {
'@typescript-eslint/no-non-null-assertion': 'off',
Expand Down Expand Up @@ -204,6 +210,7 @@ module.exports = {
'no-unused-vars': 'off',
'prettier/prettier': 'off',
'react/jsx-no-undef': 'off',
'react/no-unescaped-entities': 'off',
'primer-react/direct-slot-children': 'off',
},
},
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/accessibility-alt-text-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ jobs:
if: ${{ github.event.issue || github.event.pull_request || github.event.discussion }}
steps:
- name: Get action 'github/accessibility-alt-text-bot'
uses: github/accessibility-alt-text-bot@v1.4.0
uses: github/accessibility-alt-text-bot@v1.5.0
19 changes: 10 additions & 9 deletions .github/workflows/assign_release_conductor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm i -g npm@^10.5.1
- run: npm ci
- uses: ./.github/actions/pagerduty
id: pagerduty
Expand Down Expand Up @@ -65,15 +66,6 @@ jobs:
return user.login === PREV_RELEASE_CONDUCTOR;
});
if (hasPreviousReviewer) {
await github.rest.pulls.removeRequestedReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: PR_NUMBER,
reviewers: [PREV_RELEASE_CONDUCTOR],
});
}
// Add the current release conductor as an assignee if they are not currently assigned
const hasAssignee = pull.assignees.find((assignee) => {
return assignee.login === RELEASE_CONDUCTOR;
Expand All @@ -100,3 +92,12 @@ jobs:
reviewers: [RELEASE_CONDUCTOR]
})
}
if (hasPreviousReviewer) {
await github.rest.pulls.removeRequestedReviewers({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: PR_NUMBER,
reviewers: [PREV_RELEASE_CONDUCTOR],
});
}
73 changes: 36 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
with:
node-version: 20
cache: 'npm'
- run: npm i -g npm@^10.5.1
- name: Install dependencies
run: npm ci
- name: Check for unformatted files
Expand All @@ -37,19 +38,16 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- run: npm i -g npm@^10.5.1
- name: Install dependencies
run: npm ci

- name: Lint JavaScript
run: npm run lint

- name: Lint markdown
run: npm run lint:md

Expand All @@ -58,19 +56,16 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- run: npm i -g npm@^10.5.1
- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Test
run: npm run test -- --coverage

Expand All @@ -79,44 +74,34 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- run: npm i -g npm@^10.5.1
- name: Install dependencies
run: npm ci

- name: Build project
run: npm run build
- name: Type check
run: npm run test:type-check
run: npm run type-check

examples:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'

- run: npm i -g npm@^10.5.1
- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Install examples dependencies
working-directory: examples/nextjs
run: npm ci

- name: Build examples
working-directory: examples/nextjs
run: npm run build
run: npm run build -ws --if-present

vrt-runner:
runs-on: ubuntu-latest-8-cores
Expand All @@ -131,19 +116,22 @@ jobs:
with:
node-version: 20
cache: 'npm'
- run: npm i -g npm@^10.5.1
- name: Install dependencies
run: npm ci
- name: Build storybook
run: npx storybook build
working-directory: packages/react
- name: Run storybook
id: storybook
working-directory: packages/react
run: |
npx serve -l 6006 storybook-static &
pid=$!
echo "pid=$pid" >> $GITHUB_OUTPUT
sleep 5
- name: Run VRT
uses: docker://mcr.microsoft.com/playwright:v1.37.0-jammy
uses: docker://mcr.microsoft.com/playwright:v1.43.0-jammy
env:
STORYBOOK_URL: 'http://172.17.0.1:6006'
with:
Expand All @@ -152,10 +140,11 @@ jobs:
run: kill ${{ steps.storybook.outputs.pid }}
- name: Upload report
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: vrt
name: vrt-${{ matrix.shard }}
path: blob-report
retention-days: 1

vrt:
if: ${{ always() }}
Expand All @@ -168,17 +157,19 @@ jobs:
with:
node-version: 20
cache: 'npm'
- run: npm i -g npm@^10.5.1
- name: install dependencies
run: npm ci
- name: download all reports
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: vrt
path: all-blob-reports
pattern: vrt-*
merge-multiple: true
- name: merge all reports
run: npx playwright merge-reports --reporter html ./all-blob-reports
- name: Upload report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: vrt
path: playwright-report
Expand All @@ -199,19 +190,22 @@ jobs:
with:
node-version: 20
cache: 'npm'
- run: npm i -g npm@^10.5.1
- name: Install dependencies
run: npm ci
- name: Build storybook
run: npx storybook build
working-directory: packages/react
- name: Run storybook
id: storybook
working-directory: packages/react
run: |
npx serve -l 6006 storybook-static &
pid=$!
echo "pid=$pid" >> $GITHUB_OUTPUT
sleep 5
- name: Run AAT
uses: docker://mcr.microsoft.com/playwright:v1.37.0-jammy
uses: docker://mcr.microsoft.com/playwright:v1.43.0-jammy
env:
STORYBOOK_URL: 'http://172.17.0.1:6006'
with:
Expand All @@ -220,10 +214,11 @@ jobs:
run: kill ${{ steps.storybook.outputs.pid }}
- name: Upload report
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: axe
name: axe-${{ matrix.shard }}
path: blob-report
retention-days: 1

aat:
if: ${{ always() }}
Expand All @@ -236,17 +231,19 @@ jobs:
with:
node-version: 20
cache: 'npm'
- run: npm i -g npm@^10.5.1
- name: install dependencies
run: npm ci
- name: download all reports
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: axe
path: all-blob-reports
pattern: axe-*
merge-multiple: true
- name: merge all reports
run: npx playwright merge-reports --reporter html ./all-blob-reports
- name: Upload report
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: axe
path: playwright-report
Expand All @@ -264,6 +261,7 @@ jobs:
with:
node-version: 20
cache: 'npm'
- run: npm i -g npm@^10.5.1
- name: Install dependencies
run: npm ci
- name: Build components.json
Expand All @@ -279,9 +277,10 @@ jobs:
with:
node-version: 20
cache: 'npm'
- run: npm i -g npm@^10.5.1
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Get export sizes
run: node script/get-export-sizes.js
run: node packages/react/script/get-export-sizes.js
Loading

0 comments on commit dd463c0

Please sign in to comment.