-
Notifications
You must be signed in to change notification settings - Fork 51
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: Sticky position and support for dynamic content (e.g. via React's createPortal
)
#402
Conversation
693e218
to
ecea6ee
Compare
createPortal
)
c6a6bad
to
4ec0bce
Compare
@rokotyan Nice feature! I will add the docs within the next couple days. |
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.
@rokotyan When testing I noticed inconsistent behavior with crosshair when followCursor
is false
. The place where tooltip is hoverable seems to be random, and it sometimes follows the cursor even when crosshair isn't active.
It is difficult to showcase with a recording but here is an example of what I mean:
Screen.Recording.2024-06-26.at.1.58.43.PM.mov
I'm wondering if we can rework the logic so crosshair's tooltip can support this feature, or if we should automatically disable it?
@reb-dev You're right, I haven't tested this use case, thanks for your attention to detail! I think Crosshair doesn't need a hoverable tooltip, so we can safely disable it. I'll update the PR. |
@reb-dev Updated the code |
I made some changes to the Tooltip doc page and added the new info in the recent commit. @lee00678 can you review? Approval needs to be from someone besides the last pusher. |
@reb-dev looks good. Tested the dev examples and docs, both working as expected. |
Adding support for custom class names which is needed when using |
ff98ee9
to
924598a
Compare
To support `createPortal` in React. If you want to hide the tooltip for some points, you can use `null` for that
To work with with dynamic tooltip content
…ip then content changes
…Hover` and `followCursor`
…followCursor` is set to `false`
19d6a4a
to
a9daa23
Compare
Rebased from |
This PR will add support for sticky tooltip positioning:
Screen.Recording.2024-06-18.at.11.48.31.AM.mp4
Screen.Recording.2024-06-20.at.2.45.23.PM.mp4