-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix(popover): Deprecate PopoverAlignment type values #16346
fix(popover): Deprecate PopoverAlignment type values #16346
Conversation
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
Few minor changes only, rest is looking fine to me.
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.
LGTM 👍
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.
This looks really great! I have a couple suggestions on the signature of deprecateValuesWithin
. Let me know what you think
Hey @tay1orjones ! |
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.
Awesome stuff!
b62c6b6
Closes #16326 #16467
In #14654 all Popover-based components were unified to use new values for the align prop.
This PR does the below
Deprecates old values so we can ensure consumers know to stop using them.
PopoverAlignment is now a union of both :
PopoverAlignment = DeprecatedPopoverAlignment | NewPopoverAlignment;
Adds a custom validator function for proptypes that pops a warning when a deprecated value is used
Changelog
New
Adds
deprecateValuesWithin
function to warn when deprecated value is used foralign
propPulls the old values out into their own type :
DeprecatedPopoverAlignment
and marks it as deprecatedTesting / Reviewing
Pass any old value for align pop in Popover component and verify that console warns about deprecated usage