Skip to content
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 not working properly #7575

Closed
rahulpsd18 opened this issue Jul 26, 2019 · 4 comments
Closed

addon-info not working properly #7575

rahulpsd18 opened this issue Jul 26, 2019 · 4 comments

Comments

@rahulpsd18
Copy link

Describe the bug
Followed the readme to add addon-info to my storybook but the info created is wrong.
In my story source, instead of showing the JSX I have provided to the story, the following is shown:

<ReactDecorator story={<Tiles />} onMount={anonymous} onUnMount={anonymous} />

I am using typescript so I know PropTypes won't work out of the box and needs to be configured but the story source should render fine.

To Reproduce
Steps to reproduce the behavior:

  1. Followed readme to install addon-info
  2. Added it to config file
  3. Passed info parameter to my story
  4. Source story not as expected
  5. Then added withInfo as 1st decorator on my story
  6. No change in Source Story

Expected behavior
My Story Source should be render instead of <ReactDecorator ... />

Screenshots
CaptureIssue

Code snippets

storiesOf('RibbonBox', module)
    .addDecorator(withInfo)
    .addDecorator(withKnobs)
    .add('Default', () => (
        <Tiles>
          <Tiles.Card>
            <Tiles.Details iconSize="2x" iconName="id-badge" text="Lorem Ipsum" />
          </Tiles.Card>
          <Tiles.Card>
            <Tiles.Details iconSize="2x" iconName="cog" text="Dolor Sit Amet" />
          </Tiles.Card>
        </Tiles>
    ), {
        info: { text: 'Description' }
    }
})

System:

Environment Info:

  System:
    OS: Windows 7
    CPU: (4) x64 Intel(R) Core(TM) i5-4210M CPU @ 2.60GHz
  Binaries:
    Node: 10.15.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.15.2 - C:\Users\rahulpsd18\AppData\Roaming\npm\yarn.CMD
    npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD

Additional context
Regrading PropTypes: I followed the issue #1519 and integrated react-docgen-typescript-loader to add Prop Types automatically from my Typescript interfaces but no changes were seen in the storybook. It still showed the props: story, onMount and onUnMount as seen in the screenshot attached.

@stale
Copy link

stale bot commented Aug 16, 2019

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!

@stale stale bot added the inactive label Aug 16, 2019
@shilman
Copy link
Member

shilman commented Aug 26, 2019

FYI addon-info is being superceded by addon-docs, which fixes a bunch of bugs and is easier to maintain. It’s reached release candidate (RC) status and will be properly released soon. Please give it a try! https://medium.com/storybookjs/storybook-docspage-e185bc3622bf

@stale stale bot removed the inactive label Aug 26, 2019
@stale
Copy link

stale bot commented Sep 16, 2019

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!

@stale stale bot added the inactive label Sep 16, 2019
@stale
Copy link

stale bot commented Oct 16, 2019

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!

@stale stale bot closed this as completed Oct 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants