-
Notifications
You must be signed in to change notification settings - Fork 842
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
[Docs] More guidance for EuiErrorBoundary #8379
Comments
@clintandrewhall @tkajtoch Flagging this one as you may have some thoughts. |
@tsullivan did a lot of work for Serverless with https://github.com/elastic/kibana-team/issues/646 That's a good reference for what we're doing with boundaries in Kibana (from a Shared UX/Platform perspective). Off the top of my head, we really need folks to wrap I think there were some other explorations as to what we could "do" with Error Boundaries, once fired, from a user's perspective. They can certainly look nicer, but you get into a customization range that gets pretty hairy. Some examples in the EUI docs would be great. Talking with @tsullivan might glean a bit of insight, as well as @Dosant wrt to the React 18 upgrade...? |
Pulling out a bit of relevant guidance from that linked issue:
|
FWIW, I didn't realize that Shared UX has KibanaErrorBoundary as well Are there docs for that? I gathered some context from this PR:
I'm guessing there could be some confusion in Kibana about error boundaries, and when to use It's outside the scope of this issue, so just thinking out loud. It could be nice to get the EUI Boundary to be consistent with the |
@tsullivan Do you have any insight as to when we might want folks to use |
@JasonStoltz My thoughts on error boundaries:
|
Thanks Tim. In that case, I think it's worth calling this out in our docs:
|
Do we have some higher level guidance we could give engineers for EuiErrorBoundary?
Like when should we consider using an ErrorBoundary? I think we can lean on how it's used in Kibana to provide guidance.
Is there typically a single, top-level ErrorBoundary? Or is this something in Kibana that people tend to use in a more targeted fashion? Per-page? Per-Plugin?
Should we use these when we're expecting error to occur, or as a general fail safe?
I don't think this needs a lot of thought or be totally comprehensive, but giving some sort of guidance here for Engineers would be helpful.
EDIT: Perhaps here we can just leverage the generic guidance for boundaries provided by React: https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary
We could simply say:
The text was updated successfully, but these errors were encountered: