talonvoice / talon

Issue Tracker for the main Talon app
85 stars 0 forks source link

Feature request: Allow for pop up alerts for common mistakes like omitting parentheses in scripts #96

Open ym-han opened 5 years ago

ym-han commented 5 years ago

Although Talon already does a pretty good job of incorporating descriptive error messages like

talon.grammar.rule.ParseError: Error parsing rule. Rule: (rbrace | are brace | right brace ^

it would be really helpful for users like me, if such common mistakes could be flagged in a more visible way. e.g., If I save the script and don't do anything about that for some time, it'd be helpful if Talon could display a pop up msg like, "Hey were you aware that you had forgotten to add a ')' in "(rbrace | are brace | right brace"? (And perhaps keep displaying that pop up, if i keep trying to dictate with Talon, since nothing will happen if the rule is broken.)

This setting could be optional; I just think it would be really helpful for people like me don't already have sophisticated tools for checking this, or who aren't already in the habit of making sure that all their t's are crossed, so to speak (and who might not think to check the log right away). And i imagine that it might be helpful even for pros --- it'd at least save them the trouble of having to open the log to check.

lunixbochs commented 5 years ago

I could use persistent notifications, so the error notification stays up until you manually dismiss it.

ym-han commented 5 years ago

I could use persistent notifications, so the error notification stays up until you manually dismiss it.

I like that!

I just realized, though, after doing some quick testing, that there are really two independent issues:

  1. persistent vs non-persistent notifications,

and more importantly

  1. there actually isn't any pop up notification for me when I omit the final parenthesis in something like "(square | left square [bracket])" and save the script. By contrast, there is at least a non-persistent notification when I omit the final comma in, e.g., "(square | left square [bracket])": "[",

I actually care more about 2 than 1 (though 1 would obvs be nice to have). I think it's easy to assume that Talon will display notifications for all syntax errors if one starts getting used to having notifications for, e.g., omitting commas, so when one doesn't see such a notification, it's easy to then implicitly assume that it must not be a syntax error.

I might have mentioned this in the slack before, but I can't remember now; apologies if I'm repeating myself.

lunixbochs commented 5 years ago

newapi fixes 1 by compiling rules immediately instead of when the grammar is loaded

ym-han commented 5 years ago

Awesome! :)