-
Notifications
You must be signed in to change notification settings - Fork 106
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
EPMRPP-79184 || Tooltip component #3316
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #3316 +/- ##
========================================
Coverage 61.65% 61.65%
========================================
Files 74 74
Lines 798 798
Branches 121 121
========================================
Hits 492 492
Misses 279 279
Partials 27 27 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
- **side**: _string_, optional, default = 'top' | ||
- **arrowPosition**: _string_, optional, default = 'left' |
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.
Side: top
little bit confusing. Maybe be better to change to placement
or something similar. No need for any action now, let's see the opinion of other team members
As far as I remember, the position of the arrow should be determined automatically depending on the position of the screen. |
I've shown it to UX and got approve |
Now it's refactored from dynamic (depending on cursor) to static tooltip position depending on element placement on screen |
const tooltipRoot = document.getElementById('tooltip-root'); | ||
return ReactDOM.createPortal( | ||
<Popper placement={side} modifiers={modifiers} eventsEnabled={false}> | ||
{({ placement, ref, style, arrowProps }) => ( |
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.
Are inline styles prop (style) used?
May be replace with a 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.
This style comes from Popper component and it's using for position calucaltion
May be set default value with this padding? This is more useful. |
It has 'auto' by default. |
readme says "- side: string, optional, default = 'top'" |
And "side: left" shows the tooltip on the right side |
Didn't reproduce. And I don't change default logic, we just pass this prop to Popper |
Sorry, I didn't fit the tooltip in width and showed on the right. Everything is working. |
No description provided.