Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Feat: Add UI ErrorBoundary #1013

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

Closed
greyscaled opened this issue Apr 14, 2022 · 2 comments · Fixed by #1602
Closed

Feat: Add UI ErrorBoundary #1013

greyscaled opened this issue Apr 14, 2022 · 2 comments · Fixed by #1602
Assignees
Labels
site Area: frontend dashboard
Milestone

Comments

@greyscaled
Copy link
Contributor

greyscaled commented Apr 14, 2022

Overview

In v1 of Coder, we use a React error boundary to capture runtime exceptions for better presentation and support.

For a demonstration of what this looks like, see the screenshot on our v1 documentation at https://coder.com/docs/coder/latest/feedback#reporting-a-problem

Details

The code for the error boundary is located at product/coder/site/src/AppProviderErrorBoundary.tsx in v1.

This code can't be ported directly, there are some providers and contexts we don't have in v2. For example, the user now comes from xstate.

The error boundary is kept light and just passes information to a pure presentational component. In V1 we called this component Fallback.

Fallback Component

There's a component definition, test and storybook located at product/coder/site/src/pages in V1. There are some fetches and additional logs we populate that may not be applicable yet in V2.

A good start to have the error boundary in place would list just the error and information about the user, and nothing else. Therefore this component can be greatly simplified.

@misskniss
Copy link

Hey team! Please add your planning poker estimate with ZenHub @presleyp @vapurrmaid

@greyscaled
Copy link
Contributor Author

This is a good first issue for KP, as it deals with a v1 -> v2 port/cleanup, including:

  • react error boundary + components
  • storybook
  • unit test

@misskniss misskniss assigned Kira-Pilot and unassigned code-asher May 17, 2022
Kira-Pilot added a commit that referenced this issue May 19, 2022
Kira-Pilot added a commit that referenced this issue May 20, 2022
* added error boundary and error ui components

* add body txt and standardize btn size

* added story

* feat: added error boundary

closes #1013

* committing lockfile

* added email body to help link
kylecarbs pushed a commit that referenced this issue Jun 10, 2022
* added error boundary and error ui components

* add body txt and standardize btn size

* added story

* feat: added error boundary

closes #1013

* committing lockfile

* added email body to help link
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
site Area: frontend dashboard
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants