Improve editor error boundaries and error messages #34482
Labels
General Interface
Parts of the UI which don't fall neatly under other labels.
Good First Issue
An issue that's suitable for someone looking to contribute for the first time
Needs Design Feedback
Needs general design feedback.
[Type] Enhancement
A suggestion for improvement.
What problem does this address?
Whilst working through some issues on the forums lately, it's pretty clear the error boundaries in the editors could be improved. Here's how it looks right now for reference:
On the forums I've observed that users see someone else has posted a screenshot of this, and they'll post on the same thread saying they're experiencing the same bug. But this is actually just a generic error message and users most of the time are experiencing completely different issues.
Users also regularly fail to use the 'Copy Error' button, which is the most important part for developers.
'Copy Post Text' is fairly important for the user to keep their work, but that might not be so clear.
Finally, it's fairly common for multiple errors to be logged in the console, but the Copy Error button only copies the latest error message, which might not be entirely useful.
What is your proposed solution?
While it's not clean or tidy, this UI should only display in exceptional circumstances, and I think the most recent error message should always be visible so that the user can clearly tell if they're experiencing the same issue as someone else. Not necessarily the full stack-trace, but at least the error message.
Further error details could be available in a log that can be expanded using something like a
<details>
element - https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details. It should be possible for the error boundary to capture all the errors and push them onto an array for display here (stack traces included).'Attempt Recovery' almost never works because it recreates the same error. Maybe it could try an 'undo' before re-initialising everything.
And one last thing, whenever this error occurs, there's usually a fairly routine response on the forums (deactivate all plugins, then reactivate them one by one etc.). It'd be great to link the user to a help article that contains details of these steps, and if that doesn't help how to report the issue.
The text was updated successfully, but these errors were encountered: