Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Storybook] a wds builder? #2025

Closed
Westbrook opened this issue Aug 14, 2022 · 8 comments · Fixed by #2437
Closed

[Storybook] a wds builder? #2025

Westbrook opened this issue Aug 14, 2022 · 8 comments · Fixed by #2437

Comments

@Westbrook
Copy link
Member

Should the future of WDS Storybook be a Storybook builder?

https://storybook.js.org/docs/react/builders/builder-api

Vite copied much of what WDS is, seems only fair to copy some of what it is. This may also clear up issues around typing and plug-in usage in Storybook Prebuilt while maintaining many of the wins from pushing the project to begin with.

Thoughts?

@Westbrook
Copy link
Member Author

@bashmish is doing some interesting work in this area at https://github.com/bashmish/storybook-builder-wds. I'm having a little trouble getting it set up, but it's getting close!

@bashmish
Copy link
Member

bashmish commented Jun 28, 2023

@Westbrook hey! I've been on it for a while now, happy to help you set it up. It's currently an early phase of development, but basic stories functionality and official addons should be working in serve. The static build is coming - check out this branch https://github.com/bashmish/storybook-builder-wds/tree/feat/build for the latest updates.

I started a thread a few weeks ago in Storybook Discord channel to align with the guys on how to reuse certain APIs between builders and I think a few people were mentioning you there. I also looked into Adobe storybook which I think you work on, to see your use-cases (that's the latest one, right? https://github.com/adobe/spectrum-web-components/tree/main/.storybook). Seems like your use-cases should be covered already, but yeah, just let me know what's not working.

Do you maybe want to have a chat or something to discuss the next steps? I'm available in Discord as @bashmish. We can also split the work on this. I plan to finish the work on static build soon. I think one of the next steps is to move it to modern-web and release under @web, as well as support MDX/MDJS and a few other features and do a few changes to Storybook itself to reuse shared APIs.

PS: I'm in @LarsDenBakker team now together with @thepassle as well, just so that you know :) Lars is saying Hi to you, ha-ha!

@Westbrook
Copy link
Member Author

Cool. I'll reach out there. Not sure if I can get any time on the keyboard to build anything here, but am excited to be able to support testing the process if I can. The main feature that we're looking to leverage (beyond what we have now) is federation, we've run into each team having its own "component library" but not having any insight into the larger ecosystem, and while that's possible with the Vite builder, I'm also not excited about adopting new dependencies.

@Westbrook
Copy link
Member Author

@bashmish with all the troubles in #2405 where do you think things sit with the builder work you've been up to?

I'd love to get the current release working, but queueing up a 2.0 that moves to Storybook v7 would be a nice next stop...

I try to keep my dev branch up-to-date with it, and right now there only seems to be one issue on the Storybook end of them importing a CJS file incorrectly, which hopefully will be fixed soon.

@bashmish
Copy link
Member

bashmish commented Aug 31, 2023

I'd love to get the current release working, but queueing up a 2.0 that moves to Storybook v7 would be a nice next stop...

@Westbrook I'm currently very close to making a PR here with latest fixes and updated docs. Hopefully today or tomorrow.

I try to keep my dev branch up-to-date with it, and right now there only seems to be one issue on the Storybook end of them importing a CJS file incorrectly, which hopefully will be fixed soon.

Can you please give a link to it?

@Westbrook
Copy link
Member Author

I've not made an issue, as I can't imagine I'm the only one to run into it, and haven't had the time, but it looks like: https://github.com/adobe/spectrum-web-components/blob/storybook/patches/%40storybook%2Bblocks%2B7.4.0.patch

@bashmish
Copy link
Member

@Westbrook default imports are tricky. I think this is the same https://github.com/adobe/spectrum-web-components/blob/storybook/patches/%40chialab%2Bestransform%2B0.17.4.patch , just another symptom. I've recently made a workaround for it: chialab/rna#157

@bashmish
Copy link
Member

bashmish commented Aug 31, 2023

@Westbrook you can review PR 🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants