Update Gitlab React version#672
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughUpgrades React and related dependencies to 18.2.0, refactors Babel config to automatic JSX runtime and parameterized presets, tightens PluginRegistry types, migrates scrollbars package, updates react-bootstrap Modal props, and applies minor class-field terminator fixes. ChangesReact 18 Migration
🎯 3 (Moderate) | ⏱️ ~20 minutes
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
webapp/package.json (1)
25-31: ⚡ Quick winConsider upgrading to React 18.3.1 if preparing for React 19 migration.
React 18.3.1 (latest in the 18 line) is functionally identical to 18.2.0 but introduces deprecation warnings for patterns that will no longer be supported in React 19 (e.g., findDOMNode, legacy context, string refs). An upgrade is not necessary for bug fixes or performance improvements, but worthwhile if your team plans to eventually migrate to React 19. Note that React 18 has reached end-of-life.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@webapp/package.json` around lines 25 - 31, The package.json currently pins "react": "18.2.0"; update the React dependency to "18.3.1" to align with the latest 18.x release in preparation for React 19 migration. Edit the "react" entry in package.json (alongside "react-dom") to use version "18.3.1", run your package manager to update lockfile (npm install / yarn install / pnpm install), and run the test/build suite to verify there are no deprecation warnings or breakages before merging.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@webapp/package.json`:
- Around line 78-79: The package.json currently pins "jest": "29.7.0" and
"jest-environment-jsdom": "29.7.0"; verify the project's supported Node.js
runtime and either (A) if we must support older Node versions, keep Jest 29 and
document the Node constraint by adding an "engines" entry in package.json that
lists supported Node versions (e.g., ">=14 <=18") or (B) if Node 18+ is
acceptable, upgrade to Jest 30 and the corresponding jsdom version, then run and
update JSDOM-dependent tests to accommodate stricter DOM spec compliance and
removed matcher aliases (focus changes in tests referencing
jest-environment-jsdom and any deprecated matchers).
---
Nitpick comments:
In `@webapp/package.json`:
- Around line 25-31: The package.json currently pins "react": "18.2.0"; update
the React dependency to "18.3.1" to align with the latest 18.x release in
preparation for React 19 migration. Edit the "react" entry in package.json
(alongside "react-dom") to use version "18.3.1", run your package manager to
update lockfile (npm install / yarn install / pnpm install), and run the
test/build suite to verify there are no deprecation warnings or breakages before
merging.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 6ccb58e9-42a5-4ca3-a816-15f19911d487
⛔ Files ignored due to path filters (1)
webapp/package-lock.jsonis excluded by!**/package-lock.json
📒 Files selected for processing (10)
webapp/.babelrcwebapp/babel.config.jswebapp/package.jsonwebapp/src/client/client.tswebapp/src/components/modals/attach_comment_to_issue/attach_comment_to_issue_modal.tsxwebapp/src/components/modals/create_issue/create_issue_modal.tsxwebapp/src/components/rhs_sidebar/rhs_sidebar.tsxwebapp/src/components/sidebar_right/index.tsxwebapp/src/hooks/index.tswebapp/src/types/mattermost-webapp/index.d.ts
💤 Files with no reviewable changes (1)
- webapp/.babelrc
avasconcelos114
left a comment
There was a problem hiding this comment.
LGTM! Only note (totally non-blocking as it kind of doesn't apply yet) is that we might want to just add react testing library too so we can start adding tests for the components as we continue developing the plugin
|
Thanks @avasconcelos114 its already in the dev deps :) |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
|
@codereabbitai approve |
|
@coderabbitai approve |
✅ Actions performedComments resolved and changes approved. |
Summary
Update react and relevant libraries to match react 18.
Ticket Link
https://mattermost.atlassian.net/browse/MM-67213
QA
just a basic regression test
Change Impact: 🟠 Medium
Reasoning: Upgrading React and related UI/state libraries to React 18, replacing react-custom-scrollbars with react-custom-scrollbars-2, adjusting Babel config, and tightening plugin type signatures affect multiple cross-cutting areas (build, types, UI components) but do not touch authentication, persistence, or core business logic.
Regression Risk: Moderate — runtime behavior and component lifecycle differences under React 18, type-signature changes for plugin registrations, and dependency swaps can introduce UI regressions or build/test failures, though most changes are localized to the webapp.
** QA Recommendation:** Run targeted manual UI regression tests for critical flows (modals, RHS/sidebar behavior, scroll behaviour), run full webapp build and test suite; do not skip manual QA for UI-critical paths.
Generated by CodeRabbitAI