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

Add dev warning about keyframes being interpolated into plain strings. #1553

Merged
merged 1 commit into from
Oct 21, 2019

Conversation

Andarist
Copy link
Member

@Andarist Andarist commented Oct 20, 2019

Arguably the preferred way to write this would be to wrap the thing in css call which can handle interpolated keyframes without falling back into regexp extraction.

It's slightly weird to me though that this is allowed when using object styles but it is not when using plain strings. I can think of an argument for this (object values being shorter and not needing css wrapping beside this one thing), but this looks inconsistent as part of the API. So if we decide not to merge this because of performance reasons we should at least add a dev warning about this.

EDIT:// changed the PR to introduce a dev warning instead of regexp matching all strings

@changeset-bot
Copy link

changeset-bot bot commented Oct 20, 2019

🦋 Changeset is good to go

Latest commit: 8c8e266

We got this.

Not sure what this means? Click here to learn what changesets are.

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

@codecov
Copy link

codecov bot commented Oct 20, 2019

Codecov Report

Merging #1553 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted Files Coverage Δ
packages/serialize/src/index.js 100% <100%> (ø) ⬆️

@emmatown
Copy link
Member

I think I'd rather have a dev warning about this because running this on all string styles. It's fine when it's only for the values of a couple properties on object styles but for every string style, I'd rather avoid it in production.

@Andarist Andarist changed the title Allow for keyframes to be interpolated into plain strings. Add dev warning about keyframes being interpolated into plain strings. Oct 21, 2019
@Andarist
Copy link
Member Author

@mitchellhamilton adjusted

Copy link
Member

@emmatown emmatown left a comment

Choose a reason for hiding this comment

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

Thanks!!

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.

None yet

2 participants