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

fix missing ability to set docs.extractArgTypes for html framework #18831

Merged

Conversation

ndelangen
Copy link
Member

@ndelangen ndelangen commented Aug 1, 2022

Issue: #18376

What I did

@yannbf and I found that in #17695 a feature was not migrated to the html renderer, that was migrated for the other frameworks:

export const argTypesEnhancers = [enhanceArgTypes];

...was essentially missing.

I've added it and tested editing preview.ts in the html-kichten-sink example.

Note that in order for this feature to work, a component property has to be set in the default export of the story, see:

const extractedArgTypes = extractArgTypes && component ? extractArgTypes(component) : {};

@ndelangen ndelangen added bug patch:yes Bugfix & documentation PR that need to be picked to main branch labels Aug 1, 2022
@ndelangen ndelangen self-assigned this Aug 1, 2022
@yannbf yannbf added the html label Aug 1, 2022
Copy link
Member

@yannbf yannbf left a comment

Choose a reason for hiding this comment

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

@yannbf
Copy link
Member

yannbf commented Aug 1, 2022

Quick reminder to add documentation to the need of component to be set when using custom extractArgTypes.

@ndelangen ndelangen merged commit 610f4ae into next Aug 1, 2022
@ndelangen ndelangen deleted the norbert/sb-445-sb18376-extractargtypes-doesnt-function branch August 1, 2022 15:01
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Aug 2, 2022
shilman pushed a commit that referenced this pull request Aug 2, 2022
…ractargtypes-doesnt-function

fix missing ability to set docs.`extractArgTypes` for html framework
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug html patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants