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

[FEE-927] add offset on Tooltip popover content #1264

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

Brian-Holland
Copy link
Contributor

@Brian-Holland Brian-Holland commented Feb 3, 2025

Our current Tooltip implementation does not have much, if any, space between the tooltip arrow and the content it's pointing to. This fix adds an offset based on the placement direction.

Before:
Screenshot 2025-02-03 at 5 13 33 PM
Screenshot 2025-02-03 at 5 09 46 PM
Screenshot 2025-02-03 at 5 13 44 PM
Screenshot 2025-02-03 at 5 13 51 PM

After:
Screenshot 2025-02-03 at 5 12 37 PM
Screenshot 2025-02-03 at 5 14 45 PM
Screenshot 2025-02-03 at 5 12 45 PM
Screenshot 2025-02-03 at 5 14 56 PM

Copy link
Contributor

github-actions bot commented Feb 3, 2025

Released prerelease version 8.14.2-fee-addTooltipSpacing-221a93a.0.
You may now run npm install @appfolio/react-gears@fee-addTooltipSpacing

@Brian-Holland Brian-Holland changed the title fix(Tooltip): add offset on Tooltip popover content [FEE-927] add offset on Tooltip popover content Feb 3, 2025
Copy link

kermitapp bot commented Feb 3, 2025

Comment on lines +22 to +27
const offsets: Record<string, [number, number]> = {
top: [0, 5],
bottom: [0, 5],
left: [0, 8],
right: [0, 8],
};
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Offsets are uneven here to account for the vertical space around text that isn't there horizontally.

@Brian-Holland Brian-Holland merged commit 86a2d9f into master Feb 4, 2025
4 checks passed
@Brian-Holland Brian-Holland deleted the fee-addTooltipSpacing branch February 4, 2025 00:42
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.

2 participants