You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Count in the Knobs tab is "behind by one" when clicking through stories #21
Describe the bug
When clicking through stories, the count (of knobs) in the Knobs tab is wrong. More specifically, it's always "behind by one", meaning that it's showing the count from the previous story that was selected.
To Reproduce
Steps to reproduce the behavior:
Have multiple stories with differing counts of knobs
Click through the stories
Expected behavior
The knob count should be correct.
@shilman I tried out addon-controls today and TBH I don't really like it. They make the story code really verbose and stretched out, and now the args definitions are far removed from the place where the component is being rendered. It's also kind of awkward to have to suppress props from appearing (opt-out) rather than purposefully adding knobs (opt-in). Default values for the controls are also awkward; in fact, I can't figure out how to do it, even after reading all the docs.
I think I'll be sticking with knobs since the resulting story code is much easier to read, understand, and maintain.
I think that's really unfortunate because the knobs API is far superior to controls, at least right now. I would actually consider staying on Storybook 6 indefinitely to avoid moving to controls.
Activity
shilman commentedon Dec 11, 2020
FYI, we’ve released
addon-controlsin Storybook 6.0. Controls are portable, auto-generated knobs that are intended to replaceaddon-knobslong term.Please upgrade and try them out today!
kaiyoma commentedon Dec 14, 2020
@shilman I tried out addon-controls today and TBH I don't really like it. They make the story code really verbose and stretched out, and now the args definitions are far removed from the place where the component is being rendered. It's also kind of awkward to have to suppress props from appearing (opt-out) rather than purposefully adding knobs (opt-in). Default values for the controls are also awkward; in fact, I can't figure out how to do it, even after reading all the docs.
I think I'll be sticking with knobs since the resulting story code is much easier to read, understand, and maintain.
shilman commentedon Dec 15, 2020
@kaiyoma we're aiming to deprecate knobs in 6.2 and remove them in 7.0
kaiyoma commentedon Dec 15, 2020
I think that's really unfortunate because the knobs API is far superior to controls, at least right now. I would actually consider staying on Storybook 6 indefinitely to avoid moving to controls.