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

Indent issue on story source codes #99

Closed
niklasmh opened this issue Oct 9, 2019 · 2 comments · Fixed by #130
Closed

Indent issue on story source codes #99

niklasmh opened this issue Oct 9, 2019 · 2 comments · Fixed by #130
Assignees
Projects

Comments

@niklasmh
Copy link
Member

niklasmh commented Oct 9, 2019

Describe the bug

The source code in the storybook examples is misformatted.

This is probably a core storybook problem as someone else has already filed an issue on the topic: storybookjs/storybook#8078

To Reproduce

  1. Go to http://storybook.online.ntnu.no
  2. Navigate to Feedback -> Spinner -> Show code

Expected behavior

We want a pretty output:
image

Screenshots

Thus we are getting this instead:
image

@plusk plusk added this to Other in Status Oct 13, 2019
@kharann
Copy link
Contributor

kharann commented Oct 31, 2019

Doesnt storybook have a linter?

@niklasmh
Copy link
Member Author

niklasmh commented Oct 31, 2019

@kharann I think they have some kind of formatter, or something configurable in normal js-stories, but it seems like mdx-stories do something different as the issue only exists there. Now I am just guessing, but it currently seems like a problem with the MDX implementation. I also noticed now that if we go back to normal old fashion stories (aka no MDX), we will not get the source code at all. This is apparently a known issue as well: storybookjs/storybook#8104. Another thing to notice is that this is only an issue with TS. Luckily for us they are actually working on it as we speak: storybookjs/storybook#8499

It is a @storybook/addon-docs problem, meaning it should probably be fixed by them. But if anyone here wants to debug and track down the core issue, you are more than welcome😄 It is still hacktober, so if you are up for a challenge, go for it!

They have it on their TODO, so they will hopefully fix it in the future:
image

@plusk plusk moved this from Other to In progress in Status Nov 14, 2019
@plusk plusk closed this as completed in #130 Feb 5, 2020
Status automation moved this from In progress to Done Feb 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status
  
Done
Development

Successfully merging a pull request may close this issue.

3 participants