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(components): tooltips #2413

Merged
merged 14 commits into from
Sep 18, 2019
Merged

Conversation

frassinier
Copy link
Contributor

What is the problem this PR is trying to solve?
Tooltips can be shown twice at the same time

What is the chosen solution to this problem?
Use React.Fragment and better timeout management

Please check if the PR fulfills these requirements

  • The PR commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features) And non reg done before need review
  • Docs have been added / updated (for bug fixes / features)
  • Related design / discussions / pages (not in jira), if any, are all linked or available in the PR

[ ] This PR introduces a breaking change

@build-travis-ci
Copy link
Collaborator

:octocat: Demo is available here

2 similar comments
@build-travis-ci
Copy link
Collaborator

:octocat: Demo is available here

@build-travis-ci
Copy link
Collaborator

:octocat: Demo is available here

}),
)}

{visible &&
ReactDOM.createPortal(
<div className={theme['tc-tooltip-container']} style={style}>
<div className={theme['tc-tooltip-container']} style={getTooltipPosition().style}>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can use placement, style declared above

@@ -42,13 +42,21 @@ The react/require-extension rule is deprecated. Please use the import/extensions
/home/travis/build/Talend/ui/packages/components/src/SubHeaderBar/SubHeaderBar.test.js
4:8 error 'Container' is defined but never used no-unused-vars

/home/travis/build/Talend/ui/packages/components/src/TooltipTrigger/TooltipTrigger.component.js
193:10 error 'placement' is assigned a value but never used no-unused-vars

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix the proptypes definition and remove them if not used

@build-travis-ci
Copy link
Collaborator

:octocat: Demo is available here

1 similar comment
@build-travis-ci
Copy link
Collaborator

:octocat: Demo is available here

let dimensions;
try {
// eslint-disable-next-line react/no-find-dom-node
dimensions = ReactDOM.findDOMNode(refContainer.current).getBoundingClientRect();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question about this change, I don't understand why you need to find your ref in the domnode, since the ref is normally a pointer to the domnode ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because actually ref is not always referencing a DOM node, but just a pointer like you said, so there is no way to access to its getBoudingClientRectmethod.

facebook/react#14357 (comment)

@build-travis-ci
Copy link
Collaborator

:octocat: Demo is available here

1 similar comment
@build-travis-ci
Copy link
Collaborator

:octocat: Demo is available here

Copy link
Contributor

@vbocquet vbocquet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixs 👍

@build-travis-ci
Copy link
Collaborator

:octocat: Demo is available here

1 similar comment
@build-travis-ci
Copy link
Collaborator

:octocat: Demo is available here

@frassinier frassinier merged commit 61654e6 into master Sep 18, 2019
@frassinier frassinier deleted the frassinier/fix/components/tooltips branch September 18, 2019 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants