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

Warn about css prop/babel plugin compatibility earlier #1712

Merged
merged 2 commits into from
Jul 2, 2020

Conversation

Nantris
Copy link
Contributor

@Nantris Nantris commented Jan 10, 2020

Since there's only the one warning I think it makes more sense to put it at the top where it shows implementing the plugin in .babelrc. I also noticed that the full page for the docs on the @emotion/babel-preset-css-prop doesn't make any mention of this incompatibility.

Inspired by a comment by @GuillaumeCisco - #348 (comment)

Since there's only the one warning I think it makes more sense to put it at the top where it shows implementing the plugin in `.babelrc`. I also noticed that the full page for the docs on the `@emotion/babel-preset-css-prop` doesn't make any mention of this incompatibility.
@changeset-bot
Copy link

changeset-bot bot commented Jan 10, 2020

💥 No Changeset

Latest commit: 0fee382

Merging this PR will not cause any packages to be released. If these changes should not cause updates to packages in this repo, this is fine 🙂

If these changes should be published to npm, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@@ -31,7 +31,7 @@ Use the [JSX Pragma](#jsx-pragma) method instead.
"presets": ["@emotion/babel-preset-css-prop"]
}
```

Compatibility Note: If you include the plugin `babel-plugin-transform-react-inline-elements` in your `.babelrc` your styles will not be applied. The plugin is not compatible with the `css` prop.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not so sure about the change - it obviously doesn't hurt anybody, but I'm wondering if it's the best place for such information. @mitchellhamilton wdyt?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've decided not to include it here as it's already mentioned on the bottom - but I've added a new warning about this to the @emotion/babel-preset-css-prop's README

@Andarist Andarist changed the base branch from master to next June 29, 2020 19:26
# Conflicts:
#	docs/css-prop.mdx
@codecov
Copy link

codecov bot commented Jul 2, 2020

Codecov Report

❗ No coverage uploaded for pull request base (next@cd77efb). Click here to learn what that means.
The diff coverage is n/a.

Impacted Files Coverage Δ
packages/styled-base/src/index.js 100.00% <0.00%> (ø)
packages/core/src/jsx.js 100.00% <0.00%> (ø)
scripts/test-utils/next-env.js 100.00% <0.00%> (ø)
...nt-plugin-emotion/src/rules/import-from-emotion.js 90.90% <0.00%> (ø)
packages/babel-plugin-emotion/src/utils/checks.js 100.00% <0.00%> (ø)
packages/create-emotion/src/index.js 100.00% <0.00%> (ø)
packages/babel-plugin-emotion/src/utils/strings.js 95.23% <0.00%> (ø)
packages/unitless/src/index.js 100.00% <0.00%> (ø)
packages/jest-emotion/src/matchers.js 96.15% <0.00%> (ø)
packages/babel-plugin-emotion/src/styled-macro.js 100.00% <0.00%> (ø)
... and 71 more

@Andarist Andarist merged commit 97d1f97 into emotion-js:next Jul 2, 2020
@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 2, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 0fee382:

Sandbox Source
Emotion Configuration

louisgv pushed a commit to louisgv/emotion that referenced this pull request Sep 6, 2020
…elements (emotion-js#1712)

Since there's only the one warning I think it makes more sense to put it at the top where it shows implementing the plugin in `.babelrc`. I also noticed that the full page for the docs on the `@emotion/babel-preset-css-prop` doesn't make any mention of this incompatibility.

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants