Code Monkey home page Code Monkey logo

Comments (8)

Justin-wei avatar Justin-wei commented on July 20, 2024 2

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.

j3rem1e avatar j3rem1e commented on July 20, 2024

What version of storybook/this addon are you using ?

from addon-svelte-csf.

jenniferworrall avatar jenniferworrall commented on July 20, 2024

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.

j3rem1e avatar j3rem1e commented on July 20, 2024

This issue has been fixed in storybook v7.5.0 through storybookjs/storybook#24008

from addon-svelte-csf.

j3rem1e avatar j3rem1e commented on July 20, 2024

btw you don't have to define argTypes, they should be automatically inferred by storybook.

from addon-svelte-csf.

jenniferworrall avatar jenniferworrall commented on July 20, 2024

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.

j3rem1e avatar j3rem1e commented on July 20, 2024

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.

jenniferworrall avatar jenniferworrall commented on July 20, 2024

from addon-svelte-csf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.