-
Notifications
You must be signed in to change notification settings - Fork 105
Refactor for fixing Animated re-render will cause transition disappear #39
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
Conversation
|
wow~ what is the primary commit for fixing? |
| if (window.callPhantom) { | ||
| return done(); | ||
| done(); | ||
| return; |
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.
why change this?
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.
eslint
|
Primary for React will reset ref: #38 |
| @@ -1,336 +0,0 @@ | |||
| import React from 'react'; | |||
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.
别重命名,diff 没法看了。
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.
代码逻辑从 Animate keys 转移到 AnimateChild 里了, diff 也没参考价值...
|
Mark: |
|
Mark: (Inline code use |
|
Mark: Update: Also affected by empty |
| return Animate; | ||
| } | ||
|
|
||
| export default genAnimate(AnimateChild); No newline at end of file |
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.
为啥要套个 genAnimate 方法
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.
用来生成 支持/不支持 Transition 和 Animation 的实例做 Test Coverage。
|
哇操。。。。666 |
|
rc 组件估计也要改一轮依赖。 |
|
嗯,现在在调试 trigger,发了一版 |
|
备注: 新版逻辑复用了React的transition判断方式,对于不支持 transition 的环境(例如jest使用jsdom没有模拟transition),生命周期里便会处理掉。不过这会影响与之相关的所有测试用例(用到 rc-trigger 的)。 准备 tree-select 重构完后,把相关的其他组件的 test case 都更新一下。 |
| return prefixes; | ||
| } | ||
|
|
||
| const vendorPrefixes = getVendorPrefixes(canUseDOM, window); |
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.
不能直接用 window,SSR 会报错。
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.
好了
rc-tools& fix eslintcss-animationand use react lifecycle insteadrafforactivestate triggerreact-lifecycles-compatfor new life cycle methodexclusivechange can change the transition immediatelyCurrently,
classNamewill be added by both React & js to keep the className work when sub component not accept theclassNameprops. But for styles, there is no better way for updating.So it still has the issue when both React and
animationchange thestyleprop.