Skip to content

Conversation

francinelucca
Copy link
Member

Found some components that were missing slots during testing

Changelog

New

  • Add slot check and SLOT property to missing components that need it

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Merge checklist

@francinelucca francinelucca requested a review from a team as a code owner October 13, 2025 18:38
Copy link

changeset-bot bot commented Oct 13, 2025

🦋 Changeset detected

Latest commit: 0349e9d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@primer/react Patch
@primer/styled-react Patch

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

@github-actions github-actions bot added the staff Author is a staff member label Oct 13, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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

@github-actions github-actions bot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Oct 13, 2025
Copy link
Contributor

👋 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!

@github-actions github-actions bot requested a deployment to storybook-preview-6996 October 13, 2025 18:41 Abandoned
@primer-integration
Copy link

👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/4481

@github-actions github-actions bot added integration-tests: failing Changes in this PR cause breaking changes in gh/gh and removed integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Oct 13, 2025
@primer-integration
Copy link

🟢 ci completed with status success.

@github-actions github-actions bot added integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh and removed integration-tests: failing Changes in this PR cause breaking changes in gh/gh labels Oct 13, 2025
@francinelucca francinelucca merged commit 173f76d into main Oct 13, 2025
43 checks passed
@francinelucca francinelucca deleted the chore/add-missing-slot-checks branch October 13, 2025 19:21
@primer primer bot mentioned this pull request Oct 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh staff Author is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants