Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
KibanaErrorBoundary initial implementation (#168754)
## Summary * Meta issue: https://github.com/elastic/kibana/issues/166584 * This PR implements tasks in: #167159 * [Technical doc [Elastic internal]](https://docs.google.com/document/d/1kVD3T08AzLuvRMnFrXzWd6rTQWZDFfjqmOMCoXRI-14/edit) This PR creates the `ErrorBoundary` component and its provider for services. It implements the wrapper around a few management apps owned by Appex-SharedUX. ### Screenshots Updated 2023-10-18 **Server upgrade scenario:** In this case, the caught error is known to be recoverable via window refresh: * <img width="1413" alt="image" src="https://github.com/elastic/kibana/assets/908371/7f34fbab-0e67-4c67-a4a1-989464d5b0d0"> **Unknown/Custom error:** In this case, the error is something outside of known cases where the fix is to refresh: * <img width="1413" alt="image" src="https://github.com/elastic/kibana/assets/908371/7c39b5df-d4da-4e33-aeca-9ea447010762"> ### Testing 1. Use a script proxy in between the browser and the Kibana server. * Try **https://github.com/tsullivan/simple-node-proxy** * or **https://chrome.google.com/webstore/detail/tweak-mock-and-modify-htt/feahianecghpnipmhphmfgmpdodhcapi**. 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 SharedUX management apps that use the wrapper. It should be blocked, and handled with an EuiCallout. Refresh button and EuiAccordion should work. ### Checklist - [x] Ensure the package code is delivered to the browser in the initial loading of the page (c2559e8) - [x] Any text added follows [EUI's writing guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses sentence case text and includes [i18n support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md) - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios - [x] Any UI touched in this PR is usable by keyboard only (learn more about [keyboard accessibility](https://webaim.org/techniques/keyboard/)) - [x] Any UI touched in this PR does not create any new axe failures (run axe in browser: [FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/), [Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US)) - [x] This renders correctly on smaller devices using a responsive layout. (You can test this [in your browser](https://www.browserstack.com/guide/responsive-testing-on-local-server)) - [x] This was checked for [cross-browser compatibility](https://www.elastic.co/support/matrix#matrix_browsers) --------- Co-authored-by: kibanamachine <[email protected]> Co-authored-by: Tiago Costa <[email protected]>
- Loading branch information