Skip to content

Commit

Permalink
Merge branch 'main' into octicon-remediation-1
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthkp authored Aug 20, 2024
2 parents a395b0f + 4b47151 commit 83fce5d
Show file tree
Hide file tree
Showing 574 changed files with 7,862 additions and 3,846 deletions.
5 changes: 5 additions & 0 deletions .changeset/beige-schools-kneel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": minor
---

Add `link` variant to Button
5 changes: 5 additions & 0 deletions .changeset/clever-birds-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Add `variant` prop to Heading for small, medium and large styles
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": ["docs", "example-*", "codesandbox", "rollup-plugin-import-css"]
"ignore": ["docs", "example-*", "codesandbox"]
}
5 changes: 5 additions & 0 deletions .changeset/dry-trainers-protect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': major
---

Update Primer React to emit *.css files that are imported by emitted *.js files for styling
5 changes: 5 additions & 0 deletions .changeset/eleven-drinks-kiss.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': major
---

Remove the SSRProvider component and useSSRSafeId hook
5 changes: 5 additions & 0 deletions .changeset/forty-ants-tell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': minor
---

Remove experimental TabPanels component in preference of UnderlinePanels
5 changes: 5 additions & 0 deletions .changeset/gold-cups-explode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": minor
---

Add `size` and `weight` props to `Text`
5 changes: 5 additions & 0 deletions .changeset/honest-ligers-fly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

chore(deps): Update eslint-plugin-primer-react to latest
5 changes: 5 additions & 0 deletions .changeset/lemon-candles-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

ActionList: Enable focusZone for roles listbox and menu
5 changes: 5 additions & 0 deletions .changeset/moody-rivers-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Header: Add overflow when there are a lot of items
5 changes: 5 additions & 0 deletions .changeset/nervous-llamas-ring.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': minor
---

Update Heading component to use CSS Modules behind feature flag
5 changes: 5 additions & 0 deletions .changeset/new-shirts-beam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

FilteredActionList: export `FilteredActionList` from '@primer/react/experimental'
5 changes: 5 additions & 0 deletions .changeset/pink-actors-cross.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': major
---

Remove the deprecated FilterList component from Primer React
33 changes: 30 additions & 3 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,36 @@
"codesandbox": "0.0.0",
"example-app-router": "0.0.0",
"example-consumer-test": "0.0.0",
"example-nextjs": "0.0.0",
"@primer/react": "36.27.0",
"rollup-plugin-import-css": "0.0.0"
"rollup-plugin-import-css": "0.0.0",
"postcss-preset-primer": "0.0.0"
},
"changesets": []
"changesets": [
"beige-schools-kneel",
"clever-birds-press",
"dry-trainers-protect",
"eleven-drinks-kiss",
"fluffy-ravens-thank",
"forty-ants-tell",
"four-shoes-yell",
"four-tables-glow",
"gold-cups-explode",
"honest-ligers-fly",
"lemon-candles-deny",
"lovely-days-march",
"moody-rivers-impress",
"nervous-llamas-ring",
"new-shirts-beam",
"pink-actors-cross",
"quick-adults-buy",
"short-boats-cover",
"sixty-olives-glow",
"soft-tips-chew",
"tall-wasps-end",
"thirty-tips-bow",
"tough-pans-punch",
"twelve-tables-leave",
"yellow-tools-call",
"young-meals-worry"
]
}
5 changes: 5 additions & 0 deletions .changeset/quick-adults-buy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Refactor Link component to use CSS modules using the feature flag `primer_react_css_modules`
5 changes: 5 additions & 0 deletions .changeset/seven-scissors-explain.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

TextInput: Update trailing action styles for hover state
5 changes: 5 additions & 0 deletions .changeset/short-boats-cover.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': minor
---

Add `KeybindingHint` component for indicating an available keyboard shortcut
5 changes: 5 additions & 0 deletions .changeset/sixty-olives-glow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': patch
---

Remove `aria-busy` from `ProgressBar` component
5 changes: 5 additions & 0 deletions .changeset/soft-tips-chew.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

fix(Blankslate): Don't use Box to render heading when flag is enabled
5 changes: 5 additions & 0 deletions .changeset/tall-wasps-end.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': minor
---

Adds new `className` prop to `FormControl` component
5 changes: 5 additions & 0 deletions .changeset/thirty-tips-bow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': minor
---

Add support for sourcemaps for emitted CSS files
5 changes: 5 additions & 0 deletions .changeset/tough-pans-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': minor
---

Update Blankslate component to use CSS Modules behind a feature flag
5 changes: 5 additions & 0 deletions .changeset/twelve-tables-leave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': minor
---

Add support for custom icons when a Banner is variant="upsell"
5 changes: 5 additions & 0 deletions .changeset/yellow-tools-call.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': patch
---

avoid useeffect when syncing theme config
4 changes: 1 addition & 3 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ module.exports = {
'types/**/*',
'consumer-test/**/*',
'contributor-docs/adrs/*',
'examples/nextjs/**',
'examples/codesandbox/**',
// Note: this file is inlined from an external dependency
'packages/react/src/utils/polymorphic.ts',
Expand Down Expand Up @@ -75,7 +74,6 @@ module.exports = {
],
},
],
'primer-react/no-deprecated-colors': ['warn', {checkAllStrings: true}],

// Overrides from updating plugin:github
'filenames/match-regex': 'off',
Expand All @@ -89,6 +87,7 @@ module.exports = {
'github/no-inner-html': 'off',
'github/role-supports-aria-props': 'off',
'no-restricted-syntax': 'off',
'primer-react/a11y-use-next-tooltip': 'off',
},
overrides: [
// rules which apply only to JS
Expand Down Expand Up @@ -241,7 +240,6 @@ module.exports = {
'jsx-a11y/label-has-for': 'off',
'@typescript-eslint/no-unnecessary-condition': 'off',
'@typescript-eslint/no-unused-vars': 'off',
'primer-react/no-deprecated-colors': ['error', {skipImportCheck: true}],
'no-redeclare': 'off',
'ssr-friendly/no-dom-globals-in-module-scope': 'off',
'ssr-friendly/no-dom-globals-in-react-fc': 'off',
Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/codescan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: 'Code Scan'

on:
schedule:
- cron: '0 * * * *'

jobs:
codescan:
name: Scan the repository
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

- uses: actions/github-script@v7
id: file-counts
with:
script: |
const fg = require('fast-glob')
const fs = require('fs')
const path = require('path')
const files = await fg.glob(['packages/react/src/**/*.tsx', 'packages/react/src/**/*.module.css'], {
ignore: [
'**/__tests__/**',
'**/_*.tsx',
'**/*.figma.tsx',
'**/*.stories.tsx',
'**/*.test.tsx',
'**/CSSComponent/**',
'**/hooks/**',
'**/index.tsx',
'**/utils/**',
],
})
const metrics = []
for (const file of files) {
const content = fs.readFileSync(file, 'utf8')
const name = path.parse(file).name.replace('.module', '')
if (file.endsWith('.tsx')) {
const matched = content.match(/.`$([^`]*)^`$/gm)
if (matched) {
const count = matched.join('\n').split('\n').length
metrics.push(
`- type: "count"\n name: "primer.react.styled-system.count"\n value: ${count}\n tags:\n - "path:${file}"\n - "component:${name}"`,
)
}
} else {
const count = content.split('\n').length
metrics.push(
`- type: "count"\n name: "primer.react.css-module.count"\n value: ${count}\n tags:\n - "path:${file}"\n - "component:${name}"`,
)
}
}
core.setOutput('metrics', metrics.join('\n'))
- name: Build count
uses: masci/datadog@v1
with:
api-key: ${{ secrets.datadog_api_key }}
metrics: ${{ steps.file-counts.outputs.metrics }}
2 changes: 1 addition & 1 deletion .github/workflows/consumer_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install dependencies
run: npm ci
- name: Build @primer/react
run: npm run build -w @primer/react
run: npm run build -w rollup-plugin-import-css -w @primer/react
# Output the artifact as a tarball in `consumer-test`. Write the
# information for this package in `consumer-test/pack.json` so we can read
# from it later to install the package
Expand Down
23 changes: 21 additions & 2 deletions .github/workflows/figma_connect_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Figma Connect Publish on Change
on:
push:
paths:
- packages/react/src/components/**/*.figma.tsx
- packages/react/src/**/*.figma.tsx
branches:
- main

Expand All @@ -12,6 +12,25 @@ jobs:
name: Code Connect
runs-on: ubuntu-latest
steps:
- run: npx figma connect publish
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node
uses: actions/setup-node@v2
with:
node-version: 20

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm i --legacy-peer-deps

- run: cd packages/react/ && npx figma connect publish
env:
FIGMA_ACCESS_TOKEN: ${{ secrets.FIGMA_ACCESS_TOKEN }}
12 changes: 11 additions & 1 deletion .github/workflows/release_candidate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,19 @@ jobs:

- name: Publish release candidate
run: |
# Remove existing pre.json if one exists. Snapshots are not allowed
# in pre-release mode.
# TODO: remove in v37
rm .changeset/pre.json
pkg_json_path=packages/react/package.json
version=$(jq -r .version $pkg_json_path)
echo "$( jq ".version = \"$(echo $version)-rc.$(git rev-parse --short HEAD)\"" $pkg_json_path )" > $pkg_json_path
# Update how the version is generated in these prereleases. By
# default, -rc. is included in versions when `pre.json` is present.
# Add this back in when we exit the v37 release
# TODO: remove in v37
echo "$( jq ".version = \"$(echo $version).$(git rev-parse --short HEAD)\"" $pkg_json_path )" > $pkg_json_path
npx changeset publish --tag next
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
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.
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.
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.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Diff not rendered.
Loading

0 comments on commit 83fce5d

Please sign in to comment.