-
Notifications
You must be signed in to change notification settings - Fork 625
Deprecate AvatarPair component - move to @primer/react/deprecated while maintaining backward compatibility #6468
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
Deprecate AvatarPair component - move to @primer/react/deprecated while maintaining backward compatibility #6468
Conversation
🦋 Changeset detectedLatest commit: ab977f5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Co-authored-by: pksjce <[email protected]>
👋 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! |
@copilot - Remove usage of |
size-limit report 📦
|
@copilot - Update imports in all the files in AvatarPair |
Co-authored-by: pksjce <[email protected]>
Completed! I've removed all usage of
The AvatarPair component itself remains available in the deprecated exports for users who need it. Commit: 0857415 |
}, | ||
], | ||
}, | ||
], |
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.
Should we do this now or when we remove the component?
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.
I removed the AvatarPair entry from the e2e test generation script as part of deprecation since we're removing all internal usage. This helps maintain consistency - the component is deprecated and should not have new e2e tests generated. Commit: 3b760cb
results.json
Outdated
@@ -0,0 +1 @@ | |||
[] |
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.
Delete this file
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.
Deleted the results.json file as requested. Commit: 3b760cb
Deprecate AvatarPair component and move to @primer/react/deprecated
Co-authored-by: pksjce <[email protected]>
Fixed! I've updated all the incorrect import paths in the AvatarPair files:
All files now have correct import paths after the component was moved to the deprecated folder. Build and TypeScript checks pass successfully. Commit: dc6ee83 |
@@ -0,0 +1,5 @@ | |||
--- | |||
"@primer/react": minor |
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.
I think this is a major if we're no longer exporting through the main entrypoint
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.
hmmm major would be removing it from the codebase no? But I get it. How does this go into v38 then?
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.
@copilot - Export AvatarPair from both deprecated and main package so that we don't make a breaking change. Merge latest into the PR before you do this.
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.
Added AvatarPair exports to both the main package and deprecated package to avoid breaking changes. The component is now available from both import paths:
import { AvatarPair } from '@primer/react'
(with deprecation warning)import { AvatarPair } from '@primer/react/deprecated'
(with deprecation warning)
This allows existing users to continue using their current import path without breaking changes while still providing deprecation warnings. Commit: f527ee9
…f8e6-4b27-89f4-f89e53bd5015 # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
…aking change Co-authored-by: pksjce <[email protected]>
@copilot - Update snapshots |
Co-authored-by: pksjce <[email protected]>
This PR deprecates the
AvatarPair
component by moving it to the deprecated exports location, adding appropriate deprecation warnings, and removing all internal usage of the component within the repository. The component remains available from both the main package and deprecated package to avoid breaking changes.Changes Made
Component Migration
src/AvatarPair/
→src/deprecated/AvatarPair/
../../Avatar
,../../SkeletonAvatar
)@deprecated
JSDoc comments to both the component and prop typesExport Updates
AvatarPair
exports tosrc/deprecated/index.ts
with deprecation commentsAvatarPair
exports to mainsrc/index.ts
with deprecation comment to maintain backward compatibilityInternal Usage Removal
InAnAvatarPair
story from SkeletonAvatar featuresDeprecation Notices
Both the component and its prop types include deprecation warnings:
Migration Path for Users
Current (no breaking change):
Alternative (explicit deprecated import):
Users can continue using their existing import paths without any breaking changes, but will receive TypeScript/IDE deprecation warnings guiding them to the migration issue for alternatives.
Validation
Closes https://github.com/github/primer/issues/5533
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.