- Issue created by @pixelwhip
- Merge request !6Issue #3424336: Allow the server url to be set as a global parameter β (Merged) created by pixelwhip
- πΊπΈUnited States markie Albuquerque, NM
Curious.. Why not have a `--server-url` switch instead of `--omit-url`, this way build commands could utilize the functionality. And if switch is not used, default.. Just a thought
drush storybook:generate-all-stories --server-url=https://spiffy.url
- πΊπΈUnited States pixelwhip
The `--server-url` is already possible with Drush's `--uri` option. In my case, I need to omit the server url from the stories.json file completely so it can be set in the Storybook configuration.
Example:
drush storybook:generate-all-stories --uri=https://spiffy.url
I discovered this recently when setting Storybook up with Tugboat for the Prototype theme β¨ Add tugboat integration Active . If you don't have the URI configured for Drush, the URL will end up being `http://default*`
- Status changed to Needs review
11 months ago 12:19am 22 March 2024 - πΊπΈUnited States bander2
Looks like this does not omit the server url, it sets it to an empty string:
"parameters":{"server":{"url":""}}
Which gives me this error:
URL constructor: /<my-server-id> is not a valid URL.
When I manually delete the parameters section above, it works. So I think url needs to be completely omitted.
- πΊπΈUnited States brayn7 Lexington, Ky
@bander2 You have to patch the vendor dependency too.
"e0ipso/twig-storybook": { "Feature allow global server url": "https://github.com/e0ipso/twig-storybook/pull/11.patch" }
This works great for me.
- First commit to issue fork.
- Merge request !9Add a destination subdirectory argument to the generate json stories command β (Open) created by bradwade
- πΊπΈUnited States bradwade
I tested the following patches on our website and they are working as expected... json stories are generated without a server URL parameter when `--omit-server-url` flag is provided .
"drupal/storybook": { "Issue #3424336: Fix ...": "patches/contrib/storybook-issue-3424336-mr-6.patch", }, "e0ipso/twig-storybook": { "Issue #10 Allow the server url to be set as a global parameter": "patches/contrib/twig-storybook-issue-10-pr-11.patch" }
Since it seems multiple people have successfully tested, is the next step to create a new tag for e0ipso/twig-storybook which contains the already-merged-to-main issue 10 (https://github.com/e0ipso/twig-storybook/pull/11), then bump the version requirement here in composer.json so that new tag is pulled in as a dependency... then merge this MR 6?
Sorry MR9 is showing in this thread. That was for another issue.
- Status changed to Fixed
3 months ago 10:06am 13 November 2024 -
e0ipso β
committed cd8aaa62 on 1.x authored by
pixelwhip β
Issue #3424336 by pixelwhip, bradwade, e0ipso, bander2, brayn7, markie:...
-
e0ipso β
committed cd8aaa62 on 1.x authored by
pixelwhip β
Automatically closed - issue fixed for 2 weeks with no activity.