-
Notifications
You must be signed in to change notification settings - Fork 309
Handle multiple animationName props #909
Handle multiple animationName props #909
Conversation
@jaredbrookswhite could you refresh this PR? We'd like to get it merged :) looks like it's failing on a prettier task.
|
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.
Thank you so much for the great test coverages! This PR looks great, just a few pieces of feedback
src/plugins/keyframes-plugin.js
Outdated
if ( | ||
key === 'animationName' && | ||
value && | ||
(value.__radiumKeyframes || Array.isArray(value)) |
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.
Could we do this check above the if
block?
let value = style[key];
const isKeyframeArray = Array.isArray(value);
if (
key === 'animationName' &&
value &&
(value.__radiumKeyframes || isKeyframeArray)
) {
if (isKeyframeArray) {
...etc
}
src/plugins/keyframes-plugin.js
Outdated
config.userAgent, | ||
); | ||
addCSS(css); | ||
value = animationName; |
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.
can we reduce the duplicate logic here and extract this to a shared method?
ie:
const processKeyframeStyle = (value) => {
const keyframesValue = (value: Keyframes);
const { animationName, css } = keyframesValue.__process(config.userAgent);
addCSS(css);
return animationName;
}
if (Array.isArray(value)) {
value = value.map(processKeyframeStyle).join(', ');
} else {
value = processKeyframeStyle(value);
}
e8630bd
to
0839fe5
Compare
0839fe5
to
88a1e38
Compare
I believe you need to rebase/merge the upstream |
* Switch to `publishr` on npm registry publication. Fixes FormidableLabs#894 * Move `rimraf` to `devDependencies` on publish. * Rename + harmonize some npm scripts names.
* Supersedes and closes FormidableLabs#930 * Fixes FormidableLabs#928 * Actually lint our root JS config files. * Upgrade dev deps for React 16 * Fix tests. (And yowza there's some wonkiness with exception throwing...)
* Supersedes FormidableLabs#937 * Updates `React.createClass` calls to real ES `class`. * Refactor remaining `.jsx` suffixes to `.js` + configs. * Actually build the examples in CI.
* Fixes FormidableLabs#576 * Adds node tests for just the enhancer to get us at least a little bit of SSR testing * Improves the babel script commands
…false` wherein libraries can indicate their ESM re-exports are side effect free and can be much more efficiently removed for smaller, faster final bundles. (FormidableLabs#965) Lodash has already rolled out this change in https://unpkg.com/lodash-es@4.17.5/package.json ## Issues This was originally uncovered / discussed at length in: * webpack/webpack#1750 This PR should resolve the issues discussed in: * FormidableLabs/victory#549 * FormidableLabs/redux-little-router#262 ## Changes * Add `sideEffects: false` to `package.json` to allow webpack4 tree-shaking to actually remove all unused code. > This PR has been automatically opened by your friendly [`multibot`](https://github.com/FormidableLabs/multibot/). The transform code and documentation is available at: https://github.com/FormidableLabs/multibot-examples/tree/master/transforms/webpack-side-effects
- **Breaking Change**: Radium now exports defaults as `.default`, so for runtimes like Node.js for all files in `lib/**`. We have changed `package.json:main` to point to `/index.js` instead of `/lib/index.js` as a convenience wrapper to expose mostly what was there before so behavior of `const Radium = require('radium');` works mostly as it did before. Caveats: - Add `es` ESM module export files. - Fix `package.json:scrtips.postinstall` task to correctly work for git-based dependencies.
- Fixes FormidableLabs#738 - This is hacky, but possibly **acceptably** hacky. - Detect and transfer instance method properties from arrow functions to a copy of the prototype (where by definition they don't exist) to allow property inheritance call chaining by `RadiumEnhancer` which otherwise doesn't get its methods called.
Bug fix: render an array of elements * handle array child elements; ensure that extraStateKeyMap is cleaned up * Add regression test for render children.
* upgrade dev dependencies to latest react, ^16.2.0 * tests for fragments
Had an error wherein the right node version never got installed...
updated and done. sorry for the confusion, not in my normal dev environment today. |
This has been released in |
Method to handle #675.