Skip to content

Commit

Permalink
Merging upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
camertron committed Oct 9, 2024
2 parents 6faaa52 + 6cd3960 commit d1dc90f
Show file tree
Hide file tree
Showing 51 changed files with 962 additions and 280 deletions.
5 changes: 0 additions & 5 deletions .changeset/breezy-windows-speak.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/eight-avocados-lick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": minor
---

Tooltip: Do not export all types publicly in the experimental bundle
5 changes: 5 additions & 0 deletions .changeset/five-seas-scream.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Move CSS modules feature flag from staff to ga for Avatar component
5 changes: 5 additions & 0 deletions .changeset/itchy-paws-bake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

fix(SegmentedControl): set global focus styles
5 changes: 5 additions & 0 deletions .changeset/khaki-dolls-reflect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': minor
---

Promote Dialog, Tooltip, and Stack from `@primer/react/experimental` to `@primer/react`
5 changes: 5 additions & 0 deletions .changeset/large-glasses-provide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Add focus styles to Pagination component
5 changes: 5 additions & 0 deletions .changeset/modern-cooks-invite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

fix(Banner): rewrite PrimaryAction & SecondaryAction types
14 changes: 14 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,19 @@
"cool-lobsters-nail",
"curvy-goats-sell",
"dirty-pianos-wash",
"dry-pens-pay",
"dry-trainers-protect",
"dull-beans-dance",
"dull-dolphins-bake",
"dull-mirrors-dream",
"dull-turkeys-cheer",
"early-lions-vanish",
"eight-avocados-lick",
"eighty-houses-beg",
"eleven-drinks-kiss",
"fifty-foxes-drop",
"fifty-rockets-joke",
"five-seas-scream",
"flat-avocados-cheer",
"flat-weeks-battle",
"fluffy-ravens-thank",
Expand All @@ -48,13 +52,17 @@
"happy-fireants-mate",
"honest-ligers-fly",
"hot-baboons-allow",
"khaki-dolls-reflect",
"large-glasses-provide",
"large-plants-unite",
"lemon-candles-deny",
"light-chefs-bow",
"little-bats-approve",
"long-pans-travel",
"lovely-days-march",
"lucky-oranges-camp",
"mighty-parrots-carry",
"modern-cooks-invite",
"moody-rivers-impress",
"nervous-llamas-ring",
"new-shirts-beam",
Expand All @@ -63,6 +71,7 @@
"olive-donkeys-exercise",
"orange-steaks-do",
"pink-actors-cross",
"plenty-books-agree",
"purple-apricots-relax",
"quick-adults-buy",
"quick-feet-sip",
Expand All @@ -73,8 +82,10 @@
"serious-terms-sniff",
"seven-scissors-explain",
"short-boats-cover",
"silent-fireants-kneel",
"silent-planes-grab",
"silly-weeks-clap",
"silver-cheetahs-compare",
"six-owls-walk",
"sixty-olives-glow",
"slow-walls-drum",
Expand All @@ -87,6 +98,7 @@
"stale-lizards-report",
"stale-pets-tan",
"strong-tables-rest",
"stupid-monkeys-beg",
"tall-wasps-end",
"tame-boats-hide",
"ten-gifts-own",
Expand All @@ -98,11 +110,13 @@
"three-scissors-hide",
"tidy-bats-warn",
"tidy-clocks-marry",
"tidy-impalas-remain",
"tough-pans-punch",
"twelve-tables-leave",
"twenty-spoons-give",
"weak-hats-type",
"weak-ravens-greet",
"wet-apples-hide",
"wet-otters-pull",
"wicked-books-occur",
"yellow-tools-call",
Expand Down
5 changes: 5 additions & 0 deletions .changeset/silver-cheetahs-compare.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

Bug fix for `IconButton` to respect the `style` prop width when the feature flag is on.
5 changes: 5 additions & 0 deletions .changeset/stupid-monkeys-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/react": patch
---

SelectPanel: Fix items not being selected when defined within scope (track selection by item.id)
11 changes: 1 addition & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,7 @@ updates:
directory: '/'
schedule:
interval: 'weekly'
labels:
- 'dependencies'
- 'skip changeset'

- package-ecosystem: 'npm'
directory: '/docs'
schedule:
interval: 'weekly'
allow:
- dependency-name: '@primer/gatsby-theme-doctocat'
versioning-strategy: increase
labels:
- 'dependencies'
- 'skip changeset'
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ jobs:
run: npm run build -ws --if-present

vrt-runner:
runs-on: ubuntu-latest-8-cores
runs-on: ubuntu-latest-16-cores
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -180,7 +180,7 @@ jobs:
run: exit 1

vrt-runner-all-flags:
runs-on: ubuntu-latest-8-cores
runs-on: ubuntu-latest-16-cores
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -258,7 +258,7 @@ jobs:
run: exit 1

aat-runner:
runs-on: ubuntu-latest-8-cores
runs-on: ubuntu-latest-16-cores
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -332,7 +332,7 @@ jobs:
run: exit 1

aat-runner-all-flags:
runs-on: ubuntu-latest-8-cores
runs-on: ubuntu-latest-16-cores
strategy:
fail-fast: false
matrix:
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/recommend-integration-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Recommend integration tests
on:
pull_request:

jobs:
recommend:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22

- name: Get source files changes
id: source-files
run: |
DIFF=$(git diff --name-only origin/main | grep 'packages/react' | grep -Ev '.stories.tsx|.docs.json' || true)
if [ -z "$DIFF" ]; then
echo "diff=" >> $GITHUB_OUTPUT
else
echo "diff=true" >> $GITHUB_OUTPUT
fi
- name: Has diff?
run: echo ${{ steps.source-files.outputs.diff != '' }}

- name: Get or Create Comment
if: ${{ steps.source-files.outputs.diff != '' }}
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const result = await github.paginate(github.rest.issues.listComments, {
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo
});
const previousComment = result.filter(c => c.user.login == 'github-actions[bot]' && c.body.startsWith('<!-- recommend-integration-tests.yml -->'))
if (!previousComment.length) {
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '<!-- recommend-integration-tests.yml -->\n\n :wave: Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the [integration workflow](https://gh.io/testing_primer_at_dotcom). Thanks!'
})
}
- name: Add label
if: ${{ steps.source-files.outputs.diff != '' }}
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const result = await github.rest.issues.listLabelsOnIssue({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
})
const integrationLabels = result.data.filter(label => label.name.startsWith('integration-tests'))
if (!integrationLabels.length) {
await github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['integration-tests: recommended'],
})
}
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 examples/app-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"type-check": "tsc --noEmit"
},
"dependencies": {
"@primer/react": "37.0.0-rc.9",
"@primer/react": "37.0.0-rc.10",
"next": "^14.2.10",
"react": "^18.3.1",
"react-dom": "^18.3.1",
Expand Down
2 changes: 1 addition & 1 deletion examples/codesandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@typescript-eslint/eslint-plugin": "^7.11.0",
"@typescript-eslint/parser": "^7.3.1",
"@vitejs/plugin-react": "^4.2.1",
"@primer/react": "37.0.0-rc.9",
"@primer/react": "37.0.0-rc.10",
"eslint": "^8.56.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.7",
Expand Down
2 changes: 1 addition & 1 deletion examples/consumer-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@types/react": "^18.2.14",
"@types/react-dom": "^18.2.19",
"@types/styled-components": "^5.1.11",
"@primer/react": "37.0.0-rc.9",
"@primer/react": "37.0.0-rc.10",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"styled-components": "^5.3.11",
Expand Down
2 changes: 1 addition & 1 deletion examples/theming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"dependencies": {
"@primer/octicons-react": "^19.9.0",
"@primer/react": "37.0.0-rc.9",
"@primer/react": "37.0.0-rc.10",
"clsx": "^1.2.1",
"next": "^14.2.10",
"react": "^18.3.1",
Expand Down
34 changes: 34 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,39 @@
# @primer/react

## 37.0.0-rc.10

### Minor Changes

- [#5064](https://github.com/primer/react/pull/5064) [`29f33ce`](https://github.com/primer/react/commit/29f33ce93c6b7e573cca9f2c0a10bb12ec5245c3) Thanks [@broccolinisoup](https://github.com/broccolinisoup)! - Tooltip: Do not export all types publicly in the experimental bundle

- [#5010](https://github.com/primer/react/pull/5010) [`8385c33`](https://github.com/primer/react/commit/8385c334df1f31aa810a8e6575986ca420a683f9) Thanks [@joshblack](https://github.com/joshblack)! - Promote Dialog, Tooltip, and Stack from `@primer/react/experimental` to `@primer/react`

- [#5074](https://github.com/primer/react/pull/5074) [`e4965ed`](https://github.com/primer/react/commit/e4965ed773e32abc6fc49bff623dd79127047c93) Thanks [@joshblack](https://github.com/joshblack)! - Add the `useFeatureFlag` hook to `@primer/react/experimental`

### Patch Changes

- [#5059](https://github.com/primer/react/pull/5059) [`682e787`](https://github.com/primer/react/commit/682e787071d9bed26801202cf6823a96c1b39462) Thanks [@gwwar](https://github.com/gwwar)! - Fixes negative and invalid pages in data table pagination on re-render.

- [#5078](https://github.com/primer/react/pull/5078) [`3b7bf41`](https://github.com/primer/react/commit/3b7bf411c60d5283eb2fba78e7ab1a26b707af5b) Thanks [@jonrohan](https://github.com/jonrohan)! - Set the `min-width` of `IconButton` to `unset` to resolve layout issues.

- [#5062](https://github.com/primer/react/pull/5062) [`0f5d5e0`](https://github.com/primer/react/commit/0f5d5e05096b1b1599a92c90619cde6e11cb5808) Thanks [@jonrohan](https://github.com/jonrohan)! - Move CSS modules feature flag from staff to ga for Avatar component

- [#5082](https://github.com/primer/react/pull/5082) [`212714c`](https://github.com/primer/react/commit/212714ccc005eb57e272b3f64e3736e198c555e8) Thanks [@langermank](https://github.com/langermank)! - Add focus styles to Pagination component

- [#5077](https://github.com/primer/react/pull/5077) [`6490b27`](https://github.com/primer/react/commit/6490b27bde15e7687dcda48c444eb909dec2d5a7) Thanks [@jonrohan](https://github.com/jonrohan)! - Bug fix(Avatar): Changed rounded border calculation for the "square" Avatar to better align with existing border styles

- [#5055](https://github.com/primer/react/pull/5055) [`73135c1`](https://github.com/primer/react/commit/73135c1c57a02e35d33ae6ffba16784043dcabb8) Thanks [@francinelucca](https://github.com/francinelucca)! - fix(Banner): rewrite PrimaryAction & SecondaryAction types

- [#5068](https://github.com/primer/react/pull/5068) [`5f7bd0b`](https://github.com/primer/react/commit/5f7bd0b399073b2f22b8eaec548c37ff19a5ea86) Thanks [@jonrohan](https://github.com/jonrohan)! - fix for `toggleStyledComponent` utility, When the feature flag is enabled and sx prop is passed in use, Box

- [#5091](https://github.com/primer/react/pull/5091) [`4218bef`](https://github.com/primer/react/commit/4218bef879ae70aab3cc30492bacfc9c506be8f7) Thanks [@jonrohan](https://github.com/jonrohan)! - Bug fix for `IconButton` to respect the `style` prop width when the feature flag is on.

- [#5073](https://github.com/primer/react/pull/5073) [`472967a`](https://github.com/primer/react/commit/472967a712e9b81856b3b37088142b0ffbda5b15) Thanks [@siddharthkp](https://github.com/siddharthkp)! - SelectPanel: Fix items not being selected when defined within scope (track selection by item.id)

- [#5066](https://github.com/primer/react/pull/5066) [`702ba5c`](https://github.com/primer/react/commit/702ba5ca59d42abc57a1d6da539935534edcd2ab) Thanks [@jonrohan](https://github.com/jonrohan)! - Use the IconButton for the close button on Dialog

- [#5079](https://github.com/primer/react/pull/5079) [`a2e5671`](https://github.com/primer/react/commit/a2e5671e720e4d78a3f5a9b503fc841db100dc1d) Thanks [@jonrohan](https://github.com/jonrohan)! - Correctly pass styled system typography and common props to the `Box` component in the `Text` component when the CSS modules feature flag is enabled.

## 37.0.0-rc.9

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@primer/react",
"version": "37.0.0-rc.9",
"version": "37.0.0-rc.10",
"description": "An implementation of GitHub's Primer Design System using React",
"main": "lib/index.js",
"module": "lib-esm/index.js",
Expand Down
Loading

0 comments on commit d1dc90f

Please sign in to comment.