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/remove-unsafe-lifecycles-part1 #416

Merged

Conversation

kyoyadmoon
Copy link
Member

@kyoyadmoon kyoyadmoon commented Dec 14, 2023

Purpose

  • 重構有使用到 UNSAFE lifecycle 的 components,用 react hooks 改寫
  • 由於從 class component 改寫成 functional component,原本的 enzyme 測試針對 class component 的測試方法會失敗,因此也將對應的測試用 testing-library 重寫了
  • 這個 PR 改寫了三個檔案,可以依照 commit review 改寫的內容和對應的測試

Copy link

codecov bot commented Dec 14, 2023

Codecov Report

Merging #416 (caa3ea6) into test/add-testing-library (b95a974) will increase coverage by 8.81%.
Report is 1 commits behind head on test/add-testing-library.
The diff coverage is 96.77%.

Additional details and impacted files
@@                     Coverage Diff                      @@
##           test/add-testing-library     #416      +/-   ##
============================================================
+ Coverage                     88.97%   97.78%   +8.81%     
============================================================
  Files                           151       69      -82     
  Lines                          1614     1444     -170     
  Branches                        287      283       -4     
============================================================
- Hits                           1436     1412      -24     
+ Misses                          178       32     -146     
Files Coverage Δ
packages/core/src/StatusIcon.js 100.00% <100.00%> (ø)
packages/core/src/EditableBasicRow.js 94.59% <93.54%> (-5.41%) ⬇️
packages/core/src/EditableTextLabel.js 96.42% <96.36%> (-3.58%) ⬇️

... and 82 files with indirect coverage changes

Copy link
Contributor

@chenesan chenesan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

packages/core/src/StatusIcon.js Outdated Show resolved Hide resolved
Copy link

sonarcloud bot commented Dec 16, 2023

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Base automatically changed from test/add-testing-library to project/upgrade-react-v18 December 18, 2023 10:26
@kyoyadmoon kyoyadmoon merged commit 5849ef8 into project/upgrade-react-v18 Dec 19, 2023
5 checks passed
@kyoyadmoon kyoyadmoon deleted the refactor/remove-unsafe-lifecycles-part1 branch December 19, 2023 05:26
@zhusee2 zhusee2 added this to the v7 milestone Feb 2, 2024
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.

4 participants