Skip to content

Conversation

@francinelucca
Copy link
Member

@francinelucca francinelucca commented Oct 8, 2025

Fixes issue where size=... prop was being overriden by styled-system theme and causing unintended styles

Changelog

Changed

  • use styled() wrapper in @primer/styled-react instead of <Box ...> wrapper for Label, Spinner and Token

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

changeset-bot bot commented Oct 8, 2025

🦋 Changeset detected

Latest commit: 894e600

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

This PR includes changesets to release 1 package
Name Type
@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

@primer-integration
Copy link

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

@github-actions github-actions bot added the integration-tests: failing Changes in this PR cause breaking changes in gh/gh label Oct 8, 2025
@primer-integration
Copy link

🔴 ci completed with status failure.

Copy link
Contributor

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 replaces the Box wrapper with styled() wrapper for three components (Label, Spinner, and Token) in the @primer/styled-react package to fix an issue where the size prop was being overridden by styled-system theme causing unintended styles.

  • Refactored Token component from manual sx prop handling to styled-components wrapper
  • Simplified Spinner component from Box wrapper to direct styled-components wrapper
  • Updated Label component to use styled() instead of Box wrapper

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
packages/styled-react/src/components/Token.tsx Replaced manual sx prop handling with styled-components wrapper, simplified implementation
packages/styled-react/src/components/Spinner.tsx Changed from Box wrapper to direct styled-components wrapper
packages/styled-react/src/components/Label.tsx Updated to use styled() instead of Box wrapper
.changeset/purple-waves-pay.md Added changeset entry for patch release

@francinelucca francinelucca added this pull request to the merge queue Oct 8, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 8, 2025
@francinelucca francinelucca added this pull request to the merge queue Oct 8, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 8, 2025
@francinelucca francinelucca added this pull request to the merge queue Oct 8, 2025
Merged via the queue into main with commit 662fb52 Oct 8, 2025
61 of 70 checks passed
@francinelucca francinelucca deleted the chore/refactor-wrappers branch October 8, 2025 13:13
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.

3 participants