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

[discuss] Improve UX when async chunks fail to load #163671

Closed
lukeelmers opened this issue Aug 11, 2023 · 5 comments
Closed

[discuss] Improve UX when async chunks fail to load #163671

lukeelmers opened this issue Aug 11, 2023 · 5 comments
Labels
discuss Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) UX: UI/UX Consultation Requires UX lead input/consult before development and UX lead approval on PR before merge.

Comments

@lukeelmers
Copy link
Member

When running zero-downtime upgrades, users who currently have Kibana opened in their browser will encounter errors as the server rolls over to a new version because of the way that we serve static assets. The most likely scenario is that they will begin getting 404s as webpack attempts to load async chunks, since the URLs to the static bundles will have changed. The resulting error could look something like this:

Screenshot 2023-07-31 at 15 38 05

To fix the issue, users need to simply refresh the page, but an error like this does not help them understand what to do. We should improve the UX so that users aren't seeing an ugly stack trace.

These errors are coming from an EuiErrorBoundary, which handles uncaught exceptions in a portion of the React tree. Unfortunately, there is no centralized place where we are controlling such errors as they could appear anywhere in the UI where we are doing an async import. A quick grep of the codebase shows about 78 different (non-test) files that are using EuiErrorBoundary. Changing the UX would require updating each of those instances with special error handling logic, since EuiErrorBoundary is only capable of rendering the actual Error that's thrown.

Ultimately we need to address two questions here:

  1. What should the UX be? I'd suggest that it shouldn't show a stack trace by default, but allow the ability to expand and view it for debugging purposes. For 404s on async chunks it would also be good to show a Refresh button.
  2. How would we actually implement? The most obvious idea is wrapping EuiErrorBoundary and sharing it as a component for all apps to use so we could control it globally, but I'm sure there are other options we could consider.

--

Looping in a few folks who I think will care about this: @clintandrewhall @ryankeairns @sophiec20 @rayafratkina

@lukeelmers lukeelmers added discuss UX: UI/UX Consultation Requires UX lead input/consult before development and UX lead approval on PR before merge. labels Aug 11, 2023
@botelastic botelastic bot added the needs-team Issues missing a team label label Aug 11, 2023
@ryankeairns
Copy link
Contributor

In chatting with @clintandrewhall , my understanding is that the UI becomes altogether unresponsive, so I'm inclined to recommend we hide all of the now-non-functioning elements. This would mitigate additional frustration from wasted clicks.

Consider this a quick wireframe, but perhaps something as simple as:

CleanShot 2023-08-11 at 11 11 17

  • Copy is for example purposes
  • Send diagnostics is a suggestion; something Clint mentioned as a nice-to-have
  • The expanded view of the stack trace could look like:
CleanShot 2023-08-11 at 11 13 42@2x

@ppisljar ppisljar added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc and removed needs-team Issues missing a team label labels Sep 11, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@lukeelmers lukeelmers added the Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) label Sep 11, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/appex-sharedux (Team:SharedUX)

@lukeelmers
Copy link
Member Author

I think this will be resolved as a part of https://github.com/elastic/kibana-team/issues/646 -- is that correct @vadimkibana? Should we close this as a duplicate?

@tsullivan
Copy link
Member

@lukeelmers yes, please let's close this as duplicate of https://github.com/elastic/kibana-team/issues/646

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc Team:SharedUX Team label for AppEx-SharedUX (formerly Global Experience) UX: UI/UX Consultation Requires UX lead input/consult before development and UX lead approval on PR before merge.
Projects
None yet
Development

No branches or pull requests

5 participants