-
Notifications
You must be signed in to change notification settings - Fork 9
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
feat: upgrade to Storybook 7 #30
Conversation
Hi @e0ipso, I've tried this canary version with Storybook 7.0.8 in a fresh install of Drupal 9.5.8. I've enabled all CL modules, including the The warnings of issue #29 do not occur, which is great. But storybook tells me it's unable to find a matching story indexer. Have you seen this error before? Google has failed me regarding this error, that's why I'm asking here. 🙏
|
I did encounter those errors. I was able to get passed them, only to be stuck later on Storybook not finding any stories. I remember searching for the error and that StackOverflow helped me out. Sorry for not being more specific. Once all works out, I will write a step-by-step tutorial. |
In the mean time, I recommend using Storybook 6. That does work. |
Hi Mateu, thanks for helping me out. I did find one workaround for my error. In features: {
storyStoreV7: false, // 👈 Opt out of on-demand story loading
}, This solves the missing indexers, but lands me at the error you describe: Storybook not finding any stories. I'll have a look and will otherwise fall back on Storybook 6. In case I come up with a solution, I will let you know here in the comments. |
I am also using this version and it works fine! But now I get an error for any
|
Update.
|
The key issue appears to be that without alteration Storybook 7's @storybook/server dependency doesn't understand how to parse our yaml files. Work was done recently to add a JSON parser to @storybook/server Do we need to file a bug with storybook asking for them implement a Yaml parser as well? |
That issue has been resolved. I've tested getting storybook 7 running with the package.json we've been sharing here and the added instructions that were shared in the linked issue. I can get the yml stories to be indexed with a one caveat: It appears stories need unique ids / Names now. Were we previously use the same id for buttons? Primary button and "Button" conflict on id because they are both named Button in the .stories.yml file. Same thing happens with banners. Buttons also have a conflict because the sdc_examples_replacement module (that isn't enabled) has a Button story that conflicts the enabled button. |
I think this is ready to merge. I created This should create 2.0. |
BREAKING CHANGE: This requires an update to Storybook 7.
📦 Published PR as canary version:
1.0.28--canary.30.1f73a32.0
✨ Test out this PR locally via:
npm install @lullabot/storybook-drupal-addon@1.0.28--canary.30.1f73a32.0 # or yarn add @lullabot/storybook-drupal-addon@1.0.28--canary.30.1f73a32.0