-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Button : deprecate isSmall prop
#59734
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
Changes from 1 commit
d47cf79
eb5c177
56bedcf
d768c2a
63a32ca
bf42120
99cb959
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
isSmall prop
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -49,6 +49,11 @@ function useDeprecatedProps( { | |||
| }; | ||||
|
|
||||
| if ( isSmall ) { | ||||
| deprecated( 'Button isSmall prop', { | ||||
| since: '6.6', | ||||
| alternative: 'size="small"', | ||||
| version: '6.9', | ||||
|
||||
| version: '6.9', |
I'm thinking we don't really have to do a hard deprecation on this one, since the maintenance cost is very low. What do you think?
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 we should start following those more actively and actually clean them all up when they're due. With that in mind, I find them useful and I think they help reduce technical debt over time. scratch that, this comment explained that really well.
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.
Yes, I personally don't think it's worth it in this particular case, but I'm not going to block it if you or others think it's warranted. I will suggest adding a Dev Note for the next WP release though.
If we're going to throw a warning, we should add a prefix:
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 decided to remove the
deprecated()function for now so it doesn't throw any warnings. In the future, we may need to consider adding warnings along with other props such asisPrimary|isTertiary|isSecondary|isLink.