feat: add React Compiler support for more components#8055
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🦋 Changeset detectedLatest commit: 47df1c7 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
There was a problem hiding this comment.
Pull request overview
This PR expands the set of @primer/react components that are eligible for React Compiler by removing them from the opt-out (“unsupported”) list, and adds a patch changeset to communicate the performance improvement in the next release.
Changes:
- Removed Autocomplete, Banner, Button, ConfirmationDialog, Dialog, PageLayout, Pagination, UnderlineNav, and experimental SelectPanel2 from the React Compiler unsupported patterns list.
- Added a patch changeset describing the rendering performance improvement from React Compiler enablement.
Show a summary per file
| File | Description |
|---|---|
| packages/react/script/react-compiler.mjs | Updates the unsupported glob list so additional components are included in React Compiler transforms. |
| .changeset/react-compiler-components.md | Adds a patch changeset documenting the performance improvement for the newly-enabled components. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 0
Closes N/A
Changelog
New
N/A
Changed
Removed
N/A
Rollout strategy
Testing & Reviewing
npx eslint --no-cache packages/react/src/Autocomplete/**/*.{ts,tsx} packages/react/src/Banner/**/*.{ts,tsx} packages/react/src/Button/**/*.{ts,tsx} packages/react/src/ConfirmationDialog/**/*.{ts,tsx} packages/react/src/Dialog/**/*.{ts,tsx} packages/react/src/PageLayout/**/*.{ts,tsx} packages/react/src/Pagination/**/*.{ts,tsx} packages/react/src/UnderlineNav/**/*.{ts,tsx} packages/react/src/experimental/SelectPanel2/**/*.{ts,tsx}npm run build && npm test -- --run && npm run type-check && npm run lint && npm run lint:css && npm run format:diffhttp://localhost:6006.ActionMenu, SelectPanel, and TooltipV2 were intentionally left on the ignore list because their focused tests fail after enabling React Compiler and should be migrated in separate PRs with code changes.
Merge checklist