- Issue created by @Robert Ngo
- Status changed to Needs review
about 1 month ago 3:48am 16 May 2024 - 🇮🇳India aman1248
Hi @Robert Ngo, I've reviewed your patch, and it has effectively solved the issues mentioned above. It's very helpful!
There are some nuances in configuring Storybook, this issue is to update README.md with tips to debug and fixing the setup:
<!--break-->If the component doesn't render in Storybook and inspecting network request showing a request with an error response:
http://[DRUPAL-SITE]/storybook/stories/render/{hash}?...
This is because server url in JSON stories generated via drush storybook:generate-all-stories
are http
. Then when Storybook request to Drupal via http
get eventually rejected. This is caused by either ddev certificate config issue, or by custom drush alias enforcing http
.
Solution:
- Consider fixing ddev config as shown in https://stackoverflow.com/questions/65111024/ddev-project-starts-up-site...
- Or, create a Drush site alias with uri using https
- Run ddev drush st | grep "Site URI"
to verify the current protocol is https
If all components don't render in Storybook and inspecting network requests in Storybook showing a request to
http://[DRUPAL-SITE]/storybook/stories/render/_cl_server?_storyFileName=.%2Fdocroot%2Fmodules%2Fcustom%2[MY-MODULE]%2Fcomponents%2Fbutton%2Fbutton.stories.json&_drupalTheme=testTheme
Unlike with CL Server, the new Storybook module no longer requires @lullabot/storybook-drupal-addon
. This add-on should be removed from the .storybook/main.js
.
Needs review
1.0
Documentation
Hi @Robert Ngo, I've reviewed your patch, and it has effectively solved the issues mentioned above. It's very helpful!