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

POC: Kibana React Error Boundary #168054

Closed
wants to merge 8 commits into from

Conversation

tsullivan
Copy link
Member

@tsullivan tsullivan commented Oct 5, 2023

Closed: replaced with #169010

Summary

Address #167159

Technical doc [Elastic internal] https://docs.google.com/document/d/1kVD3T08AzLuvRMnFrXzWd6rTQWZDFfjqmOMCoXRI-14/edit

This PR creates the KibanaErrorBoundary component and KibanaErrorService utility, and shows it in use in two main areas that control lazy-loaded UI elements:

  1. Stack Management. This PR handles the error that could occur when navigating across management apps, and async code needed to render the app failed to load.
    rollup jobs error

  2. Share Menu Manager. This PR handles the error that could occur when the Share Menu Manager calls on a ShareMenuItem to render itself, and async code that is needed fails to load.

Testing

  1. Use a script proxy in between the browser and the Kibana server. Try https://github.com/tsullivan/simple-node-proxy
  2. Script the proxy to send 404 responses for the Reporting plugin bundle, and for a bundle of some Management app.
  3. Try the Share > CSV menu in Discover. It should be blocked, and handled with a toast message. Buttons in the toast should work.
  4. Try the management app. It should be blocked, and handled with an EuiCallout. Refresh button and EuiAccordion should work.

Checklist

Delete any items that are not applicable to this PR.

@tsullivan tsullivan changed the title Kibana React Error Boundary: Implementation of stage 1 Kibana React Error Boundary: initial implementation Oct 5, 2023
@tsullivan tsullivan force-pushed the sharedux/error-boundary branch 3 times, most recently from bacfeb9 to 8a3a85c Compare October 5, 2023 23:33
@tsullivan tsullivan force-pushed the sharedux/error-boundary branch 9 times, most recently from c4eacc2 to 8a00c07 Compare October 12, 2023 01:32
@tsullivan tsullivan force-pushed the sharedux/error-boundary branch from 8a00c07 to 9aab5c4 Compare October 12, 2023 21:20
@tsullivan
Copy link
Member Author

The first PR will not implement the "inline" error treatment, but only the "callout" treatment.

I'm keeping this as a closed PR so we can come back and reference the full POC implementation.

Replacing this PR with #168754

@tsullivan tsullivan closed this Oct 12, 2023
This reverts commit bf11b802b2258482349deb65740f4d96ff1a81b5.
@tsullivan tsullivan reopened this Oct 14, 2023
@tsullivan tsullivan closed this Oct 14, 2023
@kibana-ci
Copy link
Collaborator

kibana-ci commented Oct 14, 2023

💔 Build Failed

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
core 486 491 +5
share 72 77 +5
total +10

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
share 5.5KB 5.0KB -490.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
core 366.3KB 367.3KB +994.0B
share 52.0KB 56.2KB +4.2KB
total +5.2KB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@tsullivan tsullivan changed the title Kibana React Error Boundary: initial implementation POC: Kibana React Error Boundary Oct 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants