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 Bugfix & documentation PR that need to be picked to master branch labels Aug 1, 2022
@ndelangen ndelangen self-assigned this Aug 1, 2022
yannbf
yannbf approved these changes Aug 1, 2022
Copy link
Member

@yannbf yannbf left a comment

@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
57 of 59 checks passed
@ndelangen ndelangen deleted the norbert/sb-445-sb18376-extractargtypes-doesnt-function branch Aug 1, 2022
@shilman shilman added the picked Patch/release PRs cherry-picked to master/release branch label Aug 2, 2022
shilman pushed a commit that referenced this issue 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
app: html bug patch Bugfix & documentation PR that need to be picked to master branch picked Patch/release PRs cherry-picked to master/release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants