-
-
Notifications
You must be signed in to change notification settings - Fork 186
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
Extract props/slots/events documentation from source code #126
Comments
Is this still on the horizon? |
Hello @TO-koswald It is still on the horizon. I have been kinda swamped lately. I will have more news about it in a few hours. But first, one question: Since a Thanks for your insights. |
Hey @elevatebart, good to hear about this update. I quite like the way storybook solved it by just adding it to the controls. Kinda like that: They also generate a table in the I much prefer to have everything as automatic as possible and not use a special import, but detect which components are used on the root level (I think histoire already does that) and then extract the docgen info and apply it to the controls. |
Hi, are there updates? |
Sad that props, events, slots, etc are not auto-documented. Any update if this is going to be added and if yes, what's the current state? |
If I get around to it, it will be added. Here is what I have so far:
Work in progress, |
Any update if this is going to be added and if yes, what's the current state? |
Hello @BombaraGianluca Would you be interested in trying your hand at implementing it? The biggest challenge I see is that prop detection is done client side on histoire right now and it would have to be at least started on the server side to sue a file parser like |
Would also love this feature, currently looking at histoire vs storybook as to which we will use for documenting our design system. When implementing this feature it would be nice if it also would honor export interface LocalProps extends SomeImportedInterface {
/**
* Make it an only text button
* @default false
*/
text?: boolean;
} Currently the storybook auto generate feature ignores the imported interface, if histoire could have this feature it would be a big plus over using storybook. |
that is because of With Auto-docs is a massive feature for teams, particularly those wanting to create component libraries where automatically extracting props/events/slots/exposes and adding full JSDoc annotation, creates a great documentation experience for teams. Storybook has a lot of overhead and limited support for some Vue features, would be amazing to see Histoire adding auto-docs generation. I wonder whether it should be something that allow customization? Storybook uses the |
Clear and concise description of the problem
I would like Histoire to extract the props/slots/events documentation from the source code and display it as documentation within Histoire. By reusing the documentation in the source code it will prevent me from having to write it again somewhere else. This will ensure there is a single source of truth for the documentation of these props/slots/events.
Suggested solution
There is a package which can extract this information from your Vue source code, it is called vue-docgen-api. This outputs an object containing the information it was able to find in the code. With this object it should be possible to show the documentation for props/slots/events in Histoire.
Alternative
No response
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: