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

Specific deep link options #1739

Closed
vgpena opened this issue Aug 25, 2017 · 8 comments
Closed

Specific deep link options #1739

vgpena opened this issue Aug 25, 2017 · 8 comments

Comments

@vgpena
Copy link

vgpena commented Aug 25, 2017

My project team has been using Storybook to, among other things, share dev progress with designers and project managers. Being able to send each other URLs deep linked to stories has been really useful.

It would be great to expand this utility to create per-story buttons that copy specific URLs to the clipboard:

  • fullscreen deep link (handy for project managers to quickly review)
  • hide components list, but show knobs panel (handy for devs/designers to confirm specific behavior)

To riff off of #1680, having knobs in the URL is handy for calling attention to specific states, but a button for "current story with default knobs" would also be handy for checking the base state.

@shilman
Copy link
Member

shilman commented Aug 26, 2017

@vgpena I think there are a couple different aspects to this issue:

  1. functionality to be able to link to a particular state
  2. UI for how to do that

Disregarding the UI for a minute, I believe the functionality you're asking for already exists, but may not be easy to find. You can click on the "CMD" button in the upper left corner to see the keyboard shortcuts:

storybook

Then you can toggle the confusingly-named "left" and "down" panels as needed (which will be made less confusing in #1692). This will also change the URL accordingly.

By jumping through these hoops, I think you can get all the functionality you want. Can you confirm this?

Back to the UI, there have also been attempts to add UI for setting these options (PR here: #981, demo here: https://usulpro.github.io/storybook-ui/)

This can obviously use some design work, but I'm curious how close this all gets to satisfying your use case. Feedback welcome!

@usulpro
Copy link
Member

usulpro commented Aug 26, 2017

My two cents to this:
Knobs panel has "Reset" button which sets all knobs to the default values and changes the URL appropriately. Isn't it same as you asking for

"current story with default knobs"

@Hypnosphi
Copy link
Member

Knobs panel has "Reset" button

Let’s make it a link (using RoutedLink from @storybook/components)

@morgs32
Copy link

morgs32 commented Sep 13, 2017

@Hypnosphi What's this you speak of? Is there any documentation of RoutedLink

@Hypnosphi
Copy link
Member

Hypnosphi commented Sep 13, 2017

It's an internal component, used in menu, for example. Basically, it's a native html link with changed behaviour on plain left click, so that instead of reloading the page it dispatches an action

@morgs32
Copy link

morgs32 commented Sep 14, 2017

Is there any way to reset knobs from within the iframe? From within a decorator for example?

@stale
Copy link

stale bot commented Nov 2, 2017

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!

@stale stale bot added the inactive label Nov 2, 2017
@stale
Copy link

stale bot commented Nov 17, 2017

Hey there, it's me again! I am going close this issue to help our maintainers focus on the current development roadmap 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!

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

No branches or pull requests

5 participants