- Issue created by @sagarchauhan
- First commit to issue fork.
- @lussoluca opened merge request.
- Status changed to Needs review
over 1 year ago 9:36am 27 June 2023 - 🇮🇹Italy lussoluca Italy
I've tried to reuse the discovery code from SDC to find the component
- Status changed to Needs work
over 1 year ago 3:09pm 27 June 2023 - 🇮🇹Italy lussoluca Italy
What if two components have the same machine name, but different provider (module or theme that contains the component)?
How the actual implementation solves this issue?
- 🇮🇹Italy lussoluca Italy
Ok, I see what you mean; the story file must be in the component folder, and this solves the issue of multiple components with the same machine name but different providers.
I'm still considering introducing Storybook in a new project, but in my setup, Storybook will probably not have access to the Drupal filesystem.
Do you think we can introduce a new option to @lullabot/storybook-drupal-addon like variant to pass an optional
provider
? Then in this module, we can use the provider option to resolve cases where more than one component has the same machine name.I can update this MR and create a new one for @lullabot/storybook-drupal-addon, if you think this is a good idea.
- 🇺🇸United States Danny Englander San Diego
I tested the code from the MR and it is working fine with all the storybook things right within my theme folder. It sounds like there still needs work on this but I did want to chime in.
- e0ipso Can Picafort
#8 I think that the actual fix is to have a (like the domain for the Drupal site) that specifies the path of the Storybook install. Then we can pass that setting (if not empty) in the HTTP request, like you are mentioning for the abandoned "variant". This info can be leveraged in the
findStoryFile
. - First commit to issue fork.
- 🇳🇱Netherlands eelkeblok Netherlands 🇳🇱
It is helpful to say what the source of your patch is. I think it is just the contents of merge request 13, right?
- 🇳🇱Netherlands eelkeblok Netherlands 🇳🇱
I merged 2.x into the "only use theme" branch. I suspect this was actually not necessary (but doesn't hurt either), I was getting my patches mixed up.
- 🇪🇨Ecuador afsch Otavalo
I had the same error, for my project, I had to update the module and create a patch to revert this file "src/Controller/ServerEndpointController.php" because looks like the change from
cl_components
tosdc
is not fully compatible yet.