Storybook: withInfo show functions

Created on 21 Mar 2019  ·  13Comments  ·  Source: storybookjs/storybook

withInfo source: true is great but it lacks the ability to show more complex source
Currently when doing something like this

<button onClick={(event) =>  handleClick(event)}>Click Me </button>

withInfo source shows

<button onClick={onClick}>Click Me </button>

ideally it would show the source as it appears in the story source code

<button onClick={(event) =>  handleClick(event)}>Click Me </button>

I will occasionally use react-markdown, create a readme.md file and render that in a story but it would be way better if source showed all the things that make up the source, not just the component definition.

Screen Shot 2019-03-21 at 12 22 45

info storysource feature request inactive

Most helpful comment

Hey, this is a reasonable request and a limitation of the info addon. I'm working on a replacement now that will be cross-view layer and support a bunch of new documentation features, so I'll try to make this request a part of that. No ETA yet for this specific feature but I hope to release the first version of the replacement in 5.1.

All 13 comments

Hey, this is a reasonable request and a limitation of the info addon. I'm working on a replacement now that will be cross-view layer and support a bunch of new documentation features, so I'll try to make this request a part of that. No ETA yet for this specific feature but I hope to release the first version of the replacement in 5.1.

@shilman that's great to hear man, thanks!!! i did actually try to clone the Storybook repo and investigate myself but i fear i'm not the man for the job... as you can see i only make buttons :-)

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 man! How’s it going? Have you had a chance to investigate this any further? I’d love to see a fix for this... cheers!

@shilman this is awesome... it’s gonna blow the design team’s mind! I can’t wait for tomorrow! Thanks man... and team!

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!

@PaulieScanlon This is working well in docs now:

Storybook

@shilman This looks great! what version of Storybook was this released in i'm still on 5.0.6

--update-- i updated to latest but still see the same thing... wondering if this is do with with either react-docgen-typescript-loader or i'm using a global withInfo decorator... any ideas?

@shillman 🤦‍♂️ Of course! Thanks man!

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!

Was this page helpful?
0 / 5 - 0 ratings