Comments (8)
I'm using "storybook": "^7.6.4","@storybook/addon-svelte-csf": "^4.0.13",
and I am using the template
<Page {...args} />
I still having this issue.
from addon-svelte-csf.
What version of storybook/this addon are you using ?
from addon-svelte-csf.
What version of storybook/this addon are you using ?
We are using version 7.4.6 of storybook and 4.0.9 of this plug-in. Thank you!
from addon-svelte-csf.
This issue has been fixed in storybook v7.5.0 through storybookjs/storybook#24008
from addon-svelte-csf.
btw you don't have to define argTypes, they should be automatically inferred by storybook.
from addon-svelte-csf.
I just upgraded to 7.5.2 and no joy. I also deleted package-lock.json and node_modules just to be sure and verified the behavior. I was looking at the previous issue and thought I'd try removing let:args from the Template and when I do that, it does in fact work.
I can add this to the storybook repo instead though, doesn't seem to be an issue of the addon-svelte-csf package.
from addon-svelte-csf.
Do you have a repo where I can check ?
Storybook, when it parses the component for extracting the documentation/argTypes, add a hidden property with the component name deduced from the file location. This property is used to generate the source snippet. If the property is not present, then it will try to generate a component name from the javascript constructor.
However, when Storybook is in dev mode, it activates Svelte HMR which replace the class by a Proxy (for reloading/keeping states/etc).
So you can see Proxy as the component name when:
- Storybook is in dev mode
- The component couldn't parsed
However, in sb 7.5, the hidden property should always be present, even if the composant is not valid.
from addon-svelte-csf.
from addon-svelte-csf.
Related Issues (20)
- Migrate to new story indexer API HOT 3
- Svelte CSF Autodoc comments HOT 2
- [Bug] CSF Story Error HOT 2
- Posible to have typed args in the `<Template />` component? HOT 1
- [Bug] Support for `svelte 5` HOT 10
- [Bug] Setup with sveltekit fails HOT 6
- [Feature Request] Support for vite 5.x
- Request: typescript usage examples HOT 2
- [Request] A simple way to bind component story state to args HOT 2
- [Bug] Autodocs produce invalid code example HOT 2
- [Bug] cannot use some names in imports HOT 4
- [Bug] svelte-stories-loader doesn't preprocess stories when using Webpack
- [Bug] When calling the fn "superForm" from "sveltekit-superforms/client" we get error "Cannot destructure property 'story' of 'storyObject' as it is undefined." HOT 9
- [Bug] Custom Svelte event does not show up in actions tab? HOT 8
- Compatibility with Storybook 8 HOT 3
- [Bug] Not working with `getAbsolutePath('@storybook/addon-svelte-csf')` in Storybook 8 HOT 3
- [Bug] JSDoc description disappears with `lang="ts"` HOT 6
- [Question/Documentation] How to use with MDX? HOT 1
- [Bug] Exact same Stories doesn't render same way regarding their location ( ./src/** vs ./node_modules/** ) HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from addon-svelte-csf.