dotnet / razor

Compiler and tooling experience for Razor ASP.NET Core apps in Visual Studio, Visual Studio for Mac, and VS Code.
https://asp.net
MIT License
501 stars 191 forks source link

Use a different coloring for component slots (i.e. renderfragment parameters) #9926

Open AdmiralSnyder opened 8 months ago

AdmiralSnyder commented 8 months ago

in this image, Menu is a [Parameter] of type RenderFragment - thus creating a Slot to put things into. I suggest that those slots should be drawn in a different color to differentiate their declarations from actual component instanciations. image

chsienki commented 8 months ago

This is mostly tooling, but I assume if we wanted to do this, we'd need the compiler to classify them differently?

davidwengier commented 8 months ago

I don't know for sure, but I suspect there is enough metadata in a tag helper descriptor that this can probably be done entirely on the tooling side.