News for hackers. Stuff that matters.
Re:Storybook 8 by technojunkie on Wednesday March 13, 2024 @06:31PM (#39698388)
I just tried Storybook this past week and it's a great improvement even from version 6.x.

That said, I wish this was at a place where I could easily use it for the UI layer with simple integration into a given CMS. As others have stated, it's great in isolation and for demos. Also, I realize that most apps and CMSes are so opinionated and using Storybook for the view of that system is a lot of overhead.

One less than stellar example is WordPress. It's technically possible to create a headless app using Next.js or Remix on the front-end, Gutenberg for the data layer and authoring, and Storybook as the source of truth for both ends. However, it was so much work to get there.

Maybe a legacy PHP system trying to be modern isn't a great example. But, then I'm stuck with any flavor of, usually paid database hosted, software like Contentful or Sanity. Again, the overhead!

I am a huge advocate for design systems that translate into component libraries, and Storybook fills part of that gap, but it'd be huge to see this type of setup become more practical.

Re:Storybook 8 by gehen88 on Wednesday March 13, 2024 @06:48PM (#39698519)
Interesting! What would the integration between Storybook and a CMS such as Wordpress look like, ideally? How would you use it?
Re:Storybook 8 by sam98brown on Thursday March 14, 2024 @06:10AM (#39702064)
We have a Storybook set up that displays components rendered with PHP and Twig using a REST API endpoint on our WP install. Pretty crazy setup but it works. We use play functions in Storybook to fire the request and just render the returned HTML from the server.
Re:Storybook 8 by UPytR4Ht on Wednesday March 13, 2024 @09:28PM (#39699689)
It seems like CloudCannon has this with their open-source Bookshop component editor which can integrate with their hosted CMS (no local option though).

https://github.com/CloudCannon/bookshop

The small user base, however, means there probably aren't other CMSs that use the same component representations or CMS live data bindings. This means while Bookshop components are portable between CMSs on paper, they're not in practice (e.g. you can't easily hook it up to another CMS with a visual editor like Wordpress's Gutenberg, Storyblok, etc.).