-
-
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
Addon-docs/Vue,Vue3: Fix preset options for vue-docgen-api #14227
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Basically looks good to me 👍
Commented for-Storybook-developer things.
@shilman |
thanks @pocka ... checking with @ndelangen to figure out the best path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, finally understand what's happening here .. thanks @ndelangen for clarifying. Let's merge for now and then re-address this once we refactor the ArgType extraction in (hopefully) 7.0
Issue: #9695
As of pull request #9699, it is possible to provide
addon-docs
avueDocGenOptions
parameter, which is supposed to fix issue #9695. Unfortunately, as stated in the issue, this is not working properly. @pocka started debugging and noticed thatoptions.vueDocgenOptions
returnsundefined
. I went a little bit further by browsing the wholeoptions
object to find any occurrence of my custom configuration defined in Storybook'smain.js
file.I found it within the
options.presetsList
array. Please note there are actually two presets related toaddon-blocks
:What I did
I basically defined an option object for vue-docgen-api and merged all preset options matching
adddon-docs
and containing avueDocgenOptions
key into this object. The option object is then passed tovue-docgen-loader
'soptions.docgenOptions
.There is likely a better and cleaner way to fix it, but this is all I came up with given my relatively poor knowledge regarding storybook addons configuration.
How to test