Ask HN: Is it time for a new Storybook?
9 points| samhuk | 3 years ago
1) Messy Javascript API resulting in inexpressive storybook files, particularly for big frameworks like Angular and big components.
2) Slow AF with webpack/terser/etc. And that's before you start bolting on crazy addons like compodoc.
3) Tries to solve so many different problems (just a subjective opinion of mine).
4) Insane levels of "framework magic", particularly when I've used it with Angular, but also in other scenarios too.
---
So, I wanted to ask HN to gauge the appetite for a similar but not same kind of Storybook:
1) Extremely expressive Javascript API. Think Jest.
2) Go CLI (allowing direct interface with ESBuild, etc.).
3) ESBuild-centric (rather than webpack, or worse, addons [1]).
4) Typescript-centric (rather than seeming like an after-thought).
5) Much less framework magic (think React, Redux, etc. Stick mostly to simple explicit JS behaviors).
6) Probably a lot more that haven't come to mind yet.
Before I go any further with it, it would be amazing to hear what you guys think about all of this. What are your thoughts about Storybook? Too much tech debt for them to modernize? Am I just being silly and picky about Storybook? Am I the crazy one?
I just think it would be amazing to have a frontend workshop app with the speed of esbuild, the expressiveness of jest and cypress, the elegance of React.
Thanks HN!
[0] https://storybook.js.org/
[1] https://storybook.js.org/addons/storybook-addon-turbo-build
[+] [-] matthewwolfe|3 years ago|reply
I think storybook tries to do too much, and I’d like to see a really dead simple interface with Vite or similar where I can easily prototype and test stuff based on *.stories.tsx or similar.
I don’t need all the stupid addons, just give me a dev server with navigation and routing built in, and an easy way to hide the whole interface to simulate a normal web page.
[+] [-] samhuk|3 years ago|reply
Thanks for your feedback. This is helping me a lot towards understanding what we want from a "component workshop" that perhaps Storybook and others (like Ladle) don't either have or do the way we want. :)
[+] [-] lmiller1990|3 years ago|reply
Storybook is good for design, but the testing integration is definitely lacking. Having to maintain <test suite in Jest> alongside <design suite> feels like a lot of code.
[+] [-] chantastic|3 years ago|reply
I've found it pretty capable for doubling my stories as Jest tests. For those using testing-library for component testing, it even acts like a GUI for those tests.
If you're interested, I threw together a little walkthru that show some of the ways I'm using it with Jest: https://github.com/chantastic/vite-react-jest-testing-librar...
[+] [-] samhuk|3 years ago|reply
I feel like Cypress moving into the component testing arena was an interesting move.
[+] [-] babayega2|3 years ago|reply
[0]:https://github.com/cure53/DOMPurify [1]:https://leanpub.com/react-wagtail
[+] [-] monssoen|3 years ago|reply
[+] [-] samhuk|3 years ago|reply
Thanks for your feedback :)