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

🐛 BUG: SVG elements show wrong hover info #223

Closed
Princesseuh opened this issue Mar 23, 2022 · 1 comment
Closed

🐛 BUG: SVG elements show wrong hover info #223

Princesseuh opened this issue Mar 23, 2022 · 1 comment
Labels
- P2: nice to have Not breaking anything but nice to have (priority) ecosystem: upstream Issue is caused by a bug / missing feature upstream

Comments

@Princesseuh
Copy link
Member

Describe the Bug

When hovering an SVG element (or any of its containing elements specific to SVGs such as <rect>) instead of getting a nice hover info explaining the tag with a link to the MDN like we have for HTML and CSS, it shows the ugly TSX hover info

The reason for that is that VS Code's language services does not include any information for SVG elements, you can test this by going into a normal .html file and hovering SVG elements, where you'll get nothing.

There's an issue about it on the VS Code repo here microsoft/vscode#66053

Possible solution

Create our own custom data for SVG elements, that'd be a lot of work but we'd be able to probably contribute it to VS Code, which would be fun

Steps to Reproduce

  1. Create an .astro file
  2. Include SVG elements, ex: <svg></svg>
  3. Hover svg
  4. Get TSX hover info!
@Princesseuh Princesseuh added the ecosystem: upstream Issue is caused by a bug / missing feature upstream label Mar 23, 2022
@Princesseuh Princesseuh added - P2: nice to have Not breaking anything but nice to have (priority) s2-medium labels Aug 16, 2022
@Princesseuh
Copy link
Member Author

Closing since showing the TSX type on hover isn't as weird as before (since we always do now). Ultimately the issue is not ours anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
- P2: nice to have Not breaking anything but nice to have (priority) ecosystem: upstream Issue is caused by a bug / missing feature upstream
Projects
None yet
Development

No branches or pull requests

1 participant