-
Notifications
You must be signed in to change notification settings - Fork 139
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
base: main
Are you sure you want to change the base?
Changes from 8 commits
2db6112
76f1ae2
4ed0092
e138497
730fedf
77aaa76
3c1c433
1768523
4ae822b
428c590
80578cb
5208539
805df30
f9ad957
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @anamikaanu96 thoughts on adding some docs on the codemod here? :) There was a problem hiding this comment. Choose a reason for hiding this commentThe 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, |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -1,3 +1,4 @@ | ||||
/* cSpell:disable */ | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
I would just disable the next line in this case too, but you could alternatively do ...
|
||||
/** | ||||
* Copyright IBM Corp. 2024 | ||||
* | ||||
|
@@ -11,6 +12,7 @@ import * as stories from './UserProfileImage.stories'; | |||
|
||||
const DocsPage = () => ( | ||||
<StoryDocsPage | ||||
deprecationNotice="This component is deprecated and will be removed in the next major version. Please migrate to [UserAvatar](?path=/docs/experimental-components-user-avatar-useravatar--docs#migration-from-userprofileimage)." | ||||
blocks={[ | ||||
{ | ||||
story: stories.Default, | ||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -9,6 +9,7 @@ import React from 'react'; | |||||
import { UserProfileImage } from '.'; | ||||||
import image from './headshot.jpg'; // cspell:disable-line | ||||||
import DocsPage from './UserProfileImage.docs-page'; | ||||||
import { Annotation } from '../../../../core/.storybook/Annotation'; | ||||||
|
||||||
// import styles from './_storybook.scss'; // import storybook which includes component and additional storybook styles | ||||||
|
||||||
|
@@ -19,7 +20,7 @@ const defaultArgs = { | |||||
}; | ||||||
|
||||||
export default { | ||||||
title: 'IBM Products/Patterns/User profile images/UserProfileImage', | ||||||
title: 'Deprecated/User profile images/UserProfileImage', | ||||||
component: UserProfileImage, | ||||||
tags: ['autodocs'], | ||||||
argTypes: { | ||||||
|
@@ -69,6 +70,27 @@ export default { | |||||
page: DocsPage, | ||||||
}, | ||||||
}, | ||||||
decorators: [ | ||||||
(story) => ( | ||||||
<div> | ||||||
<Annotation | ||||||
type="deprecation-notice" | ||||||
text={ | ||||||
<div> | ||||||
This component is deprecated and will be removed in the next major | ||||||
version. Please migrate to{' '} | ||||||
<a href="/?path=/docs/experimental-components-user-avatar-useravatar--docs"> | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks for catching. fixt |
||||||
UserAvatar | ||||||
</a> | ||||||
. | ||||||
</div> | ||||||
} | ||||||
> | ||||||
{story()} | ||||||
</Annotation> | ||||||
</div> | ||||||
), | ||||||
], | ||||||
}; | ||||||
|
||||||
const Template = (args) => { | ||||||
|
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.
Let’s keep the cspell disables for
useravatar
inline since I think it only applies when we’re putting it in the URL. (I do realize a lot of our other components probably made it into cspell for the same reason, but it does make us a bit more prone to spelling/stylistic errors.)