-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
API: Add method to set config for manager #8232
Conversation
…nager directly VS via parameters
I implemented the setting of Looking forward to hearing your feedback @shilman |
This pull request is automatically deployed with Now. Latest deployment for this branch: https://monorepo-git-core-setconfig-method.storybook.now.sh |
@ndelangen Super interesting, and raises lots of questions:
|
No, parameters are shared meta-data on stories, those are shared
If the data is for the manager only, parameters only make sense if the data is related/attached to a story
Would probably be a good change to make, that would be a breaking change though
We'd need to change the documentation & our examples.
No, not as it is right now. |
I understand it & it's a pretty cool change! Not exactly sure what's the best way to communicate it to users, but it's a big perf win. |
Addresses: |
It would be nice to get some stricter types on this. |
…d to be serialized & parsed over the channel
Issue:
Setting theme via parameters is really bad for performance
This is true for other config too.
What I did
ADD a setConfig option on lib/addons, to pass data/config into the manager directly VS via parameters
This PR adds a API:
You set this within
addons.js
.How to test
I've changed the dev-kits example to dark theme.
There's no flash of light theme anymore.