Is it possible to disable the new "Creating and editing stories from controls" feature? #27219
-
SummaryThe new feature for creating and editing stories from controls is great, but with my (idiosyncratic) setup it doesn't work, and I'd like to disable it since it just gets in the way. Is there a way to prevent that "You modified this story..." popup from appearing altogether when I use the Controls? Additional informationNo response Create a reproductionNo response |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 5 replies
-
I'm also looking for a way to turn this off. I just get errors in the terminal about Unexpected tokens (I'm using svelte stories)
|
Beta Was this translation helpful? Give feedback.
-
Same problem for us, I mean, we want to disable the [ + ] button next to the search bar, as we are not going to use this feature. But I was looking the docs and there's no reference about how to do it. |
Beta Was this translation helpful? Give feedback.
-
What is the intended value for this feature anyway? What benefit is gained from making it easy to uninentionally overwrite a story file? |
Beta Was this translation helpful? Give feedback.
-
Can you tell me more about your idiosyncratic setup and what specifically breaks? I'm discussing providing a config option with the team to disable these new features |
Beta Was this translation helpful? Give feedback.
-
I just took a look, and I'm pretty sure the main problem on my end is related to Docker permissions, since I'm seeing this in my terminal:
Aside from running Storybook in Docker, the main idiosyncrasy with my setup is that I make all my stories effectively async (via a global loader and some boilerplate in my |
Beta Was this translation helpful? Give feedback.
-
One of the best features of Storybook is creating a sandbox where you can adjust props on-the-fly and see how the component changes. When we use Controls to adjust props, we're not modifying the story - we're using Storybook to try out the component. In my opinion, this feature ("You modified this story. Do you want to save your changes?") contradicts one of the main reasons for using Storybook. |
Beta Was this translation helpful? Give feedback.
-
I posted in another discussion on this but essentially, we have over 100 developers and since upgrading to latest SB, this feature has caused an absolute explosion in "useless" stories that are nothing more than a tiny derivation change in another story (think every permutation possible of color/size/variant for a button). We already have a "permutations" story that covers all possible options in a single story. We don't need a unique story for every possible change. Outside of trying to encourage our developers to not actually click the "Save your changes" button, it would be a whole lot easier to just disable it. |
Beta Was this translation helpful? Give feedback.
-
We're adding the option. For anybody who wants to track the issue it's here #28377 |
Beta Was this translation helpful? Give feedback.
-
Besides the questionable value as indicated by other commenters above, this feature generates broken and stylistically incorrect story code for us. We use wc-storybook-helpers to generate story templates dynamically (an excellent tool), and the feature doesn't add quotes around kebab-cased arg names:
It also always generates a render function instead of simply expanding the default story with Even if Storybook somehow manages someday to correctly follow a project's prettier config or something like this and become compatible with tools like wc-storybook-helpers - my point is, why would a tool like Storybook be used to actually author story code on its own? I'm very grateful for all the developments that allow us to write shorter code for stories (CSF3 etc), but authoring them, including following the coding conventions etc. should be the responsibility of component developers (library authors) and not of Storybook. |
Beta Was this translation helpful? Give feedback.
We're adding the option. For anybody who wants to track the issue it's here #28377