-
-
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-info] Need another way to pull description from docgen info #4373
Comments
Marking this as a todo for #4341 |
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! |
This looks similar to #4643 |
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! |
Bug or support request summary
I created components with docgen description comments like:
And then I create a story named "Secondary Button", when I click "Show Info" I expect to see "This is the description" from my component somewhere on the page, but I do not.
If I rename the story to just "Button" then I do see "This is the description".
The problem seems to be in the
_getComponentDescription()
function, which is comparing thedisplayName
of the component tocontext.story
, which appears to be the story name.It seems like having a secondary condition here might be useful. One approach might be adding another option to the parameters for info like:
Another option would be to allow passing the class where we can currently pass a string description (ie.
text
), ie:As a bonus, with multiple components, this would allow us to tell which component to get the description from.
Thoughts?
Steps to reproduce
Create a story for a component that has a docgen description comment, where the story name is not the same as the component's
displayName
property and you will see this issue.Please specify which version of Storybook and optionally any affected addons that you're running
The text was updated successfully, but these errors were encountered: