-
-
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
[Bug]: Vue code snippets incorrect after 8.3 #29718
Comments
Hello, I have the same kind of issue here. It's kind of critical for my upgrades. I had to upgrade Storybook to fix an OOM error when building my storybook. It's probably due to vue 3.5.x that I'm using, I don't know. Since storybook 8.3 though, all my stories using template components are broken, the source code is not displaying any slot Is there any change related to the way we have to construct stories with templates ? |
For the PR that's linked in the description, line 71 of const componentName = displayName || ctx.title.split('/').at(-1)!; I think what's happening is that on line 67, where we get the display name, if |
As an odd workaround, you could set the For example: import { VBtn } from 'vuetify/components';
VBtn.__name = 'v-btn';
// ... This doesn't seem to work for more complex cases that use slots with many nested components though. All of those are still getting thrown out. |
Describe the bug
After updating to anything past 8.3, most of our autodoc code snippets are incorrect and can no longer be copied/pasted.
Here is a very simple example:
Prior to 8.3
After 8.3
The issue is that for some of our stories, we are simply passing Vuetify components into the story and documenting how we want them used internally rather that exporting our own components. For some reason, the code snippets are replacing the code we wrote and rewriting it using a component that doesn't actually exist (in this case
v-btn
changes toButton
).I suspect this comes from the Vue code snippet improvements done in this PR, but I haven't been able to figure out a way to get around it without simply downgrading to 8.2.9.
If there is a config or some other option that I'm missing, I'd love to hear it.
Reproduction link
https://stackblitz.com/edit/github-d6xn5f?file=.storybook%2Fmain.ts
Reproduction steps
Button
instead ofv-btn
System
Additional context
No response
The text was updated successfully, but these errors were encountered: