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: Change 2nd argument of transformSource to the storyContext #12265

Merged
merged 1 commit into from Sep 3, 2020

Conversation

phated
Copy link
Contributor

@phated phated commented Aug 26, 2020

Issue: N/A

What I did

Similar to #12178, the transformSource method option in addon-docs was receiving the storyId instead of the entire context.

This is slightly breaking because it changes the 2nd argument to be the entire context instead of just the story id. However, I think this is okay because an end-user can destructure the story id from the context, and the 2nd parameter also was only documented in one recipe and not tested at all.

This will also bring the transformSource method inline with the definition in #12178.

How to test

  • Is this testable with Jest or Chromatic screenshots? Yes, added jest tests
  • Does this need a new example in the kitchen sink apps? No; however, I'll be able to expand on this work in the future to add a cool example to the kitchen sink!
  • Does this need an update to the documentation? Updated the recipe.

If your answer is yes to any of these, please make sure to include it in your PR.

@shilman shilman added this to the 6.0.x milestone Sep 3, 2020
@shilman shilman added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Sep 3, 2020
@shilman shilman merged commit 910af1e into storybookjs:next Sep 3, 2020
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label Sep 26, 2020
shilman added a commit that referenced this pull request Sep 26, 2020
Addon-docs: Change 2nd argument of transformSource to the storyContext
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
block: source BREAKING CHANGE 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.

None yet

2 participants