dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.
https://asp.net
MIT License
35.51k stars 10.04k forks source link

[Blazor] Please improve message on markup errors #50512

Closed macias closed 10 months ago

macias commented 1 year ago

Is there an existing issue for this?

Is your feature request related to a problem? Please describe the problem.

Let's say I try by trial & error find out if Blazor supports dialog element.

<dialog id="@_id" @onclose="closeCallback">

This will get me something like this:

Microsoft.AspNetCore.Components.WebAssembly.Rendering.WebAssemblyRenderer[100] Unhandled exception rendering component: String contains an invalid character applyAttribute@http://localhost:5031/_framework/blazor.webassembly.js:1:24911

This is vague message.

Describe the solution you'd like

Please add two information:

Something like this:

Unhandled exception rendering component: Invalid character "@" in "<dialog id="@_id" @onclose="closeCallback">", Line 14, Column 20

Additional context

No response

ghost commented 1 year ago

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

ghost commented 11 months ago

Thanks for contacting us.

We're moving this issue to the .NET 9 Planning milestone for future evaluation / consideration. We would like to keep this around to collect more feedback, which can help us with prioritizing this work. We will re-evaluate this issue, during our next planning meeting(s). If we later determine, that the issue has no community involvement, or it's very rare and low-impact issue, we will close it - so that the team can focus on more important and high impact issues. To learn more about what to expect next and how this issue will be handled you can read more about our triage process here.

mkArtakMSFT commented 11 months ago

We'll try to make sure that the dialog element works without issues in .NET 9.

SteveSandersonMS commented 10 months ago

We've added support for @close on dialog in .NET 8.

We don't plan to change the error message for unrecognized directive attributes since it actually comes from the browser, and it's up to the browser to provide correctly localized messages.