-
-
Notifications
You must be signed in to change notification settings - Fork 9.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
Angular component get redeclared - that is regression compared to legacy Angular renderer (specific casees) #15590
Comments
Is there any news on this one? We're seeing it cause a number of headaches in rendering stories using the docs add-on that makes it basically unusable at the moment... |
@storybookjs/angular any thoughts on this one? |
@parkersweb is using the legacy renderer an acceptable workaround until this gets sorted out? |
@shilman yeah - I think I've found a pattern that gets me around the problem for now thanks 👍 |
@parkersweb what workaround did you use? |
@sir-captainmorgan21 I'm afraid its been a while since I looked in on the project that uses this so I don't recall exactly which change got us working. We're currently running 6.4.19 - without the angular legacy renderer flag set. Our story meta looks something like this
and that doesn't seem to cause issues? Sorry I couldn't be more helpful! |
We’re cleaning house! Storybook has changed a lot since this issue was created and we don’t know if it’s still valid. Please open a new issue referencing this one if:
|
Describe the bug
Angular component get redeclared - that is regression compared to legacy Angular renderer (specific cases)
To Reproduce
for example:
/// button.module.ts
System
Storybook 6.3.4
Additional context
This is regression:
#6346
21e4997#diff-87c2ba58c37542c29b4838493e7f8bcdd62b593851e30671fd1bb081eb39530f
legacy helper has function that checks if component needs to be declared:
storybook/app/angular/src/client/preview/angular/helpers.ts
Line 85 in a8db958
it exists in new renderer but with a bit limited functionality
storybook/app/angular/src/client/preview/angular-beta/utils/NgModulesAnalyzer.ts
Line 38 in c5749b0
Other issues that were raised that actually are caused by this:
#14026
//edit
Ok so regression is smaller than I originally though
what is not working compared to old version of extractNgModuleMetadata is that when imports array has an item that is an array it is not flat mapped to pick up a imports from [] item;
weird thing is that extractNgModuleMetadata the same so mayby it is problem in another function higer up in call chain.
probably also something to do with having template or not as they are handled differently in both cases
storybook/app/angular/src/client/preview/angular/helpers.ts
Line 145 in a8db958
storybook/app/angular/src/client/preview/angular-beta/StorybookModule.ts
Line 66 in c5749b0
The text was updated successfully, but these errors were encountered: