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
CSF3: Default render functions for non-React frameworks #15498
Comments
Default render function for ember is not possible. But I already asked for a My suggestions:
|
Son of a gun!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.4.0-alpha.25 containing PR #15742 that references this issue. Upgrade today to the
Closing this issue. Please re-open if you think there's still more to do. |
@shilman I did a bit of experimentation on adding csf3-support to @storybook/svelte based on the work done on @storybook/angular-cli. I'm not very familiar with the internals of storybook and therefor I would like to ask some questions:
|
@benbender sorry for the slow reply, your message got lost in the shuffle!
Regarding future plans, we don't have anybody actively maintaining Svelte at the moment. @j3rem1e built most of the Svelte improvements, but I haven't heard much from him since then. I recently implemented CSF3 support for MDX #16159 and I would imagine the Svelte CSF changes might be similar. If you'd like guidance on any of this, please find me on our discord in the |
Zoinks!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.5.0-alpha.6 containing PR #17068 that references this issue. Upgrade today to the
Closing this issue. Please re-open if you think there's still more to do. |
I'm not sure if web-components default render would be possible without the feature from this PR: |
Shiver me timbers!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.5.0-alpha.22 containing PR #17276 that references this issue. Upgrade today to the
Closing this issue. Please re-open if you think there's still more to do. |
Ermahgerd!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.5.0-alpha.23 containing PR #17279 that references this issue. Upgrade today to the
Closing this issue. Please re-open if you think there's still more to do. |
@yannbf This is also an option for lit open-wc/open-wc#2398 |
I wonder if we'll need to do something regarding the names of the args, given that we'd be spreading a mix of events, props and booleans and according to the docs, in that case, they'll have to be branded:
Example: import { spread } from '@open-wc/lit-helpers';
const elementTemplate = (
obj = {
'my-attribute': 'foo',
'?my-boolean-attribute': true,
'@my-event': () => console.log('my-event fired'),
'.myProperty': { foo: 'bar' },
},
) => html` <custom-element ${spread(obj)}></custom-element> `; |
Web-components fixed in #19164 and released in https://github.com/storybookjs/storybook/releases/tag/v7.0.0-alpha.37 🎉 |
CSF3.0 introduces default render functions, making it possible to remove lots of boilerplate in your stories. The initial implementation is for React, and we still need to add this for other popular frameworks.
Here's a React example:
And here's the React implementation:
https://github.com/storybookjs/storybook/blob/next/app/react/src/client/preview/index.tsx#L22-L28
The text was updated successfully, but these errors were encountered: