-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Docs: Show errors when stories throw in docs #21212
Conversation
this.channel, | ||
this.storyStore, | ||
this.renderToCanvas, | ||
this.inlineStoryCallbacks(story.id), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously we passed error callbacks that basically did nothing.
story, | ||
element, | ||
{ | ||
showMain: () => {}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use this to show a spinner or something until the story has rendered but I'm not sure there's much call for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! A few minor comments, but none blocking.
Co-authored-by: Jeppe Reinhold <jeppe@chromatic.com>
From @ndelangen :
|
…rybook into show-docs-errors
I updated to use @ndelangen's component. It looks better in Chrome, arguably worse in other browsers. I'll just merge and we can iterate -- @MichaelArestad when you have a min you can just work directly on the |
I found out why the e2e test were failing (and why only for safari and firefox!) The stacktrace in safari and firefox do not contain the error.message. I improved the ErrorFormatter component to handle these cases better. |
I will take a look at this on Monday. I am also doing a pass at styling docs in general and I could use a bit of help. |
Thanks for sorting this @ndelangen. I guess we can wait to merge this then if @MichaelArestad is look at it so soon. |
@shilman I'm going to merge this when it's green |
Closes N/A
What I did
Made it so errors show up in docs mode:
Not perfect but a lot better than the nothing it showed before.
How to test
Create a story with an error, check it in docs.
Checklist
MIGRATION.MD
Maintainers
make sure to add the
ci:merged
orci:daily
GH label to it.["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]