Skip to content
This repository has been archived by the owner on Nov 10, 2017. It is now read-only.

Fix passing info to wrapping Story component #41

Closed
wants to merge 1 commit into from

Conversation

danielkcz
Copy link
Contributor

I am sorry. I was certain that had I had fixed it in #37, but apparently not...

I am sorry. I was certain that had I had fixed it in storybook-eol#37, but apparently not...
@nross83
Copy link

nross83 commented Jul 23, 2016

I just ran into this same issue, currently there is no way to see the info content. This PR looks like it should fix it.

@Nickman87
Copy link
Contributor

I made a somewhat cleaner fix with consistent naming: #45

@roonyh
Copy link
Contributor

roonyh commented Aug 5, 2016

@FredyC @Nickman87 Thanks! Even with this fix, looks like if options are specified without info they will be ignored. Like, addWithInfo(storyName, storyFn, options). If possible could you make a fix for that as well?

@danielkcz
Copy link
Contributor Author

danielkcz commented Aug 5, 2016

@roonyh Makes sense, should be fairly easy to fix.

@Nickman87 I surely like your PR better, so if you can add that fix, I would close this one. Should be possible just by adding options = _storyFn on line 25.

@Nickman87
Copy link
Contributor

I added the swap for the options as well, but I think this is a very dirty way of doing things...
Why not just pass '' as the info when you don't want info? Behind the scenes the info gets changed to empty string anyway and it's not that much of a hassle to type it? :)

Now you make the interface very confusing as you use the same method with different sets of parameters and it 'just works'.
Just my two cents, fixing this is first priority.

@danielkcz
Copy link
Contributor Author

You are partially right, but it makes harder to switch between regular add and this one if you leave there '' parameter. Not even mentioning it feels very strange to be passing empty string there within the story as that argument is not named.

@danielkcz danielkcz closed this Aug 5, 2016
@danielkcz
Copy link
Contributor Author

Closed in favor of #45

@danielkcz danielkcz deleted the patch-1 branch August 5, 2016 14:36
@roonyh
Copy link
Contributor

roonyh commented Aug 5, 2016

Agree with both of you. @FredyC we are working on an api for addons that works better with regular add and with other addons :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants