Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

fix(Provider): Honor disableAnimations #2087

Merged
merged 3 commits into from
Nov 11, 2019
Merged

Conversation

miroslavstastny
Copy link
Member

Fixes #2086

@@ -24,16 +24,17 @@ export default () => {
return Object.keys(styles).reduce((acc, cssPropertyName) => {
const cssPropertyValue = styles[cssPropertyName]

if (animationProps.indexOf(cssPropertyName) !== -1) {
Copy link
Member Author

Choose a reason for hiding this comment

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

We want to remove animationProps even if they are objects.

@@ -231,6 +231,7 @@ const renderComponent = <P extends {}>(
const direction = rtl ? 'rtl' : 'ltr'
const felaParam = {
theme: { direction },
disableAnimations,
Copy link
Contributor

Choose a reason for hiding this comment

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

We have check in the plugin for this:

if (props && props.disableAnimations && type === 'RULE')

Do we really need this one here too?

Copy link
Member Author

Choose a reason for hiding this comment

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

But the felaParam here is the props in the plugin. That was the cause of the issue.
We originally passed or params to fela but that changed in #1957 and it caused this bug.

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it! Thanks for the clarification

Copy link
Contributor

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

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

Please add changelog entry before merging

@miroslavstastny miroslavstastny merged commit c01e10c into master Nov 11, 2019
@miroslavstastny miroslavstastny deleted the fix/disable-animations branch November 11, 2019 11:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to disable animations
2 participants