Skip to content

[Proposal]: Improve the design of Storybook errors #20657

Open
@MichaelArestad

Description

Is your feature request related to a problem? Please describe

@ghengeveld pointed out that our redbox errors are fairly scary and don't include actionable feedback to help resolve the issue and proposed we move to a format similar to the error style in the Interactions addon panel:

image

I think this is an excellent proposal so I mocked up what that could look like.

Describe the solution you'd like

I propose we have an error system that looks something like this:

known error

The above is an example of a known error where:

  1. We provide a short description of the error followed by details and instructions on what steps to take to resolve it.
  2. We provide a formatted version of the error (if feasible) to improve readability in addition to some syntax highlighting.
  3. We provide a link to related docs (if available) and an action to copy the error for sharing.
  4. OS, Browser, viewport, and branch details - this is not necessary for a V1

If the error is something we don't have suggestions for, it would look like this:

unformatted error

Here is what a totally unformatted error might look like:

formatted error

If you are interested in working on this, please send me a message on the Storybook Discord and I will provide Figma assets.

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions