feat: add React Compiler support for SelectPanel#8059
Conversation
🦋 Changeset detectedLatest commit: 8a714f3 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 |
|
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
14355bb to
8a714f3
Compare
There was a problem hiding this comment.
Pull request overview
This pull request enables React Compiler support for SelectPanel by removing it from the compiler unsupported list and adjusting the empty-state test fixture to model the component’s “initial load” behavior in a compiler-compatible way.
Changes:
- Removed
SelectPanelfrom the React CompilerunsupportedPatternslist so it can be compiled. - Updated the “no items after initial load” test fixture to update
itemsvia state in response to the initialonFilterChangecall, allowingSelectPanel’s internal “data loaded once” logic to complete. - Simplified the empty-state assertion flow by moving the click outside of
waitForand using a non-asyncwaitForcallback.
Show a summary per file
| File | Description |
|---|---|
| packages/react/src/SelectPanel/SelectPanel.test.tsx | Updates the empty-state test fixture to trigger an items identity change on initial load and adjusts waitFor usage for compiler-compatible async behavior. |
| packages/react/script/react-compiler.mjs | Removes src/SelectPanel/**/*.tsx from the React Compiler unsupported list. |
| .changeset/react-compiler-select-panel.md | Adds a patch changeset announcing React Compiler support for SelectPanel. |
Review details
- Files reviewed: 3/3 changed files
- Comments generated: 0
- Review effort level: Low
|
Integration test results from github/github-ui PR:
CI check runs linting, type checking, and unit tests. Check the workflow logs for specific failures. Need help? If you believe this failure is unrelated to your changes, please reach out to the Primer team for assistance. |
Closes #
Adds React Compiler support for SelectPanel by removing it from the compiler unsupported list. Updates the empty-state test fixture so it models an async empty load completing under compiler-enabled tests.
Changelog
New
Changed
Removed
Rollout strategy
Testing & Reviewing
npx eslint --no-cache packages/react/src/SelectPanel/**/*.{ts,tsx}npm test -- --run packages/react/src/SelectPanel/SelectPanel.test.tsx packages/react/src/SelectPanel/SelectPanel.types.test.tsxnpm run build && npm test -- --run && npm run type-check && npm run lint && npm run lint:css && npm run format:diffMerge checklist