-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Integrate storybook for components #3
Comments
It also came to my mind, though I’m worried the SFC file might get a bit crowded. But I guess this can be easily solved with an opt-in/opt-out prompt when using the component generator. |
Btw. it might be quite nice to include a Loki setup on top of Storybook. |
I would love to tackle this. Any ideas around what content you envision putting into that // PrimaryButton.vue
<template>
<button :disabled="disabled">
<slot></slot>
</button>
</template>
<script>
export default {
name: 'primary-button',
props: ['disabled']
}
</script>
<story>
<primary-button :disabled="true">Hello!</primary-button>
</story> |
What about something like
Not sure how to handle actions and variables though. |
@shentao Excellent, I like that API. I'll put together a proof-of-concept here shortly |
Repo: https://github.com/mattrothenberg/vue-storybook/ |
I like it! I'll be taking a closer look at this soon. 😻 |
Hooray! I welcome any/all feedback, given I'm more of a designer than a dev 😈 |
@mattrothenberg Evan used to say that too. 😉 |
Just an update here: I'll finally be able to look into this a little more after VueConf next week, but am also a little bit torn. I'm playing with the possibility of using Cypress for component unit tests, instead of Jest, which would also provide a lot of the same benefits of Storybook. That would mean fewer tools for developers to learn, so if I can get it to work the way I want, I might be leaning in that direction. |
Sounds good @chrisvfritz. In either event, it was fun (and a great learning exercise) to get that |
This is an interesting concept, any progress update? |
Hi all, have some any news? |
Still experimenting - nothing I've tried so far has been ideal, but I'm not out of ideas yet. 🙂 |
Storybook has just released an alpha version with babel 7 support, and they have an officially plugin for storybook now. I guess we have to wait a bit longer, because the plugin is still not stable. |
@chrisvfritz: Could you elaborate on this topic? I am curious: why do you think that Cypress (unit tests) give the the same (or some) benefits of Storybook? |
@riddla I think the Cypress client could potentially offer a superset of what Storybook does. For example, custom blocks such as Does that make sense? |
good ! So how is it progressed now |
Hello All, have you had a look at vue-styleguidist. it uses Markdown instead of JavaScript to write the examples in. Apart from that it does the same job as storybook... in |
Hi, I am trying to add storybook testing to the vue-enterprise-boilerplate. I already went through the learnstorybook tutorial for vue and it went smoothly. When I completed the setup in the vue-enterprise-boilerplate application and completed the tutorial code within this project everything worked except it doesn't pick up the styles. I tried everything I could think of but it just doesn't seem to pick up the styling at all in the storybook served test. Any ideas on what I can try next? |
No news about this? :( |
I get it working @abreumatheus and I'll try to pull request it soon. |
I'd like it to be pretty seamless and built into the main development workflow, so possibly as a
<story>
custom block inside.vue
files.The text was updated successfully, but these errors were encountered: