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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing title error in a MDX story file lacks path to that file #9651

Closed
hasparus opened this issue Jan 27, 2020 · 4 comments
Closed

Missing title error in a MDX story file lacks path to that file #9651

hasparus opened this issue Jan 27, 2020 · 4 comments

Comments

@hasparus
Copy link
Contributor

hasparus commented Jan 27, 2020

Describe the bug
Missing title error in a MDX story breaks all other stories.

To Reproduce
Steps to reproduce the behavior:

  1. go to your project
  2. start storybook
  3. create an empty MDX story
  4. 馃敟

Expected behavior

I see two possible improvements:

  1. Preserve the path to the broken file to display it in the error message
  2. Contain the error and display it in a toast or in another way that doesn't break access to all other stories (by design)

Screenshots

image

@shilman
Copy link
Member

shilman commented Jan 28, 2020

Is this specific to docs? All story errors result in this UI, and it's a design decision to force users to fix the errors before they can view the storybook.

@hasparus
Copy link
Contributor Author

Okay, so we can discard my point (2).
Totally correct design decision.

Still, the error could guide the user to the file that needs to be fixed.

I have "addon-docs", but I鈥檓 running storybook in dev mode. (no 鈥攄ocs flag).

@hasparus hasparus changed the title Missing title error in a MDX story file breaks all other stories Missing title error in a MDX story file lacks path to the file that needs to be fixed Jan 28, 2020
@hasparus hasparus changed the title Missing title error in a MDX story file lacks path to the file that needs to be fixed Missing title error in a MDX story file lacks path to that file Jan 28, 2020
@shilman
Copy link
Member

shilman commented Jan 28, 2020

That makes sense @hasparus. We can catch the error and re-throw a more user-friendly error in this case. Great call! 馃挴

@shilman shilman added the todo label Jan 28, 2020
@shilman shilman added this to Bite-sized in Hotlist Jan 28, 2020
@vanessayuenn
Copy link
Contributor

Hi! I am going through and cleaning up old issues in the repo. We just shipped a ton of improvements in Storybook 7.0, and I suspect this bug might be fixed already. Can you please try it out? If this issue persists with the latest version, please open a new bug report with a 7.x reproduction. Thank you so much! 馃檹馃徏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Hotlist
Bite-sized
Development

No branches or pull requests

3 participants