-
-
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
Add new Function() to evaluate string for defaultValue from compodoc #17353
Add new Function() to evaluate string for defaultValue from compodoc #17353
Conversation
☁️ Nx Cloud ReportCI ran the following commands for commit 235e819. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
I have no idea what tests are failing does not seem related to what I have changed? |
any updates on this PR? |
@shilman wanted to do something different so waiting on that. My suggestion is that this PR is accepted in the meantime to get things working as I have to patch my storybook after installation to be able to use it, I guess I am not the only one were things are broken as it is now! |
Any update. this makes storybook docs unusable for angular. Please merge this. |
Pulling this up |
Just upgraded to 6.5 still the same problem getting a string where I am expecting a function or an object. I have not heard a valid argument why we should have a broken system until we do things more correctly. Eval was used before, new Function() is a little better but perhaps not perfect but it works. I am sorry @shilman but I do not understand what the argument is to have storybook broken without using patch-package after install. I need to redo my patch now though with 6.5 as the placement of files are different. |
Can we please include this fix? |
Issue: #17004 #17001 #16959 #16865
What I did
Instead of returning the string for the default value from compodoc I ran the value through new Function(...) so the javascript in the string can be recreated to the original value from the component typescript file.
How to test
If your answer is yes to any of these, please make sure to include it in your PR.