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

Fix some prop warnings #5635

Merged
merged 5 commits into from Feb 19, 2019
Merged

Fix some prop warnings #5635

merged 5 commits into from Feb 19, 2019

Conversation

tmeasday
Copy link
Member

Issue: #5600

What I did

Fix up some warnings from the logs

How to test

Run official storybook

@tmeasday tmeasday added maintenance User-facing maintenance tasks release labels Feb 18, 2019
@tmeasday tmeasday added this to the v5.0.0 milestone Feb 18, 2019
Copy link
Member Author

@tmeasday tmeasday left a 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;
Copy link
Member Author

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 });
}

Copy link
Member Author

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}
Copy link
Member Author

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?

Copy link
Member

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

Copy link
Member Author

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

@shilman
Copy link
Member

shilman commented Feb 19, 2019

@tmeasday please update snapshots

@tmeasday
Copy link
Member Author

@shilman merged next and pushed, no updates required

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance User-facing maintenance tasks patch:done Patch/release PRs already cherry-picked to main/release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants