storybook: [Bug]: Descriptions from JSDocs not rendered for Angular stories in 7.0.0-beta.60
Describe the bug
I have a Storybook set up for an Angular library which is using autodocs. I have updated to CSF3.
If I put JSDocs above my exported functions, they do not appear in the Doc page, either for the main description or on the individual stories.
e.g. following the docs, I had the following, but the description is not rendered.
/**
* It should be possible to write a description here
*/
export const ExtensionCaseSensitive = {
render: (args: FileDropzoneComponent) => ({
props: args,
}),
...
To Reproduce
https://github.com/freon27/storybook-issue-repro/
The doc page for Header should show the JSDocs (as far as I understand it).
System
No response
Additional context
No response
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 5
- Comments: 16 (4 by maintainers)
I can confirm that this is still an issue on Storybook 7.1.0 and Angular 16. It does not recognise JSDoc on any Angular components nor does it recognise the JSDoc on the Storybook meta and stories either.
Can confirm this issue still exists using Angular 14.3 and Storybook 7.0.21.
@abidhmuhsin after trying so many different things, your solution fixed it for me. Thank you!
Adding the fix that worked for me. The storybook tsconfig looked like it was parsing only stories.ts and preview.ts files. I had to manually add *.component.ts in the tsconfig includes array where the jsodc comments actually existed.
I created a library project using Angular 18 and added storybook to the library, but the jsdoc comments were not rendered. Versions used.
I could fix it by adding “…/src/lib/**/*.component.*” to the includes array in .storybook/tsconfig.json which was autogenerated in the library root folder when using npx storybook init.
"include": ["../src/**/*.stories.*", "./preview.ts", "../src/lib/**/*.component.*"],I am still experiencing this issue with Angular 16 and Storybook 7.6.4