Skip to content
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: Fix ArgsTable union type handling in Vue/TS #12158

Merged

Conversation

HerrBertling
Copy link

@HerrBertling HerrBertling commented Aug 20, 2020

Issue: #11944

What I did

In the addon-docs, the vue-docgen-api has an entry elements for union types but the expected entry (with the same content) is value.

This fix sanitizes the data within the specific vue-docgen-api hook extractComponentSectionArray so that the item we throw into extractProp() contains the expected object 😊

How to test

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix. Looks great except for one possible bug that I'm concerned about.

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

False alarm

@shilman shilman added this to the 6.0.x milestone Aug 20, 2020
@shilman shilman changed the title fix(addon-docs): correctly parse union types in Vue/TS Addon-docs: Fix union type handling in Vue/TS Aug 20, 2020
@shilman shilman changed the title Addon-docs: Fix union type handling in Vue/TS Addon-docs: Fix ArgsTable union type handling in Vue/TS Aug 20, 2020
@shilman shilman merged commit 7e30368 into storybookjs:next Aug 20, 2020
@HerrBertling HerrBertling deleted the fix/11944-docs-union-types-vue branch August 20, 2020 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants