-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
allow to dynamically generate stories / args #1
Comments
In Storybook V7 to dynamically generate CSF they have introduced the Indexer API, which is what So, we could theoretically already support this feature just by enhancing the parsing of the Not saying necessarily is something we can do anytime soon, just want to understand if there are any other constraints I am not aware of? |
Yes, the new indexer api is nice - at least in principle. One still has to implement the transpiling to csf: https://github.com/storybookjs/storybook/blob/next/docs/api/main-config-indexers.md#transpiling-to-csf |
That's a very handy link for the API docs, thank you @tobiasdiez. I guess my point is whether this type of feature would really be in the scope of this addon. If you are dynamically generating stories, the developer's experience of writing Vue SFC might not be the first thing you need. Obviously, if this can be supported without much effort, would be great, but it seems a non-trivial use case for which Storybook already provides a valid alternative. The risk I see is to manage (and maintain) yet another level of pre-processing of the SFC file which might conflict with the future transform we will put in place to support the most advanced features. I suppose this is something we can revisit at some point in the future. |
* chore: init * chore: remove enforce * chore: npm run * fix: nuxt options * chore: update deps * chore: fix tsup commands (#1) * fix: path, close #2 * build: use tsup.config.ts * chore: update dependencies (#5) * chore: update deps * fix: `pnpm run dev` error (#7) * fix: pnpm run dev error * style: lint fix * fix: fix dev error (#9) * chore: update deps * chore: update * fix: cjs exports (#10) (#11) * feat: add esbuild export (#12) * ci: update release script * chore: update deps * feat: add esbuild export (#14) * feat: add esbuild export (#13) * chore: lint * chore: add deps of 'chalk' (#15) Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com> * chore: update deps * fix: 'UserOptions' set to optional (#18) * feat: use type=module (#16) (#17) * fix: pnpm workspace config (#19) * chore: update deps * fix: nuxt module hooks (#20) * chore: update deps * chore: update deps * chore: update ci matrix * chore: update deps * chore: lint * feat: update builds * ci: add permission * docs: update (#21) * docs: update playground link (#22) * feat: template update (#25) * fix: require(...) is not a function (#28) * update * fix linter * fix astro * fix tests * use jiti over esno * update all eslint * dedupe * update node used for linter * fix prettier --------- Co-authored-by: Anthony Fu <anthonyfu117@hotmail.com> Co-authored-by: TropicalRaisel <87331818+TropicalRaisel@users.noreply.github.com> Co-authored-by: dengqing <dengqing0821@gmail.com> Co-authored-by: Tedy <1197633750@qq.com> Co-authored-by: snowingfox <1503401882@qq.com> Co-authored-by: Rongger <934004841@qq.com> Co-authored-by: 三咲智子 <sxzz@sxzz.moe> Co-authored-by: Alex Liu <larch.liu@gmail.com> Co-authored-by: ntnyq <ntnyq13@gmail.com> Co-authored-by: Robert Soriano <sorianorobertc@gmail.com> Co-authored-by: Ray <i@mk1.io> Co-authored-by: yuyin <38490578+yuyinws@users.noreply.github.com> Co-authored-by: lrs <104537923+RuSenLi@users.noreply.github.com>
Example of how this may look:
This is currently blocked by storybookjs/storybook#9828.
Once this is implemented, add https://storybook.js.org/docs/vue/writing-stories/introduction#using-args as example.
The text was updated successfully, but these errors were encountered: