Project is not compatible with CSF3
I want to start off by saying that this project is super cool and I have found using it very simple. It's small and the code is well written and easy to follow 👍 but I still have a problem.
## Problem
The README.md states that the project is compatible with [CSF3](https://storybook.js.org/docs/api/csf) and lists limited examples. However, it only supports the args property and none of the others, like decorators, title, and parameters. This is misleading as CSF3 is more than just the args property.
The code in virtual-routes.ts shows that we use the module and pass the args as listed in the story.
```
isAstro
? (<m.default.component { ...m['${route.story.name}']?.args } />)
: (<m.default.component { ...m['${route.story.name}']?.args } client:load />)
```
This is fine for very basic use cases, but starts to break down when more complex tuning is required (such as accessibility and responsiveness testing). The lack of decorators support in particular makes this very boilerplate-heavy, requiring specific decorator components.
## Proposed Solutions
- Make it clearer that args is the only property supported, and some approaches to moving towards how CSF3 behaves. This will make it clearer for anyone picking this up for the first time and will save them some headaches.
- Add support for decorators. Regardless of the framework used, they are callbacks that return the story passed in. From my limited understanding, it should be possible to create a function that reads the decorators and recursively calls them? https://docs.astro.build/en/reference/astro-syntax/#astroself
I'm happy to raise PRs for either solution. If you have any comments or questions lmk, thanks again for this awesome project.
关闭于 2025-08-01 7 条评论