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
CSF3: Default render functions for Svelte #15997
Comments
Svelte CSF is a "svelte-native" way to write stories. It compiles to CSF under the hood, but it's not actually CSF. Much like We released Svelte CSF as an addon for a couple reasons:
We've already made it the default that ships with new Storybook for Svelte projects, which means that it's a pretty aggressive experiment! In order to move it into the core I would want:
I'm guessing this would be a few lines of code to get working in CSF. I'm not sure what would be required in Svelte CSF since I'm not familiar with the codebase. We're doing a massive refactor of the core in #15871 which will have some minor changes to how this will work. Once that's merged (in the next week?) I can create a small POC PR for you to kick the tires on, and then maybe you can figure out what else needs to be done to make it complete. Let me know what you think! |
Sounds good to me! For csf3 in core: I don't see any bigger problems with supporting csf3 in core for svelte - even with play-functions (given the existing infrastructure f.e. sveltejest). As said, the only thing I'm unsure about are the custom inline render-functions simply because of the fact that svelte in general has a file-based, instead of a function-based, approach to components. Therefor it is unclear to me how this is intended to work in core - other then just returning imported components from the render-functions (which seems to be a bit pointless...). If there is some approach I'm not aware of I'm happy to hear about it or have a look at a POC. Besides those points I think csf3-support for svelte is a good first target to improve on and gather some experience for me in sb-land :) And I would like to benefit from existing and upcoming features (f.e. play-functions) of sb with csf3 while working on svelte projects :) PS: My first (unfinished) experiments are here: https://github.com/benbender/storybook/commits/svelte/csf3 |
closing this as fixed at some point in v6.x |
Broken out of #15498 for discussion @benbender
The text was updated successfully, but these errors were encountered: