Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
6f9e448
Fix failing GitHub Actions job 'Main' (#8047)
Copilot Jun 24, 2026
cb79351
Add NavList.Heading slot for accessible section-nav headings (#8031)
janmaarten-a11y Jun 24, 2026
73a45df
Allow CSS anchor positioning in SelectPanel settings (#8026)
TylerJDev Jun 25, 2026
0a49d7d
Add scenario patterns to MCP pattern tools (#8058)
mattobee Jun 25, 2026
849d7fc
feat: update project to Node 26.4.0, update agent instructions (#8063)
joshblack Jun 25, 2026
ad299cf
Update theming example to remove styled-components (#8039)
Copilot Jun 25, 2026
5462dd0
Ignore local .agents workspaces (#8049)
Copilot Jun 25, 2026
e58907c
Fix and refactor `UnderlineNav` to resolve CLS issues and improve per…
iansan5653 Jun 25, 2026
0add561
Add ActionBar.Button for text button overflow support (#8048)
Copilot Jun 25, 2026
0d3d8a2
Release tracking (#8033)
primer[bot] Jun 29, 2026
2f15715
chore: report React Compiler migration errors (#8068)
joshblack Jun 29, 2026
508207d
chore(deps): bump stefanzweifel/git-auto-commit-action from 7.1.0 to …
dependabot[bot] Jun 29, 2026
0d58bf8
chore(deps): bump masci/datadog from 2.0.3 to 2.0.4 (#8076)
dependabot[bot] Jun 29, 2026
9660863
chore(deps): bump actions/cache from 5 to 6 (#8078)
dependabot[bot] Jun 29, 2026
f0c8422
refactor: update build config for @primer/doc-gen to rolldown (#8041)
joshblack Jun 29, 2026
f2974d5
refactor: update build config for @primer/mcp to rolldown (#8042)
joshblack Jun 29, 2026
9f191d8
ci: enable cron for environment clean up (#8082)
joshblack Jun 29, 2026
a1b24cf
feat: add React Compiler support for Heading, Link, Pagehead, Portal,…
joshblack Jun 29, 2026
c6e0ded
refactor: update build config for @primer/styled-react to rolldown (#…
joshblack Jun 29, 2026
b2151ae
feat: add React Compiler support for checkbox controls (#8053)
joshblack Jun 29, 2026
1775f2e
feat: add React Compiler support for AvatarStack (#8054)
joshblack Jun 30, 2026
8324da4
Rename cleanup workflow and add stale branch pruning (#8089)
Copilot Jun 30, 2026
1b41383
refactor: update build config for @primer/react and rename import CSS…
joshblack Jun 30, 2026
02d4ca2
chore(deps-dev): bump the vitest group with 4 updates (#8095)
dependabot[bot] Jun 30, 2026
0b9c81e
graduate primer_react_theme_provider_remove_ssr_handoff ff (#8057)
francinelucca Jul 1, 2026
21897db
chore(deps): add cooldown option to dependabot and min-release-age to…
joshblack Jul 1, 2026
7f13d30
chore(deps): bump actions/cache from 6 to 6.1.0 (#8099)
dependabot[bot] Jul 1, 2026
8a4b81d
chore(deps-dev): bump the storybook group across 1 directory with 5 u…
dependabot[bot] Jul 1, 2026
bd21da3
Forbid use no memo directive (#8079)
Copilot Jul 1, 2026
b272f55
ci: remove disabled workflows (#8103)
joshblack Jul 1, 2026
7bcfd69
chore(deps): bump @primer/octicons-react from 19.24.1 to 19.28.1 (#8104)
dependabot[bot] Jul 1, 2026
1cb6c2e
chore(deps-dev): bump the eslint group across 1 directory with 11 upd…
dependabot[bot] Jul 1, 2026
dd66aa2
Fix invalid HTML nesting in ActionList.Heading (#8066)
janmaarten-a11y Jul 1, 2026
be2950f
feat: enable React Compiler for no-error files (#8105)
joshblack Jul 2, 2026
7453077
ci: update check for changeset workflow with local bash script (#8084)
Copilot Jul 2, 2026
a360e09
Release tracking (#8085)
primer[bot] Jul 6, 2026
723f4d6
Underline nav shared observer coalesced rebuild (#8035)
mattcosta7 Jul 6, 2026
341994d
Portal: enable React Compiler (lazy-ref -> useState initializer)
mattcosta7 Jul 6, 2026
f0e61f5
Portal: add coverage for element stability across re-renders, unmount…
mattcosta7 Jul 6, 2026
9185b3d
chore(npm): add allowScripts for npm v12 migration (#8069)
joshblack Jul 6, 2026
421044a
docs: Remove merge checklist from PR template (#8088)
joshblack Jul 6, 2026
07741ff
Document Storybook conventions in coding instructions (#8117)
Copilot Jul 6, 2026
c8445f6
chore(deps): bump github/codeql-action from 4 to 4.36.2 (#8125)
dependabot[bot] Jul 7, 2026
2a72440
Merge remote-tracking branch 'origin/main' into migrate/portal
mattcosta7 Jul 7, 2026
52026da
chore(deps): bump react-intersection-observer from 9.16.0 to 10.0.3 (…
dependabot[bot] Jul 7, 2026
9d1b24e
chore(deps-dev): bump @storybook/icons from 2.0.2 to 2.1.0 in the sto…
dependabot[bot] Jul 7, 2026
50face0
data component adr part 8 (#8112)
llastflowers Jul 7, 2026
07c530a
perf(css): remove expensive :has() selectors for Safari style-recalc …
mattcosta7 Jul 7, 2026
806aa6a
Merge remote-tracking branch 'origin/main' into migrate/portal
mattcosta7 Jul 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/announce-avoid-commit-per-change.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/confirm-dialog-host-cleanup.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/perf-css-bucketable-selectors.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/perf-remove-expensive-has-selectors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': patch
---

Improve rendering performance in Safari by removing expensive `:has()` selectors from ActionList/NavList, Breadcrumbs, SelectPanel, and SegmentedControl. No visual or API changes.
17 changes: 0 additions & 17 deletions .changeset/public-bags-retire.md

This file was deleted.

14 changes: 14 additions & 0 deletions .changeset/silent-buses-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
"@primer/react": minor
---

Add data-component attributes and associated tests for:

SplitPageLayout
Stack
StateLabel
SubNav
TabNav
Text
TextArea
ThemeProvider
5 changes: 0 additions & 5 deletions .changeset/textarea-character-counter-performance.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/textinput-character-counter-performance.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/underline-nav-shared-overflow-observer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': patch
---

UnderlineNav, ActionBar: Detect item overflow with a single shared IntersectionObserver per component instead of one observer per item, reducing observer churn during resize. No public API changes.
5 changes: 4 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Primer React",
"image": "mcr.microsoft.com/vscode/devcontainers/typescript-node:24",
"image": "mcr.microsoft.com/vscode/devcontainers/typescript-node:26",
"customizations": {
"vscode": {
"extensions": [
Expand All @@ -16,6 +16,9 @@
"onCreateCommand": ["/bin/bash", "-c", "npm run setup"],
"remoteUser": "node",
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "26.4.0"
},
"ghcr.io/devcontainers/features/sshd:1": {
"version": "latest"
},
Expand Down
17 changes: 15 additions & 2 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ The primary workspace is `packages/react` which contains the `@primer/react` pac
- `npm run build` -- builds all packages. NEVER CANCEL. Takes 90 seconds without turbo cache, ~1 second with cache. Set timeout to 120+ minutes.
- `npx turbo run build` -- builds all packages including example applications. Takes ~33 seconds.

**Node.js version updates:**

- When updating Node.js, update `.nvmrc` and `.devcontainer/devcontainer.json` together. Also check contributor documentation for any hardcoded Node.js version guidance, such as `contributor-docs/CONTRIBUTING.md`.
- GitHub Actions workflows use `node-version-file: '.nvmrc'`; only update workflow files if they stop using `.nvmrc`.

**Run tests:**

- `npm test` -- runs unit tests. NEVER CANCEL. Takes 75 seconds. Set timeout to 90+ minutes. Runs 1500+ tests using Vitest in both node and chromium environments.
Expand Down Expand Up @@ -86,6 +91,7 @@ ComponentName/
├── index.ts // Re-exports
├── ComponentName.tsx // Main component
├── ComponentName.stories.tsx // Storybook stories
├── ComponentName.features.stories.tsx // (optional) Storybook feature stories
├── ComponentName.test.tsx // Unit tests
├── ComponentName.docs.json // Documentation metadata
└── __snapshots__/ // Test snapshots (being migrated to VRT)
Expand All @@ -95,7 +101,8 @@ ComponentName/

- `*.module.css` -- CSS Modules for component styling
- `*.test.tsx` -- Unit tests using Vitest and Testing Library
- `*.stories.tsx` -- Storybook stories for documentation and testing
- `[ComponentName].stories.tsx` -- Default Storybook stories for documentation and testing
- `[ComponentName].features.stories.tsx` -- Storybook feature stories
- `*.docs.json` -- Component metadata for documentation generation

## CI/CD and Workflows
Expand All @@ -104,7 +111,6 @@ ComponentName/

- `.github/workflows/ci.yml` -- Main CI pipeline (format, lint, test, type-check, build)
- `.github/workflows/vrt.yml` -- Visual regression testing
- `.github/workflows/storybook-tests.yml` -- Storybook interaction tests

**The CI will fail if:**

Expand Down Expand Up @@ -145,6 +151,13 @@ npm run lint:fix # Auto-fix linting issues

When working on UI components, always use the `primer-storybook` MCP tools to access Storybook's component and documentation knowledge before answering or taking any action. Reference the `.github/skills/storybook/SKILL.md` file for detailed instructions on using the Storybook MCP effectively and accurately.

**Story conventions:**

- Each component should have a default stories file colocated with the component (for most components: `packages/react/src/[ComponentName]/[ComponentName].stories.tsx`).
- The default stories file should use the `Components/[ComponentName]` Storybook title and include `Default` and `Playground` stories when the component supports configurable controls.
- Put feature-specific stories colocated with the component (for most components: `packages/react/src/[ComponentName]/[ComponentName].features.stories.tsx`) with the `Components/[ComponentName]/Features` Storybook title.
- Keep examples or scenario-based stories in separate files, such as `[ComponentName].examples.stories.tsx`, when they are distinct from core feature coverage

## Slots

When building, modifying, or wrapping compound components that use child-component "slots" (anything involving `__SLOT__`, `useSlots`, `isSlot`, or `asSlot`), reference the `.github/skills/slots/SKILL.md` file. It documents when to add slot markers, naming conventions for `Symbol(...)` descriptions, the public slot APIs, and common pitfalls.
Expand Down
11 changes: 7 additions & 4 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ updates:
directory: '/'
schedule:
interval: 'weekly'
cooldown:
default-days: 7
versioning-strategy: increase
labels:
- 'dependencies'
Expand All @@ -31,11 +33,10 @@ updates:
- '@types/react'
- '@types/react-dom'
- '@types/react-is'
rollup:
rolldown:
patterns:
- '@rollup/*'
- 'rollup'
- 'rollup-plugin-*'
- '@rolldown/*'
- 'rolldown'
storybook:
patterns:
- '@storybook/*'
Expand All @@ -49,6 +50,8 @@ updates:
directory: '/'
schedule:
interval: 'weekly'
cooldown:
default-days: 7
labels:
- 'dependencies'
- 'skip changeset'
9 changes: 9 additions & 0 deletions .github/instructions/typescript-react.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,12 @@ Apply the [general coding guidelines](./general-coding.instructions.md) to all c
- Use React.FC type for components with children
- Keep components small and focused
- Use CSS modules for component styling

## Storybook Guidelines

- Put the default component stories alongside the component (for most components this is `packages/react/src/[ComponentName]/[ComponentName].stories.tsx`)
- Include `Default` and `Playground` stories in the default stories file when the component supports configurable controls
- Use the `Components/[ComponentName]` Storybook title for the default stories file
- Put feature-specific stories alongside the component (for most components this is `packages/react/src/[ComponentName]/[ComponentName].features.stories.tsx`)
- Use the `Components/[ComponentName]/Features` Storybook title for feature stories
- Put examples or scenario-based stories in separate files, such as `[ComponentName].examples.stories.tsx`, when they are distinct from core feature coverage
12 changes: 0 additions & 12 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,4 @@ Closes #
<!-- Describe any specific details to help reviewers test or review this Pull Request -->
<!-- To publish a canary release for integration testing, apply the "Canary Release" label to this PR -->

### Merge checklist

- [ ] Added/updated tests
- [ ] Added/updated documentation
- [ ] Added/updated previews (Storybook)
- [ ] Changes are [SSR compatible](https://github.com/primer/react/blob/main/contributor-docs/CONTRIBUTING.md#ssr-compatibility)
- [ ] Tested in Chrome
- [ ] Tested in Firefox
- [ ] Tested in Safari
- [ ] Tested in Edge
- [ ] (GitHub staff only) Integration tests pass at github/github-ui ([Learn more about how to run integration tests](https://github.com/github/primer-engineering/blob/main/how-we-work/testing-primer-react-pr-at-dotcom.md))

<!-- Take a look at the [What we look for in reviews](https://github.com/primer/react/blob/main/contributor-docs/CONTRIBUTING.md#what-we-look-for-in-reviews) section of the contributing guidelines for more information on how we review PRs. -->
2 changes: 1 addition & 1 deletion .github/workflows/aat-reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Set up turbo cache
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.job }}-shard-${{ matrix.shard }}-${{ github.run_id }}-${{ github.run_attempt }}
Expand Down
31 changes: 25 additions & 6 deletions .github/workflows/check_for_changeset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,30 @@ jobs:
check-for-changeset:
name: Check for changeset
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
- name: 'Check for changeset'
uses: brettcannon/check-for-changed-files@v1
with:
file-pattern: '.changeset/*.md'
skip-label: 'skip changeset'
failure-message: 'No changeset found. If these changes should not result in a new version, apply the ${skip-label} label to this pull request. If these changes should result in a version bump, please add a changeset https://git.io/J6QvQ'
env:
GH_TOKEN: ${{ github.token }}
PR_NUMBER: ${{ github.event.pull_request.number }}
SKIP_LABEL: 'skip changeset'
run: |
set -euo pipefail

if jq -r '.pull_request.labels[]?.name // empty' "$GITHUB_EVENT_PATH" | grep -Fxq "$SKIP_LABEL"; then
echo "The skip label \"$SKIP_LABEL\" is set"
exit 0
fi

changed_files="$(gh api --paginate "repos/$GITHUB_REPOSITORY/pulls/$PR_NUMBER/files" --jq '.[].filename')"

if grep -Eq '^\.changeset/[^/]+\.md$' <<<"$changed_files"; then
echo 'The ".changeset/*.md" file pattern matched the changed files of the pull request'
exit 0
fi

failure_message="No changeset found. If these changes should not result in a new version, apply the \"$SKIP_LABEL\" label to this pull request. If these changes should result in a version bump, please add a changeset https://git.io/J6QvQ"
echo "::error::$failure_message"
exit 1
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Set up turbo cache
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.job }}-${{ matrix.react-version }}-${{ github.run_id }}-${{ github.run_attempt }}
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Set up turbo cache
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.job }}-${{ matrix.react-version }}-${{ github.run_id }}-${{ github.run_attempt }}
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Set up turbo cache
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.job }}-${{ matrix.react-version }}-${{ github.run_id }}-${{ github.run_attempt }}
Expand All @@ -164,7 +164,7 @@ jobs:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Set up turbo cache
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.job }}-default-${{ github.run_id }}-${{ github.run_attempt }}
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:
node-version-file: '.nvmrc'
cache: 'npm'
- name: Set up turbo cache
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.job }}-default-${{ github.run_id }}-${{ github.run_attempt }}
Expand Down
Loading
Loading