-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Corrected failing example in Vue guide #6761
Conversation
This example failed out of the box. Registering every time is necessary, apparently
This pull request is automatically deployed with Now. Latest deployment for this branch: https://monorepo-git-fork-ffxsam-patch-2.storybook.now.sh |
@backbone87 @elevatebart can you confirm? seems like a serious regression if this is correct... |
@shilman The option for a single string was removed at some point in the past I think. If it does still work, we should add it in the vue-kitchen-sink example, to make sure it stays working. These are the option currently available for vue users. AFAIK, this should work with globally register components: .add('template', () => ({
template: `
<div>
<h1>A template</h1>
<p>rendered in vue in storybook</p>
</div>`,
})) |
I believe the component MyButton is registered globally which makes these changes normally unnecessary. I will check this immediately |
If it is the case, the documentation needs urgent update. I need to check.
Bart Ledoux
Twitter: @bartledoux
Github, Gitter, Discord: @elevatebart
… On May 20, 2019, at 19:16, Norbert de Langen ***@***.***> wrote:
@shilman No the option for a single string was removed at some point in the past.
These are the option currently available for vue users.
https://github.com/storybooks/storybook/blob/next/examples/vue-kitchen-sink/src/stories/custom-rendering.stories.js#L9-L92
AFAIK, this should work with globally register components:
.add('template', () => ({
template: `
<div>
<h1>A template</h1>
<p>rendered in vue in storybook</p>
</div>`,
}))
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Did you find if this is necessary @elevatebart? |
Not yet, I will check this in the coming hours.
Bart Ledoux
Twitter: @bartledoux
Github, Gitter, Discord: @elevatebart
… On May 23, 2019, at 04:10, Norbert de Langen ***@***.***> wrote:
Did you find if this is necessary @elevatebart?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I just checked on @ffxsam you seem to have missed - so had I for the record - that in the guide, vue components are meant to be registered globally in the Does it make more sense now? |
Thanks for all your detective work 🕵 @elevatebart 👍 |
@ffxsam thank you for helping! Super appreciated |
Ah, I did see this, but this intention was not clear. It states:
I would consider global components to be from plugins or other third party libraries such as Vuetify and Buefy. I don't consider my own internal components to be global at all (as I |
we should update the storybook vue docs and explain what i wrote here: #6357 (comment) storybook adds no magic regarding component registration |
This example failed out of the box. Registering every time is necessary, apparently
Issue:
Example in Vue guide threw errors on fresh install
What I did
Added component registration in every
.add()