-
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
Combine Storybooks #9
Comments
Update: this comment refers to the out-of-date strategy of using Storybook Composition Old comment
Works ✨ Tested locally while running the WCP storybook locally (i.e. We will need to resolve CORs issues once we deploy. We should also keep in mind where all of these codebases will live, and where the main storybook will live (external vs internal, both in terms of hosting and github repo). |
I think another approach would be to manually include these stories as html templates as we've done for the rest of Explorer 1 already. We originally didn't want to do this for the following reasons:
Advantages to a manual HTML approach:
Importing stories automatically in storybook has the following limitations:
|
More questions to consider, after conversations about adding the header and footer in #172:
|
I think there are several approaches that could work, but my first instinct would would do something like
I would probably control that with a parent class (like the way that the nascent dark mode is activated) and instruct internal sites to apply it to their |
Update: during sprint planning on April 12, 2022, devs are in agreement that this approach is the way to go. |
Repurposing this issue to capture the need to set up infrastructure for internal and external components.
|
The scope of this task has changed from when it was originally created. The old proposal has been collapsed at the end of this comment for record-keeping purposes.
Strategy: include internal and external stories as html templates, similar to what we've done for the rest of Explorer 1 already.
See the below comment for details and continued discussion on this revised scope.
📜 Old proposal using Storybook Composition
https://medium.com/storybookjs/storybook-composition-af0da9084fba
Proposal
Three storybook codebases
Use Storybook's Composition feature to make one storybook
Following the model in this article, the Design System storybook (this repo) will be the "main storybook" that composes the storybooks into one.
High-level task list
If this works and we agree on this architecture, here's a very high-level task list:
@jpl/explorer-1
to public npm registry (in progress)@jpl/explorer-1
, ideally with the same add-ons and utilities as WWW (in progress)@jpl/explorer-1
. WWW-specific components can stay in the WWW storybook (in progress)Possible follow-up tasks
Additional research needed
On paper this seems feasible, but we need to explore a few things to get a better handle on the effort needed. The below items are not blockers, just a list of things to try/think about how we'd approach it.
The text was updated successfully, but these errors were encountered: