-
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
Storybook 7 support #29
Comments
Either we need this or changes in the documentation to walk developers through installing storybook with the specific version of 6.4. |
This addon with it's integration to https://www.drupal.org/project/cl_server is broken if you follow the directions exactly. |
Ugh! I imagine this is frustrating. Thanks for filing the issue. Transition between major versions always leads to unstable documentation. Were you able to find a path forward? If so, documentation could be a great way to contribute back to the project. |
I was going to try to get this running locally so I could help update the docs but it seems even with Storybook 6.4.2 installed globally, This seems to be a recent issue. See storybookjs/storybook#22214 |
#30 is an attempt to fix this. However, there are some issues upstream that will prevent this from working 💯 In the mean time, I can share my {
"name": "html",
"packageManager": "yarn@3.5.0",
"devDependencies": {
"@babel/core": "^7.21.4",
"@lullabot/storybook-drupal-addon": "^1.0.27",
"@mdx-js/react": "^1.6.22",
"@storybook/addon-actions": "^6.5.16",
"@storybook/addon-docs": "^6.5.16",
"@storybook/addon-essentials": "^6.5.16",
"@storybook/addon-links": "^6.5.16",
"@storybook/builder-webpack5": "^6.5.16",
"@storybook/cli": "^6.5.16",
"@storybook/manager-webpack5": "^6.5.16",
"@storybook/server": "^6.5.16",
"babel-loader": "^8.3.0"
},
"scripts": {
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
}
} |
I tried this package.json today and still ran into trouble. After using the instructions found docs/stoybook.md , with the only alteration of using this package.json and building with in using I ran into the following error:
Here are my main.js and preview.js files main.js
Note the slight difference in preview.js
|
In case this issue is caused by my environment here's that info too:
|
Hey there, I've traveled a similar path as @cosmicdreams it seems 😅 : Storybook 6 failed for me because the 7.x versions of the storybook addons got installed, even though I've been requesting The one thing that I tripped over after that was the change in the format of Here's my config for reference: main.js module.exports = {
"stories": [
"../docroot/modules/**/*.stories.mdx",
"../docroot/modules/**/*.stories.@(json|yml)",
"../docroot/themes/**/*.stories.mdx",
"../docroot/themes/**/*.stories.@(json|yml)",
],
"addons": [
"@storybook/addon-links",
"@storybook/addon-essentials",
'@lullabot/storybook-drupal-addon',
],
"framework": "@storybook/server",
"core": {
"builder": "@storybook/builder-webpack5"
}
} preview.js export const parameters = {
server: {
// Replace this with your Drupal site URL, or an environment variable.
url: 'http://localhost:8080',
},
globals: {
drupalTheme: 'MYTHEME',
supportedDrupalThemes: {
theodor: {title: 'MYTHEME'},
claro: {title: 'Claro'},
},
}
}; |
I had a similar problem to what was mentioned in the comments, but after reverting back to SB 6 and following what said in the comments, especially the shared package.json, main.js, and preview.js files, I'm getting closer. I'm now seeing a "Failed to Fetch" error. Any ideas on how to fix this? I'm using the CL: Components Examples Module in Drupal 10 to try to get Storybook and Drupal connected on my local I'm reading it has to do with CORS headers. Where would I make the changes to try to get it to work on my local with address similar to http://localhost:8888/site_demo. I have my URL in my @storybook/.preview set to http://localhost:8888/site_demo |
@fogpuddle have you seen the instructions in https://git.drupalcode.org/project/cl_server/-/blob/2.x/docs/storybook.md? That should help you overcome the CORS issue. |
Additional question that I consider putting in it's own ticket, but it's related to Storybook 7. In 7 they've made a lot of changes to how stories are constructed. What are our next steps to being able to use their advancements in:
|
Now that code level support is in we can continue the pursuit of utilizing Storybook 7 to it's fullest possible. We can either close this issue and start a new one for that or keep this one open. |
Agreed. |
In looking through the dependencies of this addon, it is still depending on Storybook 6.4.
Do we need to create an epic for gathering up all the tasks needed to support Storybook 7?
The text was updated successfully, but these errors were encountered: