-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Site Editor: Wrap each router area in 'ErrorBoundary' #64245
Conversation
Size Change: -205 B (-0.01%) Total Size: 1.83 MB
ℹ️ View Unchanged
|
I think we should probably have an |
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
cdbff5b
to
0ca3565
Compare
@youknowriad updated the location again. |
0ca3565
to
9496d64
Compare
The error boundary is now wrapped around router areas, but some design adjustments are needed. See the sidebar example. cc @WordPress/gutenberg-design |
Flaky tests detected in 9496d64. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/12108792632
|
From a glance at the screenshot (if that's what you're referring to), indeed, though that's generic for anything using the error boundary. What's a good way to trigger an error outside the canvas? As for the error boundary itself, it seems like it could be closer to this: That's in button, and notably margins/paddings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not speaking about the design but behavior wise, I think this makes sense.
9496d64
to
d862ca1
Compare
I pushed the following changes:
@jasmussen, do you mind smoke testing the updated design? Easiest way to do that is to comment out following lines: gutenberg/packages/editor/src/components/error-boundary/index.js Lines 57 to 59 in 9e76f0f
Screenshots
|
Thanks for checking, @jasmussen!
Happy to follow-up on this. Just point me to the right direction :) |
What?
PR moves the Site Editor error boundary up to the React tree to catch errors for every route.
Why?
The error triggered outside the block editor canvas was causing a "grey screen of death".
Testing Instructions
/wp-admin/site-editor.php?postType=wp_template
.Testing Instructions for Keyboard
Same.
Screenshots or screencast