-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Multiple Preview Windows #1335
Comments
❤️ |
+1 I was just going to suggest this idea but chose to check the issues in case someone else got there first. I basically would like something similar to what Chrome offers when dev tools are open: a configurable set (probably with some common sizes out of the box) of sized preview panes/boxes/viewports for showing the same component in multiple things at once like an iPhone 5 and an iPhone 7 and a Samsung S6, etc. |
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. We do try to do some housekeeping every once in a while so inactive issues will get closed after 90 days. Thanks! |
Hey there, it's me again! I am going to help our maintainers close this issue so they can focus on development efforts 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! |
I really want this feature, but I'm not sure how it would work. We would need to "mock" the window width for each size variation of the component. The only way I know of achieving this is with iframes. However, the issue with iframes is that are isolated from the page's styles, so we'd have to inject styles into each iframe, somehow. This could quickly become a performance problem, if you're rendering several iframes at the same time, each with their own styling (+ any logic for HMR). |
Working on components with multiple viewports at once would be great. |
You can hack addon-docs to do something like this pretty easily, although it's not what the feature is intended for: https://github.com/storybookjs/storybook/blob/next/addons/docs/docs/mdx.md |
Yep, this would be really awesome!
I don't know this, I took a quick look at it, but unfortunately I have no idea how to use it straightaway. |
@PutziSan Sure, I can do that. Can you provide some static HTML of what a good implementation might look like, and I can privide a POC using SB Docs? |
@shilman That would be really awesome! |
why
It is nice to be able to see many story previews at once. I can think of two main use cases for this:
Lonely Planet implements this as a single story, but it would be a lot cleaner if it could be implemented as five different stories, that are displayed on the same page.
what
I don't have a particular implementation in mind, but am writing this up for @alexandrebodin who is interested in making the Storybook UI pluggable. I think this could be layered as a plugin on top of a deeper story hierarchy, such as #1329
The text was updated successfully, but these errors were encountered: