-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
[Bug]: tsx story's parameters.docs.source.type = 'code'
shows compiled js code
#21747
Comments
@valentinpalkovic could this be due to the changes in #21629 ? |
I experience the same issue. After transition from v6 => v7 all docs with render functions have not the same output as v6. It seems docs: "code" makes no difference: |
same exact issue here. Is there a workaround to get show code to work with 7? |
@mscrivo There is one but only when you are really desperate :) you can create template literals ( the backticks ` ) from your code for example const codeSnippet = and then you can pass it in the exact story like |
Just kindly asking when to expect a fix for this issue. Right now it's kind of a breaking change for us, we have hundreds of stories and it's just not a practical solution to provide the code snippet in parameters.docs.source.code. |
That's great! |
Yowza!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.1.0-alpha.4 containing PR #22048 that references this issue. Upgrade today to the
|
@shilman To be latest please~ |
Whoopee!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.5 containing PR #22048 that references this issue. Upgrade today to the
|
This is still an issue for me.
Show code shows:
|
The fix only aimed to not show compiled code anymore. I am not sure, whether we only want to display code from the |
It seems like maybe a reasonable thing to do, let's open a feature request for it? |
Describe the bug
Doc's source view shows precompiled code while trying to provide sample with TypeScript code.
It also includes unnecessary parts such as
play
,args
etc..where previously only showed what's in
render
part.To Reproduce
zb-sj/storybook-issue-21747/Issue.stories.tsx
System
Additional context
was first discussed at discord
The text was updated successfully, but these errors were encountered: