Skip to content

Conversation

francinelucca
Copy link
Member

@francinelucca francinelucca commented Oct 4, 2025

Removes sx from Octicon component and exports styled wrapper from styled-react

Changelog

New

  • Octicon styled-component wrapper in @primer/styled-react

Changed

Removed

  • sx support for Octicon
  • Update documentation and tests in lieu of Octicon sx removal change

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 4, 2025

🦋 Changeset detected

Latest commit: 4ac195e

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 the staff Author is a staff member label Oct 4, 2025
Copy link
Contributor

github-actions bot commented Oct 4, 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!

@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 4, 2025
@github-actions github-actions bot requested a deployment to storybook-preview-6945 October 4, 2025 17:47 Abandoned
@primer-integration
Copy link

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

@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 4, 2025
@github-actions github-actions bot temporarily deployed to storybook-preview-6945 October 4, 2025 17:55 Inactive
@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 4, 2025
@francinelucca francinelucca marked this pull request as ready for review October 6, 2025 12:03
@francinelucca francinelucca requested a review from a team as a code owner October 6, 2025 12:03
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 removes the sx prop from the Octicon component as part of a migration away from styled-components. The change replaces inline sx styling with CSS modules for improved performance and consistency.

Key Changes

  • Removed sx prop support from the main Octicon component in @primer/react
  • Added a styled-components wrapper for backward compatibility in @primer/styled-react
  • Migrated all usage from sx props to CSS classes throughout the codebase

Reviewed Changes

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

Show a summary per file
File Description
packages/react/src/Octicon/Octicon.tsx Simplified component by removing styled-components and sx prop support
packages/styled-react/src/components/Octicon.tsx Added styled wrapper to maintain sx prop compatibility for legacy package
packages/styled-react/src/deprecated.tsx Updated export to use local Octicon wrapper instead of deprecated one
Multiple story files Replaced sx props with CSS module classes for styling
Multiple CSS module files Added CSS classes to replace inline sx styling
packages/react/src/StateLabel/StateLabel.tsx Replaced width prop with data attribute for conditional styling

@francinelucca francinelucca requested a review from Copilot October 6, 2025 12:05
Copy link
Contributor

github-actions bot commented Oct 6, 2025

👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks!

@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 6, 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

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

@github-actions github-actions bot temporarily deployed to storybook-preview-6945 October 6, 2025 12:14 Inactive
@francinelucca francinelucca added the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Oct 6, 2025
@primer primer bot requested a review from a team as a code owner October 6, 2025 17:10
@francinelucca francinelucca added the update snapshots 🤖 Command that updates VRT snapshots on the pull request label Oct 6, 2025
@github-actions github-actions bot added integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm and removed update snapshots 🤖 Command that updates VRT snapshots on the pull request integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Oct 6, 2025
Copy link
Contributor

github-actions bot commented Oct 6, 2025

👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks!

@github-actions github-actions bot temporarily deployed to storybook-preview-6945 October 6, 2025 18:52 Inactive
@github-actions github-actions bot added integration-tests: failing Changes in this PR cause breaking changes in gh/gh and removed integration-tests: passing Changes in this PR do NOT cause breaking changes in gh/gh integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Oct 6, 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 6, 2025
Copy link
Member

@siddharthkp siddharthkp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pew pew pew

Copy link
Member

@siddharthkp siddharthkp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of the visual diffs look suspicious, otherwise all good

Approving in advance

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whoop, this diff looks suspicious

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approved it with @langermank! We had some styles that weren't being correctly applied in styles components, so when I migrated I inadvertently "fixed" them

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah perfect

@francinelucca francinelucca added this pull request to the merge queue Oct 6, 2025
@francinelucca francinelucca removed this pull request from the merge queue due to a manual request Oct 6, 2025
@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 6, 2025
Copy link
Contributor

github-actions bot commented Oct 6, 2025

👋 Hi, there are new commits since the last successful integration test. We recommend running the integration workflow once more, unless you are sure the new changes do not affect github/github. Thanks!

@francinelucca francinelucca added this pull request to the merge queue Oct 6, 2025
Merged via the queue into main with commit 1c84c0f Oct 6, 2025
40 of 41 checks passed
@francinelucca francinelucca deleted the chore/remove-sx-from-octicon branch October 6, 2025 21:28
@primer primer bot mentioned this pull request Oct 6, 2025
pksjce pushed a commit that referenced this pull request Oct 7, 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 integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm staff Author is a staff member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants