-
Notifications
You must be signed in to change notification settings - Fork 638
chore: add missing slot checks #6996
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 0349e9d The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds missing slot checks to ensure components properly detect their child elements when used within Primer React's slot system. The slot system allows components to be wrapped while maintaining proper type detection for composition patterns.
- Adds
isSlot
checks alongside existing type checks for child element detection - Adds
__SLOT__
symbol properties to components that were missing them - Updates TypeScript types to include
FCWithSlotMarker
where needed
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
packages/react/src/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.tsx | Adds slot checks for Label, Validation, and Caption child detection |
packages/react/src/experimental/SelectPanel2/SelectPanel.tsx | Adds slot support for SelectPanelButton with type annotations and symbol |
packages/react/src/TreeView/TreeView.tsx | Adds slot checks for SubTree component and updates type annotations |
packages/react/src/SegmentedControl/SegmentedControl.tsx | Adds slot check for Button child detection in text extraction logic |
packages/react/src/PageHeader/PageHeader.tsx | Adds slot checks for ContextArea and LeadingAction components with proper annotations |
packages/react/src/ActionMenu/ActionMenu.tsx | Adds comprehensive slot checks for MenuButton and Anchor child detection |
👋 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. Thanks! |
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/4481 |
🟢 ci completed with status |
Found some components that were missing slots during testing
Changelog
New
Rollout strategy
Testing & Reviewing
Merge checklist