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: Collapse to function component #287

Merged
merged 9 commits into from
Jan 12, 2023

Conversation

Wxh16144
Copy link
Contributor

@Wxh16144 Wxh16144 commented Dec 20, 2022

  • src/Collapse.tsxsrc/Panel.tsx 从 Class Compoent 重构为 Function Component

@vercel
Copy link

vercel bot commented Dec 20, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
collapse ✅ Ready (Inspect) Visit Preview Jan 12, 2023 at 6:31AM (UTC)

@Wxh16144 Wxh16144 changed the title feat: add root element ref [WIP] feat: add root element ref Dec 22, 2022
@codecov
Copy link

codecov bot commented Dec 23, 2022

Codecov Report

Merging #287 (5dd6a35) into master (4abce43) will increase coverage by 0.40%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #287      +/-   ##
==========================================
+ Coverage   98.44%   98.85%   +0.40%     
==========================================
  Files           4        4              
  Lines         129       87      -42     
  Branches       39       33       -6     
==========================================
- Hits          127       86      -41     
+ Misses          2        1       -1     
Impacted Files Coverage Δ
src/PanelContent.tsx 90.90% <ø> (ø)
src/Collapse.tsx 100.00% <100.00%> (ø)
src/Panel.tsx 100.00% <100.00%> (+2.12%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@afc163
Copy link
Member

afc163 commented Dec 29, 2022

Is is still WIP ?

@Wxh16144
Copy link
Contributor Author

Is is still WIP ?

是的,计划把 CC 重构为 FC,然后再解决这个问题

@Wxh16144 Wxh16144 changed the title [WIP] feat: add root element ref refactor: collapse CC => FC Jan 5, 2023
@Wxh16144 Wxh16144 changed the title refactor: collapse CC => FC refactor: Collapse to function component Jan 6, 2023
@Wxh16144
Copy link
Contributor Author

Wxh16144 commented Jan 9, 2023

wait #294

@Wxh16144
Copy link
Contributor Author

Wxh16144 commented Jan 10, 2023

wait #294

ready~

  • docs/example is still Class component, plan to open a separate PR and change it to Function component

src/Panel.tsx Show resolved Hide resolved
src/Panel.tsx Show resolved Hide resolved
@Wxh16144
Copy link
Contributor Author

这个提交 导致测试覆盖率下降了

@zombieJ
Copy link
Member

zombieJ commented Jan 11, 2023

Test 文件能先不换不,我看有的 keyPress 改成了 keyDown。重构需要避免有逻辑变化。

@Wxh16144
Copy link
Contributor Author

Test 文件能先不换不,我看有的 keyPress 改成了 keyDown。重构需要避免有逻辑变化。

那先 revert HEAD~2 ?

@zombieJ
Copy link
Member

zombieJ commented Jan 11, 2023

能趁此补一下测试用例不?把覆盖率拉上去

@Wxh16144
Copy link
Contributor Author

能趁此补一下测试用例不?把覆盖率拉上去

ready~

@zombieJ zombieJ merged commit f4ee71f into react-component:master Jan 12, 2023
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

4 participants