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

Tooltips are not working #2091

Closed
BaronBonet opened this issue Sep 9, 2024 · 4 comments
Closed

Tooltips are not working #2091

BaronBonet opened this issue Sep 9, 2024 · 4 comments

Comments

@BaronBonet
Copy link

First off thanks to everyone who is working on this project. D2 is awesome!

I think tooltips are broken.

In the below example that can be found here on play.d2lang.

y: {tooltip: test}
x -> y

I do not see the tooltip when I hover over y.

The tooltip section of the docs is also not showing the tooltop

@cyborg-ts cyborg-ts added this to D2 Sep 9, 2024
@alixander
Copy link
Collaborator

@BaronBonet Thank you!

If you hover over the shapes here (leave your mouse for a few seconds), does a tooltip show up?
https://developer.mozilla.org/en-US/docs/Web/SVG/Element/title

If not, you likely have some nonstandard accessibility settings in your browser/OS.

@BaronBonet
Copy link
Author

@alixander I'm just crazy impatient sorry about this! The tooltip does show up after I wait with my mouse still for about 2 seconds.

I'm surprised how long it takes. I was expecting the implementation to act more like the tooltips I'm familiar with e.g. this example on W3Schools which shows the tooltip instantly.

I assume there is a good reason they are not implemented this way?

@BaronBonet
Copy link
Author

Ah, I see this is how tooltips are implemented with SVG elements. My apologies for wasting your time @alixander !

@github-project-automation github-project-automation bot moved this to Done in D2 Sep 9, 2024
@alixander
Copy link
Collaborator

Yeah it's not ideal but it's the most universal way with the least amount of intrusion from the standpoint of an external library adding extra DOM nodes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

No branches or pull requests

2 participants