-
-
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: Apply transformSource to any SourceType #12375
Addon-docs: Apply transformSource to any SourceType #12375
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.
Looks great! Can you add an official-storybook
example in Addons/Docs
to demo this?
Yep! I'll put one together now 😄 |
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.
the string values are not capitalized 😭
examples/official-storybook/stories/addon-docs/transform-source.stories.js
Outdated
Show resolved
Hide resolved
examples/official-storybook/stories/addon-docs/transform-source.stories.js
Outdated
Show resolved
Hide resolved
examples/official-storybook/stories/addon-docs/transform-source.stories.js
Outdated
Show resolved
Hide resolved
Co-authored-by: Michael Shilman <shilman@users.noreply.github.com>
Whoops, sorry about that. I've applied your suggestions! |
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.
🙌
Issue: N/A
What I did
I made the
transformSource
function (if specified) apply to allSourceType
snippets.While trying to modify the snippets produced for
SourceType.DYNAMIC
, I noticed that thetransformSource
option was only being applied toSourceType.CODE
snippets. This seems to be due to it being called insideenhanceSource
, but theSourceType
refactoring came after, so I think it got missed in the shuffle.How to test
transformSource
config.If your answer is yes to any of these, please make sure to include it in your PR.