-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
addon-docs: Description not showing in Documentation #9824
Comments
All of this looks good to me. Do you have a repro I can look at? |
Reproduction repository here: |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
@albshin You're using the manual configuration. If you do the manual configuration, you also need to provide a function to extract the component description. I recommend using the preset and have updated the docs accordingly. |
Hi, I got it to finally work using by switching over to the preset. However, I was required to use
but through further inspection, In the end, I ended up editing the webpack config in const path = require('path');
module.exports = {
addons: [
'@storybook/addon-storysource',
'@storybook/addon-actions',
'@storybook/addon-links',
'@storybook/addon-a11y',
'@storybook/addon-docs',
{
name: '@storybook/preset-typescript',
options: {
tsLoaderOptions: {
transpileOnly: true,
configFile: path.resolve(__dirname, '../tsconfig.json'),
}
}
}
],
webpackFinal: async config => {
config.module.rules.push({
test: /\.tsx?$/,
exclude: path.resolve(__dirname, '../node_modules/'),
use: [
{
loader: 'react-docgen-typescript-loader',
options: {
tsconfigPath: path.resolve(__dirname, '../tsconfig.json'),
propFilter: prop => {
if (prop.name) {
if (prop.name === 'css' || prop.name === 'ref' || prop.name === 'theme' || prop.name === 'as' || prop.name === 'forwardedAs') {
return false;
}
}
if (prop.parent) {
if (prop.parent.fileName.includes('react-select')) return true;
if (prop.parent.fileName.includes('styled-system')) {
// Filter out long form SpaceProps
if (prop.parent.name === 'SpaceProps' && prop.name.length > 2) return false;
return true;
}
return !prop.parent.fileName.includes('node_modules');
}
return true;
}
}
}
],
});
config.resolve.extensions.push(".ts", ".tsx");
return config;
}
}; |
@albshin sorry for the confusion. i'll be updating the documentation shortly -- we'll be moving away from |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
FYI the recommended 6.0 setup (should work in 5.3 too) is ready, and is the default in the most recent versions of both I am commenting on all props-related issues to request that you upgrade so we can get this right before release. Thanks! |
Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap instead. If the issue mentioned is still a concern, please open a new ticket and mention this old one. Cheers and thanks for using Storybook! |
Describe the bug
Description is being generated by
react-docgen-typescript-loader
but is not showing up in the DocsPage. Seems like a Webpack configuration error but I can't seem to figure out what it is. I am using TypeScript.To Reproduce
ProgressBar.tsx
console.log(ProgressBar.__docgenInfo)
outputs:ProgressBar.stories.tsx
webpack.config.js
.babelrc
tsconfig.json
Expected behavior
The description, "What's up?" appears on the DocsPage for ProgressBar.
Screenshots
System:
The text was updated successfully, but these errors were encountered: