Storybook Shennanegins

@wyrmisis I have a headcannon for you, one who also uses Storybook. What if we could load foundry's stylesheets and js into a storybook env?
6 Replies
Calego
CalegoOP4y ago
I tried this a long time ago, I got the styling to load in, but the JS made my stack big mad. this was during like 0.6. I think
wyrmisis
wyrmisis4y ago
That would be really helpful, especially since I was just faking it as well as I could in the default styles for component-pouch Even if just the styles What JS would you want to bring in?
Calego
CalegoOP4y ago
how are the odds I committed and pushed this experiment somewhere I'd want foundry.js to be loaded, as though we were in a game. Reason being, I want to use storybook to do something like ActorSheet.render() and see/interact with that actor sheet no dice, dang.
wyrmisis
wyrmisis4y ago
Being able to interact with/develop sheets without having to do so in Foundry would be POGGERS
Calego
CalegoOP4y ago
RIGHT? because the next step is to use snapshots of the HTML to regression test. but that's like 6 steps from where we are IIRC I was able to pull in the CSS by simply import 'path/to/foundry/css' in the storybook setup even though it was outside the project .... oh hold on what if you symlinked that ln 'path/to/foundry.css' ./foundry.css might work? idk, something to play with if you get inspired (and want to subject yourself to even more webpack hell)
wyrmisis
wyrmisis4y ago
On the upside, the Pouch (I'm going to have fun with that name) isn't using Webpack! Just rollup for bundling, babel for light transpiling of the stuff Foundry can't handle, and lerna to do the in-package symlinking. But yeah, that's def something I'd want to tool around with, about 40% of my dev time has been consumed by change, refresh, double-click token.
Want results from more Discord servers?
Add your server