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
Migration to Emotion 11 #17640
Merged
Migration to Emotion 11 #17640
Changes from 8 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
50b1731
Update Emotion deps
Andarist c2b6cd0
Copy over Emotion 10 styles
Andarist e9dfab4
Fix types for theme-related APIs
Andarist 1d761c2
Merge branch 'next' into emotion11
Andarist 18a8e84
update snapshots
Andarist 729a870
Fixed an issue with some snapshotSerializers being applied more than …
Andarist 2c16154
Merge branch 'next' into emotion11
Andarist ccbb7f4
Add a TODO comment
Andarist 8b1f7bd
Merge branch 'next' into emotion11
Andarist ca1b4b6
Merge branch 'next' into emotion11
ndelangen 54520ee
Merge branch 'next' into emotion11
ndelangen 030b20c
Merge branch 'next' into emotion11
shilman fc7fd5e
Merge branch 'next' into emotion11
Andarist e7d45b8
make `useTheme` generic again to avoid a breaking change
Andarist 1c16897
update snapshot
Andarist bf47ce5
Merge branch 'next' into emotion11
ndelangen 5b75d9b
Merge branch 'emotion11' of github.com:storybookjs/storybook into emo…
ndelangen 853d2d9
corrections on versions
ndelangen 1572813
Merge branch 'next' into emotion11
ndelangen a263bf7
fix versions.ts
ndelangen File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3
addons/storyshots/storyshots-core/stories/storyshot.enzyme.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,9 @@ | ||
import path from 'path'; | ||
import { mount } from 'enzyme'; | ||
import { createSerializer as enzymeSerializer } from 'enzyme-to-json'; | ||
import { createSerializer as emotionSerializer } from 'jest-emotion'; | ||
import initStoryshots from '../dist/ts3.9'; | ||
|
||
initStoryshots({ | ||
framework: 'react', | ||
configPath: path.join(__dirname, '..', '.storybook'), | ||
renderer: mount, | ||
snapshotSerializers: [enzymeSerializer(), emotionSerializer()], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
This was creating an infinite loop because the emotion serializer is already used in the root
jest.config.js
and this config was merged with this one here. As the result - 2 emotion serializers were applied here and this messed them up.More details can be found here:
emotion-js/emotion#2704