-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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]: 7.0.18 and newer broke custom non-prop args with Vue3 and Typescript #23352
Comments
I am also seeing a similar issue when using Angular when trying to add an additional custom control. The error:
Story with custom control
Environment info:
|
+1 |
Pinging @kasperpeulen here because the mentioned PRs are from you. Maybe you have an idea of what's going on. |
@kasperpeulen @chakAs3 any idea what's going on here? |
hi @vanessayuenn this is an old issue i don't what is wrong or if it is on the new releases. need a repro to look at it |
In my main post is a repro sandbox |
@johanvanhelden ok i will check it out and get back to you if i have some question |
@K3TH3R Could you provide a reproduction with https://storybook.new/ We actually have a test for this scenario: storybook/code/renderers/vue3/src/public-types.test.ts Lines 38 to 58 in 021c101
|
@kasperpeulen @chakAs3 @vanessayuenn I can confirm it is still broken in Storybook 8.0. Here is a fresh new reproduction environment with Storybook 8.0: If you want to see it working, here is a reproduction environment running Storybook 7.0.17 where it worked: |
@johanvanhelden This is probably related to this PR: Which rolled back an unexpected breaking change in 7.0. The correct way to write this in 7 and 8 is: const meta = {
component: Component,
render: (args) => ({
components: { Component },
data: () => ({ args }),
template: `
<Component v-bind="args">
Card content
<template #footer v-if="args.withFooter">
Footer for the card
</template>
</Component>
`,
}),
args: {
withFooter: false,
},
}; |
Hi there! Thank you for opening this issue, but it has been marked as |
Thank you! I've tried this method and it works flawlessly. |
Describe the bug
In Storybook 7.0.17 and below I had the following list of
args
:Where
withError
,withHelpText
andvalue
are custom controls. They are not props on the component in the story but used to make some reactive functionality work in the story itself. This worked great.After updating to 7.0.18 or newer (tried the latest v8.0.5) they stopped working and the story completely broke.
I assume it's either because of this: #22814 or this #22717 but that's just a guess.
I get the following typescript error:
To Reproduce
Here is a fresh new reproduction environment with Storybook 8.0:
https://stackblitz.com/edit/github-vrknd1-cwcnes?file=package.json
See that the story is now broken and the
withFooter
is not functional and the footer is also not visible.If you want to see it working, here is a reproduction environment running Storybook 7.0.17 where it worked:
https://stackblitz.com/edit/github-vrknd1-jpfa6f?file=package.json
The repro files can also be found here: https://gist.github.com/johanvanhelden/59abcf104c03d07e08d34eb11fd51511
System
Additional context
No response
The text was updated successfully, but these errors were encountered: