-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Addon-docs: Opt out of dynamic snippet rendering #11526
Comments
Want to give something stronger than just a "thumbs up" for this. I tried v6 RC.4 yesterday and the snippet rendering for our project was broken or otherwise inadequate for all but the simplest of story sources (using the "CSF stories with arbitrary MDX" recipe). For some, it even hit callstack limits and broke the page entirely. Basically, we hit many of the issues captured here (https://github.com/storybookjs/addon-jsx/issues) and here (https://github.com/algolia/react-element-to-jsx-string/issues), specifically the displayName problem with the newer React features and, not necessarily a bug, but the snippets aren't nearly as useful for documentation if they only display the returned JSX and not the entire source. Happy to try to produce simplified test case(s), if that would be helpful, though I suspect I should mostly direct that feedback at the upstream library. Thanks! And other than this, V6 was looking and feeling great! |
@kylegach thanks for the feedback. i knew this was a rats nest when I started us down this path, but we'll get it sorted out. opting out will be a good escape valve for people who were satisfied with the v5 behavior. |
Good golly!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-rc.10 containing PR #11601 that references this issue. Upgrade today to try it out! You can find this prerelease on the Closing this issue. Please re-open if you think there's still more to do. |
@TomWija do you have a repro I can look at? |
Here's one I put together that replicates the problem |
Thanks @TomWija, I'll try to get out a fix in the next RC 🙈 |
¡Ay Caramba!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-rc.14 containing PR #11650 that references this issue. Upgrade today to try it out! You can find this prerelease on the |
FYI, all of my issues are resolved as of RC15! 🎉 I don't even have to use this opt out. 🙃 |
@kylegach great news! will be tweaking this more before release -- hopefully I don't break anything for you 🙈 |
#11332 added dynamic source rendering for React, but many users prefer the existing 5.3 behavior. So we should give them the ability to opt out of the new behavior, at least until we've made it more bulletproof.
The text was updated successfully, but these errors were encountered: