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

IntelliSense bug for Razor Components #4511

Open
mikadumont opened this issue Sep 3, 2021 · 5 comments
Open

IntelliSense bug for Razor Components #4511

mikadumont opened this issue Sep 3, 2021 · 5 comments
Labels
enhancement Small improvement request
Milestone

Comments

@mikadumont
Copy link

Copying customer ask here:

My main usage is upgrading a 3-year-old web application (currently running a Vue.js frontend + .NET Core 3.1 backend) to a Blazor WASM hosted on aspnet with .NET 6. I’m currently using VS 2022 preview 3.1 most of the time.

It’s hard to decide which issue is my dotnet/aspnetcore#1 but if I had to choose only one improvement, I’d say that proper intellisense within the blazor components tags would be the one. There’s nothing like images to describe this so, here we go.

This is good intellisense (a bit sluggish to appear but expected from a preview build)
razor-issue1

Here I get the values for that enum. Perfect!

But then this is just not helpful… to the contrary, it’s even a nuisance.
razor-issue2

It takes about 30 seconds to scroll the whole list and why do I get angular stuff in there?

Sure feels like every possible keyword has been dumped in the list.

And here again, intellisense is not really helping (would be nice to prioritize the list of options supported by the component)
razor-issue3

@mikadumont mikadumont changed the title Razor IntelliSense bug for Razor Components IntelliSense bug for Razor Components Sep 3, 2021
@NTaylorMullen
Copy link
Contributor

@mikadumont would you mind suggesting to this person in their first issue about having too many completion items provided to use the filter? I'd be curious if that would resolve their concerns / be appropriate.

@NTaylorMullen
Copy link
Contributor

NTaylorMullen commented Sep 17, 2021

@ToddGrun / @jimmylewis is there an issue about Angular & friends not having their own item filters? Also, if the app doesn't have angular referenced are we able to just not provide the angular completions?

@jimmylewis
Copy link
Contributor

@NTaylorMullen the ng- completion comes from our HTML editor, not the Angular tooling. We don't have smarts to determine if you're using Angular in the project, but that's also why we collapse it down to only one completion item (if you choose that, we refresh completion with loads of ng-specific stuff). Our assumptions are that in any generic HTML attribute completion scenario: a) one item in completion is easy enough to ignore, b) if you are using Angular, this is super useful to have. If it were the only extraneous one, I don't think we'd get much complaint (we haven't had any feedback on it to date), but when all of the attribute completions are extraneous, it's a much more severe problem.

Can Razor smartly determine when to delegate to HTML in these cases?

@jimmylewis
Copy link
Contributor

Another thought I had: would it be a better experience to tweak the sort order so that the Blazor completion items are listed first? E.g. taking from the element completion screenshot

DynamicComponent
EditForm
ErrorBoundary
FocusOnNavigate
a
addr
area
b
...

@NTaylorMullen
Copy link
Contributor

Can Razor smartly determine when to delegate to HTML in these cases?

When we adopt the LSP embedded language re-design I have proposed we'd be able to do it easily; doing anything prior to that would be more or less a hack 😢.

Another thought I had: would it be a better experience to tweak the sort order so that the Blazor completion items are listed first? E.g. taking from the element completion screenshot

Ya that's definitely a possibility. Hmmm probably a pretty good idea. I worry about making that drastic of a change in p5 though hmmm. Will have to think about it more

@allisonchou allisonchou transferred this issue from dotnet/aspnetcore Oct 2, 2021
@allisonchou allisonchou added the enhancement Small improvement request label Oct 2, 2021
@allisonchou allisonchou added this to the Backlog milestone Oct 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Small improvement request
Projects
None yet
Development

No branches or pull requests

4 participants