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: Add transformSource for jsxDecorator, deprecated onBeforeRender #12178

Merged
merged 4 commits into from
Aug 31, 2020

Conversation

phated
Copy link
Contributor

@phated phated commented Aug 21, 2020

Issue: N/A

What I did

I modified where onBeforeRender was called and threaded the story context into that method. This can help users modify the snippet by pulling data that might be on story parameters or somewhere else in the context.

How to test

  • Is this testable with Jest or Chromatic screenshots? Yes, Jest
  • Does this need a new example in the kitchen sink apps? I don't this so.
  • Does this need an update to the documentation? It isn't mentioned in the docs currently.

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

@shilman shilman added react block: source maintenance User-facing maintenance tasks labels Aug 21, 2020
@shilman
Copy link
Member

shilman commented Aug 21, 2020

build is failing. are you able to access the circle ci logs?

$ node ../../scripts/prepare.js
src/frameworks/react/jsxDecorator.test.tsx(135,29): error TS7006: Parameter 'dom' implicitly has an 'any' type.

@phated
Copy link
Contributor Author

phated commented Aug 21, 2020

I'm not sure what "teamcity" is or why it is failing now. I don't have access to that.

@phated phated changed the title Allow onBeforeRender to receive story context Add transformSource for jsxDecorator, deprecated onBeforeRender Aug 22, 2020
@phated
Copy link
Contributor Author

phated commented Aug 22, 2020

Updated the code (and title of this issue) as per discord discussion. 🎉

@shilman shilman changed the title Add transformSource for jsxDecorator, deprecated onBeforeRender Addon-docs: Add transformSource for jsxDecorator, deprecated onBeforeRender Aug 31, 2020
@shilman shilman merged commit 66c6ef6 into storybookjs:next Aug 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants