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

refactor: Use rc-motion #203

Merged
merged 23 commits into from Sep 29, 2020
Merged

refactor: Use rc-motion #203

merged 23 commits into from Sep 29, 2020

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Sep 28, 2020

  • 替换 rc-animaterc-motion
  • 移除所有 DOM 操作,改由 React 生命周期控制
  • destroyOnClose 会同时删除最外层 div 容器
  • 剥离 Dialog & Mask 为独立的组件
  • 点击 Mask 关闭判断改成更精确的元素层级判断

TODO

rc-dialogrc-drawer 对于 rc-util/PortalWrap 耦合过高,重写成本略大。暂时就这么着吧……

@vercel
Copy link

vercel bot commented Sep 28, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/react-component/dialog/ipibquc7g
✅ Preview: https://dialog-git-rc-motion.react-component.vercel.app

@codecov
Copy link

codecov bot commented Sep 29, 2020

Codecov Report

Merging #203 into master will increase coverage by 5.85%.
The diff coverage is 98.55%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #203      +/-   ##
==========================================
+ Coverage   92.06%   97.91%   +5.85%     
==========================================
  Files           3        5       +2     
  Lines         189      144      -45     
  Branches       53       43      -10     
==========================================
- Hits          174      141      -33     
+ Misses         15        2      -13     
- Partials        0        1       +1     
Impacted Files Coverage Δ
src/Dialog/Content.tsx 95.23% <95.23%> (ø)
src/Dialog/Mask.tsx 100.00% <100.00%> (ø)
src/Dialog/index.tsx 100.00% <100.00%> (ø)
src/DialogWrap.tsx 94.11% <100.00%> (-5.89%) ⬇️
src/util.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ed79ae6...e99a50d. Read the comment docs.

@zombieJ zombieJ marked this pull request as ready for review September 29, 2020 03:53
@zombieJ zombieJ merged commit ec43677 into master Sep 29, 2020
@zombieJ zombieJ deleted the rc-motion branch September 29, 2020 03:53
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