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[Wave]: CC => FC #39705

Merged
merged 42 commits into from Dec 28, 2022
Merged

refactor[Wave]: CC => FC #39705

merged 42 commits into from Dec 28, 2022

Conversation

li-jia-nan
Copy link
Member

@li-jia-nan li-jia-nan commented Dec 21, 2022

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

Use more react way which support multiple wave motion:

Kapture 2022-12-28 at 16 48 51

📝 Changelog

  • 将 Wave 重构为 Function Component

  • 删除了通过 forwardRef 转发 ref,因为这个只在 test case 中用到了,在实际代码中是无用的

  • 删除了test case 中关于 class 静态属性的测试用例,在 FC 中没办法获取到组件内部的属性

Language Changelog
🇺🇸 English Refactor wave effect that can now trigger multiple wave in one time.
🇨🇳 Chinese 重构水波纹视效,现在可以多个水波纹同时触发了。

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@github-actions
Copy link
Contributor

github-actions bot commented Dec 21, 2022

@github-actions
Copy link
Contributor

github-actions bot commented Dec 21, 2022

size-limit report 📦

Path Size
./dist/antd.min.js 367.22 KB (-650 B 🔽)
./dist/antd-with-locales.min.js 422.32 KB (-651 B 🔽)

@codecov
Copy link

codecov bot commented Dec 21, 2022

Codecov Report

Base: 100.00% // Head: 100.00% // No change to project coverage 👍

Coverage data is based on head (88f97f4) compared to base (5ea90df).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff            @@
##            master    #39705   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          557       561    +4     
  Lines         9621      9637   +16     
  Branches      2722      2736   +14     
=========================================
+ Hits          9621      9637   +16     
Impacted Files Coverage Δ
components/switch/index.tsx 100.00% <ø> (ø)
components/_util/wave/WaveEffect.tsx 100.00% <100.00%> (ø)
components/_util/wave/index.ts 100.00% <100.00%> (ø)
components/_util/wave/style.ts 100.00% <100.00%> (ø)
components/_util/wave/useWave.ts 100.00% <100.00%> (ø)
components/_util/wave/util.ts 100.00% <100.00%> (ø)
components/slider/index.tsx 100.00% <0.00%> (ø)
components/qrcode/style/index.ts 100.00% <0.00%> (ø)
...omponents/table/hooks/useFilter/FilterDropdown.tsx 100.00% <0.00%> (ø)
components/config-provider/cssVariables.ts 100.00% <0.00%> (ø)
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@li-jia-nan
Copy link
Member Author

删了几个 case,cov 果然掉了……

@MadCcc
Copy link
Member

MadCcc commented Dec 22, 2022

原则上不删已有的 case,特别是重构

@zombieJ
Copy link
Member

zombieJ commented Dec 28, 2022

components/_util/raf.ts 这个看起来和 rc-utilraf 是等价的,我删了试试。

@zombieJ zombieJ merged commit 4e45276 into master Dec 28, 2022
@zombieJ zombieJ deleted the Wave branch December 28, 2022 15:20
yoyo837 pushed a commit that referenced this pull request Dec 31, 2022
* fix

* refactor[Wave]: CC => FC

* fix lint

* fix

* fix

* fix

* add test case

* add test case

* fix test

* fix test

* test case

* add test case

* fix

* fix

* fix

* fix

* raname

* fix

* test case

* test case

* test case

* fix test

* test case

* refactor: Use React way

* test: coverage

* chore: clean up

* rerun fail ci

* fix: React 17 error

* test: fix test case

* test: fix test case

* fix borderRadius

* test: fix test case

* chore: clean up

* chore: clean up

Co-authored-by: 二货机器人 <smith3816@gmail.com>
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

3 participants