Refactor: Rename "render" hooks to "visit" hooks #394
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR introduces a change in the test-runner where the hooks previously known as
preRender
andpostRender
now becomepreVisit
andpostVisit
.This is mostly to address concerns regarding confusion from users, who think that the test-runner is related to the rendering of stories. By renaming to "visit", we make it more explicit that the test-runner visits the story, and watches what it does, rather than do many things that will alter the rendering of a story.
There are no breaking changes, it's backwards compatible and the "render" hooks are deprecated and will alert the user to switch to the "visit" hooks.
Additionally, all of the documentation was changed to use Typescript.
📦 Published PR as canary version:
0.15.2--canary.394.e6df920.0
✨ Test out this PR locally via:
npm install @storybook/test-runner@0.15.2--canary.394.e6df920.0 # or yarn add @storybook/test-runner@0.15.2--canary.394.e6df920.0
Version
Published prerelease version:
v0.15.2-next.1
Changelog
🐛 Bug Fix
Authors: 1