Hi I am trying to get aurelia 2 working with storybook but no luck
Has anyone got this working recently.
I have setup storybook recently with react so I know how its supposed to be done I think.
I have tried using aurelia with and without typescript but it still fails on storybook startup.
Some example errors
If you have ‘reflect-metadata’ or any other reflect polyfill
R in C:/Users/pclark/Desktop/aurelia-sb-no-ts/aurelia-sb/node_modules/@aurelia/runtime-html/dist/resources/attribute-pattern.d.ts
ERROR in C:/Users/pclark/Desktop/aurelia-sb-no-ts/aurelia-sb/node_modules/@aurelia/runtime-html/dist/resources/attribute-pattern.d.ts(20,16):
TS2304: Cannot find name ‘State’.
TS6053: File ‘%SET_DURING_SB_INIT%’ not found.
Additionally who owns the plugin for aurelia storybook aurelia team or storybook team
I think using storybook with Aurelia shouldn’t be difficult, and no one is really “owning” the storybook part in the team. I’ll have a look at the reflect metadata issue and setup an example storybook.
Thanks bigopon spent a fair bit of time on this but dont feel I am getting anywhere even though the error looks suspiciously similar to the issue I had with controls library.
I tried upgrading the version of aurelia under storyook and excluding the storybook node_modues folders but no luck
Hi guys,
I’m very interested in a solution for this as well. I’m running into the same errors as @Infuser1. I’m willing to do some work on supporting this if it’s needed
The strictness in guaranteeing the metadata is good was added without considering the scenarios like this. I think it’s ok to relaxed it a little bit, as it’s used in our kernel. Will update on this soon.
I will pick this up now that we are alpha. I got us into the SB repo and then didn’t want to keep iterating forever to keep it up to date with constantly changing APIs. Now that we are alpha and most of the apis are concrete I will keep maintaining it. I have direct connection to the SB owners and we work together. Once released they will promote AU2 like their other frameworks.
Thanks Brandon sorry not had time to try this yet bigopon, but still plan too although seems like we are now going standard vanilla web components so don’t need it.
The team that I’m on is very excited to use Storybook on our current Aurelia 2 project, but we’re still receiving the following errors:
TS6053: File ‘%SET_DURING_SB_INIT%’ not found.
TS2304: Cannot find name ‘State’.
Are there any updates or suggestions that people have had luck with?
Once Aurelia 2 officially exits beta, we should be able to get an official Storybook plugin going or whatever. There’s been a bit of change in the structure of the plugins/frameworks over there and Aurelia got kicked out because it was a Storybook setup for one of the Aurelia alphas and they wanted something more stable
That said - we’re using the ekzo fork and loving it, made an impact in our business for sure.
This would be helpful. There’s sometimes a ton of complex UI/UX to build and would be nice if there was a good way to test it with themes and things like that.
One of the things that attracted a lot of engineers to other frameworks was ready made UI/UX frameworks that work well but otherwise working with their frameworks is not pretty.
This is an important priority. Now that Aurelia’s RC is just around the corner, it’ll allow us to build a stable Storybook integration with the latest version. I am going to be focusing on this to get some proper support for the latest SB with Aurelia 2 in a package that can be installed.
Dmitry did do some work around this quite a while ago and I haven’t seen anything since in a while. So, this might be one of those things where I’ll just start from scratch and build something to latest version of Storybook and best practices.
Until it’s in the official Storybook repository, this might live in an Aurelia repository and namespaced package like @aurelia/storybook-plugin I’ll speak with the team about this as well in terms of naming and where it’s housed.
Just an update about this: I have spent a solid chunk of time working on a Storybook plugin initially with Vite compatibility and then adding in support for Webpack shortly thereafter.
I have tried to keep things as simple as possible, but it will inevitably be refactored to conform to Storybook repo standards when Aurelia 2 hits a stable release, but the functionality should be the same, if not, better.
There will inevitably be things I’ve missed or that are broken. But the plan is to release this early, then with the help of the community make it even better. But, so far, I am confident we will cover most of the basic scenarios around Storybook, including support for controls, actions and interactions. There will be an example Storybook hosted somewhere with numerous Storybook use cases to help.
There will be a blog post on the official Aurelia blog coming tomorrow for this.
As promised, here is a blog post about the new Storybook integration. It has been tested with Storybook 8. It’s early, so there might be gremlins to sort out. But give the example app a try to see it in action: Aurelia 2 + Storybook + Vite | Aurelia
Webpack support won’t be far behind, we’re talking maybe a day or so behind.