Skip to content
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

chore: add deprecation notice to userprofileimage #6223

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: remove migration docs
davidmenendez committed Jan 2, 2025
commit 7497bed5674eb1f9f0dfb621771234399e447b4d
19 changes: 0 additions & 19 deletions packages/ibm-products/src/components/UserAvatar/UserAvatar.mdx
Copy link
Contributor

Choose a reason for hiding this comment

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

@anamikaanu96 thoughts on adding some docs on the codemod here? :)

Copy link
Contributor

Choose a reason for hiding this comment

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

yea we already have an issue for that, we can do codemod doc along this with PR,
"This component is deprecated and will be removed in the next major version. You can migrate this component to 'User avatar' using the below command"
npx @carbon/upgrade migrate ibm-products-update-userprofileimage --write

Original file line number Diff line number Diff line change
@@ -11,25 +11,6 @@ import * as UserAvatarStories from './UserAvatar.stories';
- [Example usage](#example-usage)
- [Component API](#component-api)

## Migration from `UserProfileImage`

If you are currently using `UserProfileImage` you can use the following guide to
migrate to the newer `UserAvatar` component.

The following props have been updated in `UserAvatar`:

`icon` has been replaced with `renderIcon`

`backgroundColor` remains the same but the values have changed. To see the new
values please refer to the component API table below.

`initials` has been replaced with `name`. Please refer to the component API
table below to see the new specifications.

`sm` has been removed from the options for `size`

`theme` and `kind` have been removed

{/* TODO: Overview. */}

## Note on theming
Original file line number Diff line number Diff line change
@@ -78,7 +78,8 @@ export default {
text={
<div>
This component is deprecated and will be removed in the next major
version. Please migrate to {/* cspell:disable-next-line */}
version. Please migrate to
{/* cspell:disable-next-line */}
<a href="/?path=/docs/ibm-products-components-user-avatar-useravatar--docs">
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<a href="/?path=/docs/ibm-products-components-user-avatar-useravatar--docs">
{/* cspell:disable-next-line */}
<a href="/?path=/docs/ibm-products-components-user-avatar-useravatar--docs">

UserAvatar
</a>