-
-
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
Feature Request: Should we unify and configure storybook in one place? #3242
Comments
We can think of something like that for the v4 release since it will be breaking. I would go further with that by making config.js even more formatted - webpack style. for example module.exports = {
stories: () => {},
addons: () => {},
babelConfig,
webpackConfig,
tsConfig,
} This way we can control a lifecycle of storybook config. |
I like the way you formatted |
As we are talking about v4, do you think |
+1 @igor-dv for the idea to reuse standard structure people understand from Webpack. So often new tools require people to learn a completely new set of commands, muscle memory would be thankful for this one! |
I don't want to take a full credit on that since I think @ndelangen was the first to suggest it somewhere =)
IMO it shouldn't be an addon =) |
@igor-dv Honestly, just using the same config for most popular tools would make front-end development so much easier to pick up or maintain project in my opinion 👏 |
Exactly, that's what I meant. I phrased it wrong by putting |
In the long long term, a overhaul of config/settings is inevitable. I like the idea @mshaaban088 actually brings up here to actually facilitate "settings for addons". Certainly something we want to address in the overhaul. |
It's in the roadmap now. |
Related to #4169. |
Let's consider this a duplicate of #4169. |
Issue details
I see every addon comes/might come with its own configuration/customization approaches, and I think we can benefit from
addon-options
to unify all of the configurations as described below:setOptions
is called with all the needed configurationsaddon-options
is responsible to emit aconfigure/options
-event with the passed configurationsstorybook-addon-viewport
for instances takes its configuration and adjusts accordingly.I think we should also use the addon unique-ID to be used as a configuration key
This is just my proposal and of course open for feedbacks, what do you think?
Edit:
I think if we go for the addon unique-ID, it will be easy to dispatch separate event for each addon with the subset of configuration needed for that addon, like
The text was updated successfully, but these errors were encountered: