-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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 some prop warnings #5635
Fix some prop warnings #5635
Conversation
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.
Looking for some answers from @ndelangen and @domyen before merging this.
@@ -8,6 +8,7 @@ import deprecate from 'util-deprecate'; | |||
|
|||
export interface RenderOptions { | |||
active: boolean; | |||
key: string; |
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.
@ndelangen can you confirm this is correct?
if (onVisibilityChange !== undefined) { | ||
Object.assign(props, { onVisibilityChange }); | ||
} | ||
|
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.
@ndelangen I don't understand what the purpose of this technique was
return ( | ||
<TooltipTrigger | ||
placement={placement} | ||
trigger={trigger} | ||
modifiers={modifiers} | ||
{...props} |
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.
We shouldn't pass props
both too the TooltipTrigger
and the Container
(below). It should be one of the other. @domyen which one makes sense to you?
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.
The only thing I use ...props
for is styled-components. Alternatively, if we're not passing props here it might make more sense to explicitly use className
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.
@domyen my point was previously this component was doing that in two points (the TooltipTrigger
and the Container
). It seems wrong (and it caused problems) to do that
@tmeasday please update snapshots |
@shilman merged |
Issue: #5600
What I did
Fix up some warnings from the logs
How to test
Run official storybook