rspack-contrib / storybook-rsbuild

Storybook builder and frameworks powered by Rsbuild.
MIT License
60 stars 3 forks source link

Creating new stories and saving stories in UI is not currently supported? #51

Closed jeffijoe closed 4 days ago

jeffijoe commented 1 month ago

After switching to storybook-rsbuild, the Save functionality in the Storybook UI stopped working:

image

The + button to create a new story is also not available:

image
fi3ework commented 1 month ago

Which version of storybook are you using. In the project's sandbox, these functionality works whereas they're in different UI (8.2.1).

image
jeffijoe commented 1 month ago

I'm on Storybook 8.2.5. I can get the Create new story (within an existing .stories.tsx) UI to show, but it won't save.

fi3ework commented 1 month ago

I took a look into the source code. The new button will show when https://github.com/storybookjs/storybook/blob/next/code/core/src/builder-manager/utils/framework.ts/#L38 is true, and extractProperRendererNameFromFramework can only detect enumerated frameworks here (https://github.com/storybookjs/storybook/blob/next/code/core/src/common/utils/get-storybook-info.ts#L30-L49). The solution is to add storybook-react-rsbuild and storybook-vue3-rsbuild to Storybook's monorepo.

fi3ework commented 1 month ago

the Save functionality in the Storybook UI stopped working:

Could you provide a minimal reproduction? It at least works in sandbox.

https://github.com/user-attachments/assets/d0e41225-f9d0-4471-a7a7-98043d841480

jeffijoe commented 1 month ago

Turns out the Save just required a restart of Storybook. 👍

So I guess we need to open a PR with Storybook to add the Rsbuild framework to their known list?

fi3ework commented 1 month ago

Yes, I'm opening the PR to add the frameworks.

JReinhold commented 1 week ago

I have confirmed that this now works in the latest Storybook 8.3.0 prereleases (if you apply the workaround described in #76)

image

🚀

fi3ework commented 4 days ago

Closing this as it has been resolved, and will be shipped with Storybook 8.3.0. 🥳