Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

refactor: deprecated React 17 #4078

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

Merged
merged 3 commits into from
Dec 23, 2024
Merged

refactor: deprecated React 17 #4078

merged 3 commits into from
Dec 23, 2024

Conversation

simonguo
Copy link
Member

@simonguo simonguo commented Dec 23, 2024

This pull request includes several changes to the testing setup and dependencies for the project, focusing on updating React versions and improving the testing library usage. The most important changes include removing support for React 17, updating peer dependencies, and refactoring test imports and assertions.

React version updates:

  • Removed support for React 17 in the CI workflow and package.json, and updated peer dependencies to require React 18 or higher. (.github/workflows/nodejs-ci.yml, package.json) [1] [2] [3] [4]

Testing library updates:

  • Refactored test files to use @testing-library/react directly instead of custom utilities, and updated assertions to use screen and expect. (src/Calendar/test/useCalendarDateSpec.tsx, src/Content/test/ContentStylesSpec.tsx, src/Modal/test/ModalSpec.tsx, src/internals/Plaintext/test/PlaintextSpec.tsx, src/internals/Ripple/test/RippleSpec.tsx) [1] [2] [3] [4] [5]

Miscellaneous improvements:

  • Added conditional checks for aria-controls and aria-describedby attributes in PickerToggle to handle cases where id is undefined. (src/internals/Picker/PickerToggle.tsx)
  • Simplified the useUniqueId hook to use the built-in useId from React. (src/internals/hooks/useUniqueId.ts)

Copy link

codesandbox bot commented Dec 23, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

vercel bot commented Dec 23, 2024

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

Name Status Preview Comments Updated (UTC)
rsuite-nextjs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 23, 2024 9:30am
rsuite-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 23, 2024 9:30am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
rsuite-v4 ⬜️ Ignored (Inspect) Visit Preview Dec 23, 2024 9:30am

@simonguo simonguo changed the base branch from main to next December 23, 2024 08:18
@simonguo simonguo changed the title Deprecated react 16/17 refactor: deprecated React 17 Dec 23, 2024
@simonguo simonguo added this to the v6 milestone Dec 23, 2024
Copy link

codesandbox-ci bot commented Dec 23, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Copy link

codecov bot commented Dec 23, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.24%. Comparing base (4868e0e) to head (c0949a4).
Report is 1 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #4078      +/-   ##
==========================================
- Coverage   89.29%   89.24%   -0.05%     
==========================================
  Files         517      517              
  Lines       12220    12186      -34     
  Branches     3169     3162       -7     
==========================================
- Hits        10912    10876      -36     
- Misses        644      646       +2     
  Partials      664      664              
Flag Coverage Δ
ChromeCi 89.23% <100.00%> (+0.20%) ⬆️
Firefox 89.20% <100.00%> (+0.21%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@simonguo simonguo merged commit a1107ef into next Dec 23, 2024
15 of 16 checks passed
@simonguo simonguo deleted the deprecated-react-17 branch December 23, 2024 10:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
Morty Proxy This is a proxified and sanitized view of the page, visit original site.