Skip to content

Conversation

francinelucca
Copy link
Member

@francinelucca francinelucca commented Oct 1, 2025

wrapped subcomponents wont work well for UnderlinePanels due to the child type comparison, modifying to forward the original UnderlinePanels.Tab and UnderlinePanels.Panel from @primer/react.

There's no need to support sx in these subcomponents since we currently have no usage of it so this solution works fine (see https://primer-query.githubapp.com/?query=name%3A%22UnderlinePanels.Tab%22+attribute%3A%22sx%22, https://primer-query.githubapp.com/?query=name%3A%22UnderlinePanels.Panel%22+attribute%3A%22sx%22)

Changelog

New

Changed

  • Modify @primer/styled-react version of UnderlinePanels to forward subcomponents directly from @primer/react instead of wrapping
  • re-added old child.type comparison logic to @primer/react UnderlinePanels

Removed

  • sx prop test for UnderlinePanels.Panel

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

Copy link

changeset-bot bot commented Oct 1, 2025

🦋 Changeset detected

Latest commit: 2c7b3b0

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 Major
@primer/styled-react Major

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 staff Author is a staff member integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Oct 1, 2025
Copy link
Contributor

github-actions bot commented Oct 1, 2025

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

@francinelucca francinelucca added the skip changeset This change does not need a changelog label Oct 1, 2025
@github-actions github-actions bot requested a deployment to storybook-preview-6931 October 1, 2025 04:11 Abandoned
@github-actions github-actions bot temporarily deployed to storybook-preview-6931 October 1, 2025 04:24 Inactive
@francinelucca francinelucca removed the skip changeset This change does not need a changelog label Oct 1, 2025
@github-actions github-actions bot requested a deployment to storybook-preview-6931 October 1, 2025 05:00 Abandoned
@francinelucca francinelucca changed the title Revert "Remove sx from UnderlinePanels (#6874)" forward Underline.Tab, Underline.Panels from @primer/react Oct 1, 2025
@francinelucca francinelucca marked this pull request as ready for review October 1, 2025 05:08
@francinelucca francinelucca requested a review from a team as a code owner October 1, 2025 05:08
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 modifies the UnderlinePanels component in the styled-react package to forward subcomponents directly from @primer/react instead of wrapping them with styled-components. The change addresses issues with wrapped subcomponents not working well due to child type comparison logic.

  • Removes wrapped Tab and Panel components from styled-react and forwards them directly from @primer/react
  • Updates @primer/react UnderlinePanels to use direct component type comparison instead of displayName checks
  • Removes sx prop support from subcomponents as it's not currently used

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/styled-react/src/experimental.tsx Minor reordering of export statements
packages/styled-react/src/components/UnderlinePanels.tsx Removes wrapped subcomponents and forwards directly from @primer/react
packages/styled-react/src/tests/primer-react-experimental.browser.test.tsx Removes test for sx prop support on UnderlinePanels.Panel
packages/react/src/experimental/UnderlinePanels/UnderlinePanels.tsx Updates child type comparison logic to use direct component references
.changeset/rude-windows-bathe.md Adds changelog entry for the changes

@github-actions github-actions bot temporarily deployed to storybook-preview-6931 October 1, 2025 05:08 Inactive
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions github-actions bot requested a deployment to storybook-preview-6931 October 1, 2025 05:13 Abandoned
@primer-integration
Copy link

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

@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 1, 2025
@francinelucca francinelucca requested a review from pksjce October 1, 2025 05:40
@francinelucca
Copy link
Member Author

seeing the reported failure on other branches, unrelated to these changes

@francinelucca francinelucca added this pull request to the merge queue Oct 1, 2025
@primer-integration
Copy link

🔴 ci completed with status failure.

Merged via the queue into main with commit d5c5ecf Oct 1, 2025
42 of 43 checks passed
@francinelucca francinelucca deleted the fix/revert-underlinepanels-change branch October 1, 2025 05:52
@primer primer bot mentioned this pull request Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integration-tests: failing Changes in this PR 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.

2 participants