Skip to content

forward Underline.Tab, Underline.Panels from @primer/react - #6931

Merged
francinelucca merged 13 commits into
mainfrom
fix/revert-underlinepanels-change
Oct 1, 2025
Merged

forward Underline.Tab, Underline.Panels from @primer/react#6931
francinelucca merged 13 commits into
mainfrom
fix/revert-underlinepanels-change

Conversation

@francinelucca

@francineluccafrancinelucca commented Oct 1, 2025

Copy link
Copy Markdown
Member

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

@changeset-bot

changeset-botBot commented Oct 1, 2025

Copy link
Copy Markdown

🦋 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
NameType
@primer/reactMajor
@primer/styled-reactMajor

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-actionsgithub-actionsBot 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
@github-actions

Copy link
Copy Markdown
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!

@francineluccafrancinelucca added the skip changeset This change does not need a changelog label Oct 1, 2025
@github-actions
github-actionsBot requested a deployment to storybook-preview-6931 October 1, 2025 04:11 Abandoned
@github-actions
github-actionsBottemporarily deployed to storybook-preview-6931 October 1, 2025 04:24 Inactive
@francineluccafrancinelucca removed the skip changeset This change does not need a changelog label Oct 1, 2025
@github-actions
github-actionsBot requested a deployment to storybook-preview-6931 October 1, 2025 05:00 Abandoned
@francineluccafrancinelucca changed the title Revert "Remove sx from UnderlinePanels (#6874)"forward Underline.Tab, Underline.Panels from @primer/reactOct 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 ownerOctober 1, 2025 05:08

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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
FileDescription
packages/styled-react/src/experimental.tsxMinor reordering of export statements
packages/styled-react/src/components/UnderlinePanels.tsxRemoves wrapped subcomponents and forwards directly from @primer/react
packages/styled-react/src/tests/primer-react-experimental.browser.test.tsxRemoves test for sx prop support on UnderlinePanels.Panel
packages/react/src/experimental/UnderlinePanels/UnderlinePanels.tsxUpdates child type comparison logic to use direct component references
.changeset/rude-windows-bathe.mdAdds changelog entry for the changes

Comment thread.changeset/rude-windows-bathe.md Outdated
@github-actions
github-actionsBottemporarily deployed to storybook-preview-6931 October 1, 2025 05:08 Inactive
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions
github-actionsBot requested a deployment to storybook-preview-6931 October 1, 2025 05:13 Abandoned
@primer-integration

Copy link
Copy Markdown

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

@github-actions
github-actionsBottemporarily deployed to storybook-preview-6931 October 1, 2025 05:21 Inactive
@github-actionsgithub-actionsBot 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

Copy link
Copy Markdown
MemberAuthor

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

@francinelucca
francinelucca added this pull request to the merge queueOct 1, 2025
@primer-integration

Copy link
Copy Markdown

🔴 ci completed with status failure.

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

Labels

integration-tests: failingChanges in this PR cause breaking changes in gh/ghstaffAuthor is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@francinelucca@pksjce