Closed Bug 736183 Opened 12 years ago Closed 10 years ago

Kuma: make kumascript error presentation more useful

Categories

(developer.mozilla.org Graveyard :: Editing, defect, P2)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: lorchard, Unassigned)

References

Details

Errors in kumascript processing are shown on document view pages. But, they presentation is not so great. We should improve the design and UI of that.
For example, it would be nice to link to or somehow show within the rendered document where errors occur.

And, it would be nice if it weren't so ughly.
Some more thinking out loud. There are 3 kinds of errors to expect from Kumascript, and here are ideas for each:

* DocumentParsingError 

This is a syntax error in parsing macros in a wiki document - eg. things like {{ )( }} The error contains the character offset at which the error occurred. It might be nice to take the original document source, find that character offset. Then, display the line where the error was found, highlight it, and maybe include the line before and after for context.

* TemplateLoadingError

This is an error in loading a template to evaluate a macro. Usually it's because the template was not found - either because the macro misspelled it, or because it's a template we haven't migrated yet. Might be nice to render a loading error with an invitation and link to create a new template, at least for people who have access to do so (see bug 731649)

* TemplateExecutionError

This is an error found during the execution of a template. Syntax errors, exceptions, etc. Here, it would be nice to offer a link to edit the offending template. There's also a bit of context about the error, but it still kind of stinks. Might be nice to improve that too.
Oh also, as for the error log box itself:

* Hide behind a disclosure triangle by default. Include the message "There were errors on this page", but require a click to reveal them. Maybe cookie the hide/show status so it persists between page refreshes.

* Maybe hide errors altogether for visitors who aren't logged in?
Blocks: 710728
Priority: -- → P2
Errors are *fairly* useful right now. Going to unilaterally punt this to post-July
Blocks: 756266
No longer blocks: 710728
Depends on: 754921
Version: Kuma → unspecified
Component: Docs Platform → Editing
No longer blocks: 756266
This bug is vague and also vaguely done. File additional bugs for specific kumascript error improvements.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.