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

Сustomizable panel name / ability to add multiple tabs #32

Closed
SuperOl3g opened this issue Oct 4, 2017 · 12 comments
Closed

Сustomizable panel name / ability to add multiple tabs #32

SuperOl3g opened this issue Oct 4, 2017 · 12 comments

Comments

@SuperOl3g
Copy link

Firstly great thanks for such useful plugin!
Secondly How about add ability to create multiple tabs with docs.
I think "README" + "CHANGELOG" is pretty frequent case.

@SuperOl3g
Copy link
Author

I can help and do this, but I wanna know your opinion about the concept.
You may have to rename your package according to this idea 🙂

@tuchk4
Copy link
Owner

tuchk4 commented Oct 6, 2017

Hi,
I like this idea! But not sure if it is possible to implement (I mean dynamic panels)

Panels are registered after importing storybook-readme/register at .storybook/addons.js.

I think we can make it configurable:

import register from `storybook-readme/register`

register({
  panels: ['README', 'DOCS',  'CHANGELOG']
});

At stories:

const withChangelog =  storybookReadme.at('CHANGELOG');
const withReadme =  storybookReadme.at('README');

storiesOf('Button', module)
  .addDecorator(withChangelog(ButtonChangelog))
  .addDecorator(withReadme(ButtonReadme))

And we should hide panel if it is unused at active story.

@tuchk4
Copy link
Owner

tuchk4 commented Oct 6, 2017

@ndelangen What do you think about this?

@SuperOl3g
Copy link
Author

Yeah, sounds good!
But AFAIU there is no possibility to hide panel if we have no content.

@tuchk4
Copy link
Owner

tuchk4 commented Oct 9, 2017

@SuperOl3g if it is not possible to hide panels - this feature will be not so useful.

If there is story without docs / changelog / readme / etc. - all panels will be shown and with empty content.

But we can contribute to storybook :) Suggest "Hide panels" feature

@ndelangen
Copy link
Collaborator

@SuperOl3g @tuchk4 I'm working on improving the extensibility of Storybook to make these things much easier. Not just to make addons hidable, I think that would be selling a faster horse.

What I'm working on is a re-implementation of the core ui layout. It would allow users to show multiple addons at once, in any split-configuration they please.

It's likely a 3.4 feature

@tuchk4
Copy link
Owner

tuchk4 commented Oct 12, 2017

So multiple tabs with different docs will not be useful (until it is possible to hide tab if there is no assigned doc).

@SuperOl3g Actually we can implement tabs inside main tab.

image

If you would like to implement it - I will be happy. Consider that the same behaviour should be implemented for withDocs api.

@SuperOl3g
Copy link
Author

@tuchk4 Sorry, I think this solution doesn't look cool enough.
@ndelangen how can I help to implement new core API feature?

@tuchk4
Copy link
Owner

tuchk4 commented Oct 17, 2017

This is feature is not useful until it is not possible to hide panels.
I close this issue for now.

Please reopen if you have another idea how to implement it :)

@tuchk4 tuchk4 closed this as completed Oct 17, 2017
@SuperOl3g
Copy link
Author

affirmative)

@ndelangen
Copy link
Collaborator

@SuperOl3g Join me on the Storybook slack and we can discuss how we can co-dev this feature.
https://now-examples-slackin-nqnzoygycp.now.sh/

I would be super happy to peer with you on this!

@ndelangen
Copy link
Collaborator

I've opened a PR here:
storybookjs/storybook#2101

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

No branches or pull requests

3 participants