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

Add support for preview-decorators. #582

Merged
merged 2 commits into from
Oct 28, 2016
Merged

Add support for preview-decorators. #582

merged 2 commits into from
Oct 28, 2016

Conversation

arunoda
Copy link
Member

@arunoda arunoda commented Oct 28, 2016

With this, we could set a decorator for preview via an addon.
This is pretty useful for Storybook Designer where we could add more tools to the preview area.

Currently, it's only possible to set only one preview decorator for the whole app.

@arunoda
Copy link
Member Author

arunoda commented Oct 28, 2016

@mnmtanish Check this out.
I also did this: storybook-eol/storybook-addons@c4d256c

@arunoda arunoda merged commit e424a38 into master Oct 28, 2016
@arunoda arunoda deleted the preview-decorators branch October 28, 2016 05:05
@thani-sh
Copy link
Contributor

We can give this feature without introducing another api function. In React Native Storybook it's done like this. To set a custom preview area, we just have to write an addon and call addons.setPreview in there.

For React Storybook, we can simply move the iframe code to an addon storybook-addon-iframe-preview and include it in addons.js file by default. If anyone wants to add a custom preview area (designer?) they can simply fork the iframe preview addon and change it as they wish.

I strongly suggest we remove the Preview decorator API methods from storybook-addons repo ASAP and use the existing one.

@arunoda
Copy link
Member Author

arunoda commented Oct 28, 2016

Okay. I'll revert.
No need to move iframe code into another project.
We can work with the old API.

@arunoda arunoda restored the preview-decorators branch October 28, 2016 06:10
@thani-sh thani-sh deleted the preview-decorators branch October 28, 2016 06:15
@thani-sh
Copy link
Contributor

I'm just saying that it'll be really easy to fork and extend it it's in another project

@arunoda
Copy link
Member Author

arunoda commented Oct 28, 2016

No need to fork and extend. We don't want to replace the preview. Just need to decorate it.
So, I we don't need this code at all.

@thani-sh
Copy link
Contributor

Let's agree to disagree then

@shilman shilman added the misc label May 27, 2017
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

Successfully merging this pull request may close these issues.

None yet

3 participants