-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
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
Vue3:(feat) add source decorator vue template and setup script + supports of multi slots #20498
Conversation
Absolute newbie here: Shouldn't the docs state |
Thanks, @ndelangen I appreciate it. It is green 👍 now. actually, i detected 1 bug |
@shilman I'm inclined to approve and merge, WDYT? |
…o SNIPPET_RENDERED
hi @ndelangen @shilman. I removed the 'prettier' package from my deps, actually, I found out that SourceContainer handles the formatting pretty well, I had just to pass the preset to the handler function. and then kind of lazy load prettier from global deps to parse the vue template from the storyFn(). |
@chakAs3 Awesome work! |
@chakAs3 I was comparing dist output sizes, and noticed a huge difference in the dist of render/vue2 and renderer/vue. This is likely due to this line here: storybook/code/renderers/vue3/src/docs/sourceDecorator.ts Lines 7 to 8 in ee72ba5
and here:
Can we change that code to not depend on prettier? |
At the very least if we're not doing the above, we need to add prettier as a devDependency to the package. |
Issue: #13917
What I did
I have added a source decorator to renders/vue3 to show a pretty and practical source, multiple components are supported also, I have added source decorators.tests as well, to cover most cases.
source supports slot default and named slot, however, I checked the current render is not handling the slot in default Story, you still have to pass the template here, I may be working on this part also if you want @shilman
How to test
If your answer is yes to any of these, please make sure to include it in your PR.