I really want addons and default decorator support for storybook.
Scared of running into webpack configurations myself,
I’ve been waiting for adding custom Providers and configurations#1595 to be resolved,
until today I tried just hacking the stuff to see if I can just get it working. (By hacking I mean editing files in node_modules/@redwoodjs/core/)
However I noticed storybook is going through a lot of changes itself, and now it has v6. Currently redwood has “5.3.21”.
The biggest challenge regarding to the upgrade is that you can’t really find the documentation for the old version. I did manage to find the doc files inside pile of past commits (configuration, using addons). I’ve only reached partial success though, because only some of the addons seem to work.
To make things more difficult, they don’t use “knobs” anymore in storybook, it’s “controls” now, so it gets harder to find relevant information.
Does anyone have a nice reference or a guide to setup storybook addons for redwood?
I began to think that upgrading to v6 is inevitable, but I’m not sure how much load there would be to change the codes for configuration.
You can get the source working by making the following adjustment to web/config/storybook.config.js (you may have to click another Story within the same group, so on the same Doc-page, to get it to show the option).
This comment on the Storybook repo led me in the direction for the solution; which I assume is needed because Redwood uses source-loader in its storybook/main.js.
I’ve tested a few of the addons, I’ve always found Storybook to be really… particular. Most addons work as well as they ever have for me. I’ve made use of most every Essential addons with no real issue, besides the one above.
I’m more than happy to share my repository if it’ll help anyone, it’s just very much a WIP.