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

Docs: Re-render MDX files when you fix a thrown error. #21454

Merged
merged 1 commit into from Mar 7, 2023

Conversation

tmeasday
Copy link
Member

@tmeasday tmeasday commented Mar 7, 2023

Closes #21440

What I did

Reset the error state on the docs renderer error boundary each time we render it.

How to test

  1. Add to Introduction.mdx:
import {Meta, Story } from '@storybook/blocks';
import * as ButtonStories from './Button.stories';

<Meta of={ButtonStories} />
<Story of={ButtonStories.Primar} />
  1. Check it shows an error

  2. Fix it (add a y to Primar)

  3. Check it renders.

  4. Try various combinations of multiple errors + multiple successes.

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • Make sure to add/update documentation regarding your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Maintainers

  • If this PR should be tested against many or all sandboxes,
    make sure to add the ci:merged or ci:daily GH label to it.
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]

Copy link
Member

@yannbf yannbf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you thank you, this makes the experience SO MUCH BETTER!!

@yannbf yannbf merged commit a5cccf7 into next Mar 7, 2023
@yannbf yannbf deleted the tom/21440-recover-from-errors branch March 7, 2023 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Docs Rendering does not recover from errors thrown in React
2 participants