Gozala / Gozala/try-wisp

Show compile errors in the output panel

Open
#2 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
6
Forks
5
PR merge metrics
No merged PRs in 30d

Description

I don’t know how detailed the error messages Wisp gives are, but even if Wisp says “compilation failed” and nothing more, displaying that is more helpful than keeping the right panel unchanged, with the output of the previous working code. Right now, since no error is displayed, it’s hard to notice that my code is broken, and then I wonder what’s wrong when I look to the right and see that the right panel has not updated with my new code.

This is very similar to [this other issue](https://github.com/jashkenas/coffee-script/issues/3077) I made for [Try CoffeeScript](http://coffeescript.org/#try:), about improving the placement of their error message:

> […] When I started using Try CoffeeScript while learning CoffeeScript, I was confused sometimes as to why my code had stopped updating on the right as I typed. It took me a while to spot the little red error.

> The error could just be displayed in place of the output, but this would create flickering between code and errors as the user types. To avoid flickering, the error could instead be displayed centered on top of the code, with the last-compiled code still visible underneath it.
>
> Here’s a mockup that both moves the error message on top of the compiled code and shows a small marker in the source for the error message.
>
> ![mockup of Try CoffeeScript with big error message and source error marker](https://f.cloud.github.com/assets/79168/830792/1b747bba-f178-11e2-907f-252fa25eb98e.png)
>
> If you can get column numbers for the error, though, we should use a different way of indicating the error, one that can also indicate the column. Maybe giving the error location a bold or wavy red underline.

I think that mockup also applies to this tool – when there’s an error, put a black transparent overlay over the code on the right with a red error message on a white background centered in the panel. And if you know the line number of the error, mark that line too.

There is also [this earlier CoffeeScript issue](https://github.com/jashkenas/coffee-script/pull/1728) which shows another way to display the error message – replacing the code, instead of on top of the code. That way might be simpler to implement, and it would be a good start.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.