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

Implement propper commenting in blazor, please #10546

Open
vsfeedback opened this issue Jun 26, 2024 · 3 comments
Open

Implement propper commenting in blazor, please #10546

vsfeedback opened this issue Jun 26, 2024 · 3 comments
Labels
author: migration bot 🤖 The issue was created by a issue mover bot. The author may not be the actual author untriaged

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


You can't comment a section if you already have a comment in it. It works in c#, it doesn't in blazor. Please implement it.

@*
<PropertyColumn Property="@(c => c.DateCreated.ToString("dd.MM.yyyy HH:mm"))" Align="Align.Start" Sortable="true" Title="Created" /> @* TODO: DATE sorting, not string. *@
* @


Original Comments

Feedback Bot on 1/31/2024, 09:32 PM:

(private comment, text removed)

@dotnet-policy-service dotnet-policy-service bot added untriaged author: migration bot 🤖 The issue was created by a issue mover bot. The author may not be the actual author labels Jun 26, 2024
@davidwengier
Copy link
Contributor

It works in c#

I'm afraid it doesn't:
image

Single line comments work like this in C#, but Razor has no concept of single line comments.

@davidwengier davidwengier added the area-compiler Umbrella for all compiler issues label Jun 26, 2024
@jjonescz
Copy link
Contributor

Razor has no concept of single line comments.

I guess you could do something like:

@{
//<PropertyColumn Property="@(c => c.DateCreated.ToString("dd.MM.yyyy HH:mm"))" Align="Align.Start" Sortable="true"
//Title="Created" /> @* TODO: DATE sorting, not string. *@
}

@davidwengier
Copy link
Contributor

davidwengier commented Jun 27, 2024

It occurs to me this could be a tooling request, not a compiler one, and when they say "you can't comment a section", they could mean the actual act of commenting code.

When executing the "Toggle Block Comment" command in VS, Roslyn will handle any block comments in the span such that the result is valid:
9c395c26-fc5d-4e97-a87f-2d67968072c2

Razor, due to the VS editor handling the commenting for us, has no functionality for this, and cannot currently add it. This is potentially something we need to get the editor to look at.

EDIT: Been at Microsoft too long, used the word "ask" as a noun. Fixed.

@davidwengier davidwengier removed the area-compiler Umbrella for all compiler issues label Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author: migration bot 🤖 The issue was created by a issue mover bot. The author may not be the actual author untriaged
Projects
None yet
Development

No branches or pull requests

3 participants