Blazor component Edit/Preview on website needs compilation error display

1 Answer 97 Views
General Discussions
Rami
Top achievements
Rank 1
Veteran
Rami asked on 02 Sep 2022, 07:37 AM

Hello,

the Edit/Preview box on the Blazor documentation is nice. Allows me to quickly try what the specific component or option does and allows. But, if I'm not mistaken, it does not display compilation errors anywhere and this makes the experience in case of an error really bad.

For example, if I go to the Blazor MultiSelect page and edit the first editor available under the "Creating MultiSelect" header. If I make no mistakes, pressing the Preview button compiles the code cleanly and starts the Blazor component with my edits. But, if I make a mistake, let's say near the bottom of the Edit box I accidentally add an extra d to Add like so "Countries.Addd("Albania");", then after pressing the Preview button a couple of things might happen(?)

  • If I had already successfully compiled some Blazor from your website, the Preview box will not update with the edits, but instead show the old compilation. and no errors anywhere. Can be very puzzling if the previous code was for.ex. from a different component alltogether
  • If I didn't have an earlier compilation, kind of nothing happens. The Preview box display stays empty and there are no errors anywhere.

So please add some kind of a popup with atleast an error saying "Hey, there's some problem with your code, we couldn't compile it, please take another look", or better yet, the actual error and line number if possible.

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 02 Sep 2022, 10:28 AM

Hello Rami,

Thanks for your feedback, we appreciate it.

What you say makes sense and we considered such error reporting in the beginning. We concluded that there is not enough space for such interface. A more likely future solution will be to add easier transition from the docs snippet to the full-blown REPL app, which does display error messages.

In the meantime, you can copy-paste the snippet manually.

Regards,
Dimo
Progress Telerik

The Premier Dev Conference is back! 

Coming to you live from Progress360 in-person or on your own time, DevReach for all. Register Today.


Rami
Top achievements
Rank 1
Veteran
commented on 02 Sep 2022, 10:38 AM

Dear Dimo,

 

thank you, the REPL app displays the errors nicely. I hope you are soon able to add links that open the code from the documentation to the REPL app.

 

Regards, Rami

Tags
General Discussions
Asked by
Rami
Top achievements
Rank 1
Veteran
Answers by
Dimo
Telerik team
Share this question
or