This repository has been archived by the owner on Aug 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 54
Conversation
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
ryanmccombe
commented
Feb 4, 2021
ryanmccombe
added
the
cross-team
For visibility for both World Service teams (Engage & Media)
label
Feb 4, 2021
simonsinclair
previously approved these changes
Feb 4, 2021
joshcoventry
previously approved these changes
Feb 4, 2021
ryanmccombe
commented
Feb 4, 2021
packages/components/psammead-most-read/src/Rank/__snapshots__/index.test.jsx.snap
Outdated
Show resolved
Hide resolved
ryanmccombe
dismissed stale reviews from joshcoventry and simonsinclair
February 4, 2021 11:31
Dismissing reviews as this PR has totally changed
ryanmccombe
changed the title
Use Emotion 11 Babel Plugin Correctly
Use v11 of emotion babel plugin
Feb 4, 2021
jroebu14
approved these changes
Feb 4, 2021
joshcoventry
reviewed
Feb 4, 2021
packages/components/psammead-most-read/src/Rank/__snapshots__/index.test.jsx.snap
Outdated
Show resolved
Hide resolved
joshcoventry
approved these changes
Feb 4, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Resolves [No Issue]
Overall change:
The babel plugin
emotion
refers to https://www.npmjs.com/package/babel-plugin-emotionAs of v11, we should be using
@emotion
which refers to https://www.npmjs.com/package/@emotion/babel-plugin@emotion/babel-plugin
does seem to have been correctly added topackage.json
, andbabel-plugin-emotion
was correctly removed, however, without this change to the.babelrc
the psammead packages were still compiled using the oldbabel-plugin-emotion
Normally attempting to use a plugin that was not installed would have thrown an error, however, the old plugin was still available, as it was a transitive dependency of
react-select
which is used bystorybook
The effect of having emotion 11 components in Psammead, compiled with an Emotion 10 plugin, then imported into Simorgh and recompiled with an emotion 11 plugin is almost certainly causing the issues we were seeing
Manual, local compilation using this babel config, and then importing of these Psammead packages into a local Simorgh does seem to indicate this is the solution to the problem. However, applying this fix properly will require a version bump and republish of every Psammead package again
Code changes: