Open endreujhelyi opened 2 months ago
Related to #22281
Do you a have a reproduction repo you can share? If not, can you create one? Go to https://storybook.new or see repro docs. Thank you! 🙏
@shilman I'm trying to create a reproducible example but haven't succeeded yet. It seems to be related to our custom babel-config, which was removed from the Storybook webpack in v8. I'm currently trying to identify what might be causing this race condition.
@shilman I was able to reproduce a similar issue. In this example, the Source
block displays different values depending on whether there is a Canvas
present in the MDX file. When there is no Canvas
, you can't override the type
of the Source
block.
https://stackblitz.com/edit/github-cyjyvh?file=src%2Fstories%2FButton.mdx
In my case, I'm unable to display anything other than the "code" type both in the Canvas
and the Source
block, but I couldn't reproduce that fully yet.
It might be related to issue #22922, as adding the @storybook/addon-storysource displays the same source code as the code block of the Canvas or the Source block itself, without allowing any override.
Describe the bug
After updating to Storybook v8, the code blocks under the canvas displays different code then previously when you click the "Show code" button.
Storybook 7
Storybook 8
I'm using CSF with MDX
This issue occurs with every story where I use MDX. When there is a
render
function in the story object, it outputs the entire story object instead of displaying only the JSX output as it did previously.Storybook 7
Storybook 8
Reproduction link
https://stackblitz.com/edit/github-cyjyvh?file=src%2Fstories%2FButton.mdx
Reproduction steps
I was able to reproduce it partly.
Canvas
block int the Button.mdx file and observe the different value rendered in theCanvas
block.System
Additional context
No response