You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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).
The text was updated successfully, but these errors were encountered:
patcon
changed the title
Add alternative conversatio sources of story data
Add alternative conversation sources of story data
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).
The text was updated successfully, but these errors were encountered: