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

Core: Fix HMR error recovery #7684

Merged
merged 2 commits into from
Aug 5, 2019
Merged

Core: Fix HMR error recovery #7684

merged 2 commits into from
Aug 5, 2019

Conversation

shilman
Copy link
Member

@shilman shilman commented Aug 5, 2019

Issue: #7165

What I did

Error was not getting properly cleared in the story store, so I tried a few ways:

  • First commit changes story_store. The issue is that when user navigates, the error gets cleared.

  • Second commit undoes the first, and clears the error in the config_api (call configure(...)). This one clears the error when the user fixes the error OR when the user updates a different file

  • I cannot figure out how to clear the error only when the original error is fixed. I think the second approach is OK for now.

How to test

cd examples/official-storybook
yarn storybook
# edit a story & introduce a syntax error => error message
# navigate to another story => error message
# fix the error => story

@vercel
Copy link

vercel bot commented Aug 5, 2019

This pull request is automatically deployed with Now.
To access deployments, click Details below or on the icon next to each push.

Latest deployment for this branch: https://monorepo-git-7165-error-recovery.storybook.now.sh

@shilman shilman added this to the 5.2.0 milestone Aug 5, 2019
@shilman shilman changed the title Core: Fix error recovery on HMR in CSF Core: Fix error recovery on HMR Aug 5, 2019
@shilman shilman changed the title Core: Fix error recovery on HMR Core: Fix HMR error recovery Aug 5, 2019
@shilman shilman removed the discussion label Aug 5, 2019
@shilman shilman merged commit 6e5c2c2 into next Aug 5, 2019
@shilman shilman mentioned this pull request Aug 5, 2019
@shilman shilman deleted the 7165-error-recovery branch August 24, 2019 10:23
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.

2 participants