Skip to content

Any plan on supporting on analysising stories and parameter in compile time? #41

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

Open
xiaozhikang0916 opened this issue Feb 8, 2025 · 3 comments

Comments

@xiaozhikang0916
Copy link

I am quite interesting in this project and have similar use case about generating preview pages of composable functions. Currently we have a simple ksp tool to collect all non-parameter composable functions into one single list page.

So my question is if there any plan on supporting compile time checking of those composable functions needed in stories? It will be some boilerplate code to register story functions and their parameters by hand-writing.

@congvc-dev
Copy link
Collaborator

I think it's doable. Right now I'm focusing on creating stories from @Preview composables rather than fully automated generated stories from any composable. You should take a look at my work here #70

@xiaozhikang0916
Copy link
Author

@congvc-dev It is possible to support auto registering parameters? Maybe parameters with primitive types or annotated with @PreviewParameter.

@congvc-dev
Copy link
Collaborator

@congvc-dev It is possible to support auto registering parameters? Maybe parameters with primitive types or annotated with @PreviewParameter.

@xiaozhikang0916 I believe it's achievable. From what i've learned, we can implement this functionality via either ksp or compiler-embeddable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants