-
-
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
feat(addon-controls): support query parameters #12728
Conversation
Thanks for putting this together @yannbf! This def seems to be blocking a bunch of people from upgrading to args/controls. See #12291 for the original issue. I was thinking that we add UI for this in the controls addon, but that we build the URL parsing/ejecting functionality into the args code itself. |
Could you elaborate a bit more? |
Also another thing to note: we should ensure that the preview can read args from the URL also. |
So.. to sum up: I see that knobs had a bunch of checks based on the knob type and also based on groups (like subsections of knobs). Would we have the same logic in controls? |
This wouldn't be part of controls but just part of Storybook core. Args are a generic mechanism and controls are one of the apps that can use it (currently actions is the other addon that uses it, but we expect more in the future). |
Just to mention, that this 'deep-link' functionality enabler (for the controls addon) is much awaited! |
closing in favor of #13803 |
Issue:
What I did
Add support for query parameters so that users can enter URLs which will directly change the props, like it works in knobs.
How to test
If your answer is yes to any of these, please make sure to include it in your PR.