-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Move addon-info
into addons panel
#1147
Comments
Maybe it would be better to split the |
If you are thinking about splitting it into separate panels it starts to sound like separate addons which already exist. |
@shilman is this a new addon? |
@bigassdragon i'm proposing modifying the existing addon, but it could also be a separate addon. it seems like there are a bunch of addons that do similar things in this space, so it would be nice (i think!?) to consolidate and remove duplication of work... |
@shilman is there a link to the existing addon we are talking about? I tried looking for it but I have never seen or heard of |
@bigassdragon sorry for the confusion. hopefully this clarifies? |
@shilman OOOOHHHHHHH. I definitely get it now. yeah I use those. However I thought there was an addon that already does a panel view of the documentation. I think you might be trying to do something like this: https://github.com/mihalik/storybook-addon-markdown However the difference is it would use the Is that correct? |
@bigassdragon AFAIK:
I think this should all be simpler, cleaner, and compatible with the rest of the plugins. |
@shilman correct, I was just making the comparison that you want the docs to show up in one of the panels in your picture above. |
@shilman I think this idea would be awesome. I kind of thought it would be cool to have the option to have it in the panel and if we put it in the panel let's provide the user the chance to remove the blue button that shows up where you switch between documentation and example. I think it would be really slick if we can have the ability to show the docs in a panel and also the configuration to hide the blue button because that could be redundant to show. |
Right now there are: Plugin for documentation: https://github.com/Gongreg/react-storybook-addon-docgen As far as I understand the info addon is kinda like a wrapper for these two. I think it would be good to have simply two separate addons inside monorepo, so users could choose to op out from using one of the addons if they want to. And then the info addon wouldn't be necessary at all. |
Thanks @Gongreg that makes a lot of sense. I think part of the problem is that |
Here's another reason this should happen: |
+1 really wish it worked this way |
Furthermore, we should get rid of the Either: storiesOf('MyComponent', module)
.addDecorator(withInfo(title, description))
.add('foo', () => <MyComponent />)
... Or something like: storiesOf('MyComponent', module)
.add('foo', () => <WithInfo title='my title' description='my desc'><MyComponent /></WithInfo>) |
+1 for the first option |
@shilman yes this seems like a very easy thing to change and a good practice to establish. A lot of addons out there follow the |
I looked briefly into replacing
However these issues are probably easily solved. I am happy to help with updating these packages and bringing them into core alongside deprecating the info addon if the respective authors would like that to happen (@wcastand, @mihalik?) |
Hi, I wouldn't mind putting jsx into the monorepo but i'm not okay with the i use the |
@wcastand -- do you mean you don't like the fact that the story gets "polluted" with the decorator? Is there a specific reason you don't like it (i.e. does it stop you doing something?), or is it more a matter of style? (I don't really like it either) I am looking at this from a short-term perspective. The issue with Also the nice thing about the decorator pattern is you can apply it to a whole chapter or even all stories in a natural way using an API that users are familiar with. My slightly longer term suggestion is to solve #993 and pass options in the A new addons API would be good! But it seems a bit further off. |
I've published |
@shilman I know this is an old issue, but is there plans to implement this? I'm running into this problem where the addon info button is blocking parts of my component preview and would love for this data to appear in the addons panel. |
@JamesIves Yeah it's been on the back burner for a long time but I have a prototype running and plan to release it in 5.1. we're putting a focus on component documentation now that 5.0 has been successfully released. Note: it may be a new add-on that supercedes addon-info |
Excellent! Is there an ETA for that release? |
Hopefully we can get that feature available in prerelease by mid-April and a solid first cut by May |
@JamesIves --> you can define this in the configuration of the info addon as well: e.g:
|
Thanks @avrilpearl ! This is a great workaround. |
Do we have any news about this @shilman? |
@inspiratweb Addon-docs has been in alpha for over a month and is nearing beta. It solves a ton of problems with addon-info and adds a bunch of new features as well. Read about it here: https://medium.com/storybookjs/storybook-docs-sneak-peak-5be78445094a And get started here: https://docs.google.com/document/d/1un6YX7xDKEKl5-MVb-egnOYN8dynb5Hf7mq0hipk8JE/edit?usp=sharing |
FYI |
This is the most up-voted issue in the Storybook repo and I'm closing it. If anybody wants to pick this up, feel free to create a PR. For those who care, here's the full explanation:
Thanks for using |
It would be wise to redirect from the Info addon to the Docs addon in the Info page on Github, or warn about the deprecation in some sort of way there, just so that people know that the Info addon is not being supported anymore and that they should use Docs instead, and avoid wasting time trying to make it work. |
@DiegoBM done. thanks! |
Why
Currently
addon-info
shows component info in the preview pane alongside each story. This behavior differs from typical addons, that display their info in the addons panel.Modifying the behavior to use the addons panel would make the addon available for react-native. It also means that addon-info can benefit from addon panel UI improvements in future versions of
storybook-ui
.EDIT: It would also make the addon compatible with
storyshots
What
The text was updated successfully, but these errors were encountered: