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

In VSCode hovering over a component tag should show the full component type name #9638

Closed
danroth27 opened this issue Nov 29, 2023 · 3 comments · Fixed by #9862
Closed

In VSCode hovering over a component tag should show the full component type name #9638

danroth27 opened this issue Nov 29, 2023 · 3 comments · Fixed by #9862
Assignees
Milestone

Comments

@danroth27
Copy link
Member

In VS if you hover over a component tag you get the full type name:

image

In VSCode you only get the type name without the namespace:

image

We should show the full type name of the component when hovering.

@javiercn
Copy link
Member

@danroth27 shouldn't this go to the razor repo? Let me know if that's not the case

@javiercn javiercn transferred this issue from dotnet/aspnetcore Nov 29, 2023
@ghost ghost added the untriaged label Nov 29, 2023
@davidwengier
Copy link
Contributor

davidwengier commented Dec 4, 2023

This is because in VS we get Roslyn to provide the hover for components. The solution here is to move hover to "single server" in VS Code. No it's not!

@phil-allen-msft phil-allen-msft added this to the Backlog milestone Dec 11, 2023
@ghost ghost removed the untriaged label Dec 11, 2023
@jordi1215 jordi1215 self-assigned this Jan 10, 2024
@davidwengier
Copy link
Contributor

The reason for this bug is that we have two different code paths for generating hovers, one that creates WPF text runs for Visual Studio, and one that creates markdown strings for all other LSP clients. By forcing the isVSClient variable to be false in the HoverInfoService, this can be made to repro in VS:
https://github.com/dotnet/razor/blob/main/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Hover/HoverInfoService.cs#L227

image

So the fix here would for the code in DefaultLSPTagHelperTooltipFactory be updated to match the logic in DefaultVSLSPTagHelperTooltipFactory when producing hover content.

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

Successfully merging a pull request may close this issue.

5 participants