Skip to content
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

[Feature Request]: Storybook composition support #13506

Closed
1 task done
kubijo opened this issue Apr 11, 2023 · 3 comments · Fixed by #13627
Closed
1 task done

[Feature Request]: Storybook composition support #13506

kubijo opened this issue Apr 11, 2023 · 3 comments · Fixed by #13627
Labels
needs: community contribution Due to roadmap and resource availability, we are looking for outside contributions on this issue. proposal: accepted This request has gone through triaging and we are accepting PR's against it. type: enhancement 💡

Comments

@kubijo
Copy link
Contributor

kubijo commented Apr 11, 2023

The problem

I would like to use storybook-composition in our storybook instance to be able to seamlessly browse your reference instance.

When I, however, try that by adding the following section to our storybook config…

module.exports = {
    ...config,
    refs: {
        'design-system': {
            title: 'Carbon Design System',
            url: 'https://react.carbondesignsystem.com',
            expanded: false,
        }
    }
}

…I only get this error

image

  • Clicking on the first entry in the popup takes me to your storybook instance and it renders fine
  • Our storybook version is 7.0.2

The solution

I would like the feature to work as described in https://storybook.js.org/docs/react/sharing/storybook-composition

Examples

No response

Application/PAL

No response

Business priority

None

Available extra resources

No response

Code of Conduct

@kubijo
Copy link
Contributor Author

kubijo commented Apr 11, 2023

For what it's worth, I have noticed that when I do that setup, it tries to load the following files, so it might just be about enabling the json catalog build & possibly some CORS related tweak…

  • https://react.carbondesignsystem.com/index.json
  • https://react.carbondesignsystem.com/stories.json

image

@tay1orjones
Copy link
Member

@kubijo Interesting, do you know if composition supports different storybook versions? We're still on v6.5, I see you're on v7.

@kubijo
Copy link
Contributor Author

kubijo commented Apr 11, 2023

I have just discovered this feature too, so I cannot claim any deeper knowledge of it... But from what I can gather just by the behaviour mentioned, it should suffice if the deployment includes a correct JSON file so that the embedding sites can render a menu with links for the iframe...

If you can enable the buildStoriesJson flag (that you should have available), we should be able to test it easily.

@tay1orjones tay1orjones added proposal: accepted This request has gone through triaging and we are accepting PR's against it. needs: community contribution Due to roadmap and resource availability, we are looking for outside contributions on this issue. labels Apr 21, 2023
@tay1orjones tay1orjones moved this from Triage to Ready for community implementation in Roadmap Apr 21, 2023
@kodiakhq kodiakhq bot closed this as completed in #13627 Apr 25, 2023
kodiakhq bot added a commit that referenced this issue Apr 25, 2023
 (#13627)

* feat(Storybook): Enable "buildStoriesJson" to support composition #13506

* Update netlify.toml

---------

Co-authored-by: Taylor Jones <[email protected]>
Co-authored-by: Andrea N. Cardona <[email protected]>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
@github-project-automation github-project-automation bot moved this from Ready for community implementation to Completed in Roadmap Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: community contribution Due to roadmap and resource availability, we are looking for outside contributions on this issue. proposal: accepted This request has gone through triaging and we are accepting PR's against it. type: enhancement 💡
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants