Skip to content

Conversation

joshblack
Copy link
Member

Closes https://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.

@Copilot Copilot AI review requested due to automatic review settings August 15, 2025 18:14
@joshblack joshblack requested a review from a team as a code owner August 15, 2025 18:14
@joshblack joshblack requested a review from pksjce August 15, 2025 18:14
Copy link

changeset-bot bot commented Aug 15, 2025

🦋 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
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

@joshblack joshblack requested a review from llastflowers August 15, 2025 18:14
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 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
File Description
packages/styled-react/src/index.ts Adds Avatar component with sx support via styled wrapper
packages/react/src/Avatar/Avatar.tsx Removes sx prop support and simplifies component implementation
packages/react/src/Avatar/Avatar.test.tsx Removes test case for sx prop functionality
packages/react/src/Avatar/Avatar.stories.tsx Removes sx prop from Storybook controls
.changeset/seven-cameras-act.md Documents 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-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 Aug 15, 2025
Copy link
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!

Copy link
Contributor

github-actions bot commented Aug 15, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 90.29 KB (+0.02% 🔺)
packages/react/dist/browser.umd.js 90.49 KB (+0.04% 🔺)

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

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

@primer-integration
Copy link

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

@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 Sep 25, 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 1, 2025
Copy link
Contributor

github-actions bot commented Oct 1, 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 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-queue bot 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 queue Oct 1, 2025
Merged via the queue into main with commit 15c1eb7 Oct 1, 2025
40 of 41 checks passed
@francinelucca francinelucca deleted the refactor/remove-sx-from-avatar branch October 1, 2025 12:30
@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: passing Changes in this PR do NOT 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.

4 participants