-
Notifications
You must be signed in to change notification settings - Fork 538
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
Tooltip V2: Update the threshold value to match with the offset #4446
Conversation
🦋 Changeset detectedLatest commit: 4cfde9f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
size-limit report 📦
|
@@ -62,7 +62,7 @@ const StyledTooltip = styled.span` | |||
display: block; | |||
right: 0; | |||
left: 0; | |||
height: 8px; | |||
height: var(--overlay-offset, 0.25rem); |
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.
@langermank should this be 4px or 0.25rem?
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.
What you have is perfect!
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.
Very nice!
Reported in the communities (https://github.com/orgs/community/discussions/113546) and also internally that the elements that have tooltips on are not fully clickable. The reported issue is on PVC tooltip but React doesn't have the right value either. We think this is happening because the threshold (12px) is higher than the offset value (4px) and tooltip ends up blocking out the bottom part of its trigger.
Corresponding PVC PR: primer/view_components#2733
Changelog
New
Changed
Updated the height of the after pseudo element (Between tooltip and its trigger) to match with the offset value (default) so that tooltip don't overlap with its trigger.
Removed
Rollout strategy
Testing & Reviewing
Merge checklist