Open colfin-96 opened 1 year ago
One change we made to Storybook for Angular in 7.1 is making prod mode default to true when building storybook. Can you try disabling it and see if that fixes your issue? See https://github.com/storybookjs/storybook/pull/23489.
The same issue is related to kendo components. see https://github.com/storybookjs/storybook/issues/24636
enabling/disabling prod mode doesn't change the issue.
Describe the bug
Upon updating from SB 7.0 to SB 7.1, all Syncfusion component stories that were using implicit rendering didn't work anymore. Stories that had a template in the render function continued working fine (as well as our own components, that also continue working with implicit rendering). As you can see in this Chromatic build: https://www.chromatic.com/build?appId=62eccae33003c44cf082239d&number=1116, most components are failing. Note that the build only fails on build-storybook. start-storybook works fine, so local development is not affected.
I am trying to create a reproduction but wasn't successful yet (the Storybook + Syncfusion combo is a little difficult to set up). I will continue trying this, but in the meantime I am providing some code snippets of working and failing stories.
A typical Syncfusion component story will look like this:
Note that ButtonComponent is a Syncfusion component and we are rendering implicitly. This worked fine in SB 7.0, but not in SB 7.1 or higher.
After playing around a little, I found some workarounds.
Workaround 1: Including a template and moduleMetadata:
Workaround 2: Creating a demo Angular Component (simple TS and HTML file) as wrapper which is then loaded into the story instead of the component itself, so something like this:
... and the HTML just contains what I have in the template in workaround 1.
Workaround 1 is what we'll go with for now, but it would be nice to be able to use the implicit rendering again as it's super convenient. I will also try to provide a reproduction in the meantime and keep you updated here. If you need any additional info or file contents, please let me know.
Thanks!
To Reproduce
No response
System
Additional context
No response