This repository has been archived by the owner on Mar 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
fix(fela): plugin order, invokeKeyframes #1741
Merged
Merged
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
lucivpav
requested review from
dvdzkwsk,
kuzhelov,
layershifter,
levithomason,
miroslavstastny and
mnajdova
as code owners
July 31, 2019 13:53
This PR is to be merged after #1744 |
lucivpav
changed the title
fix(fela): plugin order
fix(fela): plugin order, felaInvokeKeyframesPlugin
Aug 2, 2019
lucivpav
commented
Aug 2, 2019
@@ -56,4 +56,12 @@ describe('felaRenderKeyframesPlugin', () => { | |||
animationDuration: '2s', | |||
}) | |||
}) | |||
|
|||
test('does not transform a list of strings', () => { |
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.
Maybe the felaInvokeKeyframesPlugin
fix and test should be moved into a separate commit? The reason for this fix is that screener tests are failing, if the order of plugins is changed.
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.
The checkboxStyles
definition contains root: display: ['inline-grid', '-ms-inline-grid']
. This gets processed by felaInvokeKeyframesPlugin
incorrectly, rendering it as root: display: { 0: 'inline-grid', 1: '-ms-inline-grid' }
.
lucivpav
changed the title
fix(fela): plugin order, felaInvokeKeyframesPlugin
fix(fela): plugin order, invokeKeyframes
Aug 2, 2019
layershifter
reviewed
Aug 2, 2019
miroslavstastny
approved these changes
Aug 8, 2019
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.
plugin order
This PR resolves and tests a problem with
felaRenderer
. The order of plugins being executed actually matters. The problem is thatfelaPluginFallbackValue()
comes beforefelaInvokeKeyframesPlugin()
.felaPluginFallbackValue()
does the following:Input
{
color: [ 'rgba(0, 0, 0, 0.5)', '#ccc']
}
Output
{
color: 'rgba(0, 0, 0, 0.5);color:#ccc'
}
But if we have, say, an Animation with
keyframeParams=[ '0%', '50%', '100%' ]
, the array would be processedfelaPluginFallbackValue()
. If thekeyframe
function expects an array, we get an error, because thekeyFrameParams
is no longer an array.invokeKeyframes
The
checkboxStyles
definition containsroot: display: ['inline-grid', '-ms-inline-grid']
. This gets processed byfelaInvokeKeyframesPlugin
incorrectly, rendering it asroot: display: { 0: 'inline-grid', 1: '-ms-inline-grid' }
.