Skip to content

refactor(Avatar): remove support for sx prop - #6611

Merged
francinelucca merged 9 commits into
mainfrom
refactor/remove-sx-from-avatar
Oct 1, 2025
Merged

refactor(Avatar): remove support for sx prop#6611
francinelucca merged 9 commits into
mainfrom
refactor/remove-sx-from-avatar

Conversation

@joshblack

Copy link
Copy Markdown
Member

Closeshttps://github.com/github/primer/issues/5726

Changelog

New

Changed

Removed

  • Remove support for sx from the Avatar component

Rollout strategy

  • Major release; if selected, include a written rollout or migration plan

We are using the @primer/styled-react component to mitigate removing sx usage. We will make sure usage is updated upstream before merging.

CopilotAI review requested due to automatic review settings August 15, 2025 18:14
@joshblack
joshblack requested a review from a team as a code ownerAugust 15, 2025 18:14
@joshblack
joshblack requested a review from pksjceAugust 15, 2025 18:14
@changeset-bot

changeset-botBot commented Aug 15, 2025

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2afa27d

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

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 removes the sx prop support from the Avatar component as part of a major refactoring effort. The change migrates styling capabilities to the @primer/styled-react package to maintain backward compatibility while modernizing the core component.

  • Removes sx prop from Avatar component interface and implementation
  • Adds a styled wrapper version of Avatar to @primer/styled-react package
  • Updates tests and stories to reflect the removed functionality

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.

Show a summary per file
FileDescription
packages/styled-react/src/index.tsAdds Avatar component with sx support via styled wrapper
packages/react/src/Avatar/Avatar.tsxRemoves sx prop support and simplifies component implementation
packages/react/src/Avatar/Avatar.test.tsxRemoves test case for sx prop functionality
packages/react/src/Avatar/Avatar.stories.tsxRemoves sx prop from Storybook controls
.changeset/seven-cameras-act.mdDocuments breaking change and migration strategy

You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

@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 Aug 15, 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!

@github-actions

github-actionsBot commented Aug 15, 2025

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
packages/react/dist/browser.esm.js90.29 KB (+0.02% 🔺)
packages/react/dist/browser.umd.js90.49 KB (+0.04% 🔺)

@github-actions
github-actionsBottemporarily deployed to storybook-preview-6611 September 17, 2025 20:54 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 Sep 17, 2025
@github-actions
github-actionsBottemporarily deployed to storybook-preview-6611 September 17, 2025 21:05 Inactive
@joshblack

Copy link
Copy Markdown
MemberAuthor

Waiting for: https://github.com/github/github-ui/pull/2823 to merge

@primer-integration

Copy link
Copy Markdown

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

@primer-integration

Copy link
Copy Markdown

🟢 ci completed with status success.

@github-actionsgithub-actionsBot 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 Sep 25, 2025
@github-actionsgithub-actionsBot added the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Oct 1, 2025
@github-actions

Copy link
Copy Markdown
Contributor

👋 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-actionsgithub-actionsBot removed the integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm label Oct 1, 2025
@github-merge-queue
github-merge-queueBot removed this pull request from the merge queue due to failed status checks Oct 1, 2025
@francinelucca
francinelucca added this pull request to the merge queueOct 1, 2025
Merged via the queue into main with commit 15c1eb7Oct 1, 2025
40 of 41 checks passed
@francinelucca
francinelucca deleted the refactor/remove-sx-from-avatar branch October 1, 2025 12:30
@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: passingChanges in this PR do NOT cause breaking changes in gh/ghstaffAuthor is a staff member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@joshblack@francinelucca@jonrohan@pksjce