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).
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).