-
Notifications
You must be signed in to change notification settings - Fork 638
refactor(Avatar): remove support for sx prop #6611
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🦋 Changeset detectedLatest commit: 2afa27d The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
There was a problem hiding this 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.
👋 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! |
size-limit report 📦
|
Waiting for: https://github.com/github/github-ui/pull/2823 to merge |
👋 Hi from github/github-ui! Your integration PR is ready: https://github.com/github/github-ui/pull/3350 |
🟢 ci completed with status |
👋 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! |
Closes https://github.com/github/primer/issues/5726
Changelog
New
Changed
Removed
sx
from the Avatar componentRollout strategy
We are using the
@primer/styled-react
component to mitigate removingsx
usage. We will make sure usage is updated upstream before merging.