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

Add alternative conversation sources of story data #19

Open
patcon opened this issue Oct 20, 2024 · 0 comments
Open

Add alternative conversation sources of story data #19

patcon opened this issue Oct 20, 2024 · 0 comments

Comments

@patcon
Copy link
Member

patcon commented Oct 20, 2024

Can adapt the import utils to allow selecting between different datasets. For starters, it'd be great to just manually change a hardcoded import to point to other files.

https://github.com/CivicTechTO/polis-storybook/blob/main/.storybook/utils.js

For starters, it feels safe to just make it easy to edit .storybook/utils.js to import from diff files when needed. Then it's easy to check locally how things look, but not publicly explorable. That way, we don't have to fix up all the stories that likely have assumptions of using the first dataset.


Stretch goal (maybe for a second PR) might be to allow dynamic imports:
https://stackoverflow.com/questions/47954655/dynamic-imports-in-es6-with-runtime-variables

Or alternatively, using filesystem core pkgs to read files from a publicly hosted directory (something that can be available at and hosted path in the hosted storybook, rather than compiled in at build time).

@patcon patcon changed the title Add alternative conversatio sources of story data Add alternative conversation sources of story data Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant