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

Csf-plugin: Support meta description comments #20632

Merged
merged 2 commits into from
Jan 18, 2023

Conversation

shilman
Copy link
Member

@shilman shilman commented Jan 16, 2023

Issue: N/A

What I did

Support component descriptions as JSDoc comments on the meta export.

/** some description */
export default { .... }
/** some description */
const meta = { ... }
export default meta;

How to test

See attached unit tests.

Or add a description comment to a CSF file that has autodocs.

Copy link
Contributor

@JReinhold JReinhold left a comment

Choose a reason for hiding this comment

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

Looks good. I don't know why Chromatic isn't reporting any changes to the Description block as there clearly are changes. I'll investigate.

code/lib/csf-tools/src/enrichCsf.ts Outdated Show resolved Hide resolved
@JReinhold
Copy link
Contributor

Turbosnap was ignoring the changes to the Description stories because there was no direct line of dependencies between enrichCsf and the stories. this makes sense.
I forced a build from local and it picked up the changes.

Everything is good.

@shilman shilman merged commit 318568d into next Jan 18, 2023
@shilman shilman deleted the shilman/csf-plugin-meta-descriptions branch January 18, 2023 05:56
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