Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve editor error boundaries and error messages #34482

Open
talldan opened this issue Sep 2, 2021 · 3 comments
Open

Improve editor error boundaries and error messages #34482

talldan opened this issue Sep 2, 2021 · 3 comments
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.

Comments

@talldan
Copy link
Contributor

talldan commented Sep 2, 2021

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:
Screenshot 2021-09-02 at 10 35 08 am

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.

@talldan talldan added [Type] Enhancement A suggestion for improvement. General Interface Parts of the UI which don't fall neatly under other labels. Needs Design Feedback Needs general design feedback. labels Sep 2, 2021
@karmatosed
Copy link
Member

+1 for any space that can improve error messages. I really would love not to have any situations where we present three buttons in a row to anyone as a subsequent action.

As I also have experienced attempted recovery rarely (never) working, I wonder if we should even not show it? I understand the use, but it can do more harm, thinking it is an option and then not working. Maybe I am just unlucky.

I like the idea of perhaps offering default of copy, then other options even in this case. It would be a far cleaner interface.

@javierarce
Copy link
Contributor

javierarce commented Oct 7, 2021

Here's a first idea for this error message.

image

We could show the error details inside a textarea. A button to copy the message would appear on hover (see it in action in the video below). A link below the textarea could teach users the necessary steps to report a problem.

As @talldan suggested, we could also put the details inside an expandable section.

Error.mp4

Figma file

@youknowriad youknowriad added the Good First Issue An issue that's suitable for someone looking to contribute for the first time label Dec 5, 2024
@Mamaduka
Copy link
Member

I recently shipped some minor design changes in #64245.

Can anyone from @WordPress/gutenberg-design comment on the proposed design? Should we go in this direction?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

5 participants