-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Source addon should behave more like the Controls addon #12822
Comments
I would myself love the ability to generate the source code also from |
@grimly that's already working in |
@shilman the Maybe this feature request is not about what I need after all. |
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. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks! |
No stale bot, this one is pinned :) |
Is your feature request related to a problem? Please describe
I love how I can add the 'controls' addon and edit controls for each story 💯
I also love how this seamlessly integrates with the 'docs' addon and when visiting the Docs page I see my changes reflected in the preview there as well 💯
The frustration happens when I want to see the generated code. Adding the 'storysource' addon does not have the same behavior as the 'controls' addon. With 'storysource' all I see is something like this:
Which isn't at all helpful. So as a consumer if I want to dynamically fiddle with controls and then see the generated code - I have to first edit controls for the story from the Controls tab in the addons panel in the Canvas page. Then know to go to the Docs page, possibly scroll to find the same story, and then expand the code preview. 😞
Describe the solution you'd like
I'd like it if the 'storysource' addon had more intuitive behavior by functioning like the controls addon. Where when added a Source or Code tab would appear in the addons panel. And that tab would essentially have the same generated output you see in the Docs page when clicking "Show Code".
It should also pull from the same story params so that when needed I can override the code output via
Describe alternatives you've considered
I'm aware that with custom page templates I could manually set each story block with an 'ArgsTable' block. This would allow both editing toggles and seeing the generated code for each story from the 'Docs' page. However this would needlessly bloat the Docs page - especially for components with a lot of controls. Not to mention the amount of automation I'd be losing by giving up the 'Stories' block which is really convenient.
Are you able to assist to bring the feature to reality?
Possibly in the future but not at this time...
Additional context
The Source/Code block circled in red should be what the storysource addon displays
instead of this
The text was updated successfully, but these errors were encountered: