Skip to content

deps: react-migration-to-v19#6764

Open
Zaimwa9 wants to merge 3 commits intomainfrom
deps/upgrade-to-react-19
Open

deps: react-migration-to-v19#6764
Zaimwa9 wants to merge 3 commits intomainfrom
deps/upgrade-to-react-19

Conversation

@Zaimwa9
Copy link
Contributor

@Zaimwa9 Zaimwa9 commented Feb 24, 2026

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Upgrades the frontend from React 16 to React 19, along with all incompatible dependencies.

React 19 migration

  • Updated react and react-dom from 16.14.0 to 19.x
  • Updated @types/react and @types/react-dom to 19.x
  • Configured Babel with "runtime": "automatic" for the new JSX transform
  • Removed @babel/transform-react-inline-elements (incompatible with React 19)
  • Updated tsconfig.json and tsconfig.jest.json to use "jsx": "react-jsx"
  • Deleted legacy common/Component.js (used React.createClass, removed in React 19)
  • Removed string refs (ref='wrappedComponent') from ConfigProvider and withSegmentOverrides

Dependency replacements

  • @material-ui/core → native implementations: Material UI v4 is incompatible with React 19
    • AccordionCard: replaced and with a custom height-animated accordion using useRef/useEffect
    • ChipInput: replaced material-ui-chip-input with a custom chip input component
    • SegmentSelect: removed @material-ui/core/Select type import, replaced with plain types
  • react-sortable-hoc → @dnd-kit/core + @dnd-kit/sortable: react-sortable-hoc relies on deprecated findDOMNode, incompatible with
    React 19. Migrated SegmentOverrides to use @dnd-kit with DndContext, SortableContext, and useSortable
  • react-select 2.x → 5.x: Updated for React 19 compatibility
  • react-click-outside: Removed (unused/incompatible)
  • react-window, react-window-infinite-loader, react-virtualized-auto-sizer: Removed (unused)
  • reactstrap: Updated from 9.0.1 to 9.2.3

react-tooltip v4 → v5 (performance fix)

  • Upgraded react-tooltip from 4.5.1 to 5.30.0 to fix severe UI lag when horizontally resizing the browser on pages with many
    feature rows
  • v4 created a separate DOM element per tooltip instance, each registering global resize and scroll event listeners — hundreds of
    listeners firing synchronously per resize frame
  • v5 uses floating-ui: tooltips are only materialised on hover, eliminating idle listeners
  • Migrated Tooltip.tsx to v5 API (data-tooltip-id/data-tooltip-html replacing data-for/data-tip)
  • Removed the TooltipPortal helper (v5 handles portalling internally)
  • Replaced Utils.GUID() with React useId() for stable tooltip IDs
  • Updated _tooltips.scss selectors from .__react_component_tooltip to .react-tooltip
  • Updated tooltip usage in Modal.tsx, ModalConfirm.tsx, and SegmentOverrides.js

Other fixes

  • Fixed AccordionCard chevron showing oversized focus ring (replaced with )

How did you test this code?

Please describe.

@Zaimwa9 Zaimwa9 requested a review from a team as a code owner February 24, 2026 10:28
@Zaimwa9 Zaimwa9 requested review from talissoncosta and removed request for a team February 24, 2026 10:28
@vercel
Copy link

vercel bot commented Feb 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flagsmith-frontend-preview Ready Ready Preview, Comment Feb 24, 2026 1:01pm
flagsmith-frontend-staging Ready Ready Preview, Comment Feb 24, 2026 1:01pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview Feb 24, 2026 1:01pm

Request Review

@github-actions github-actions bot added the front-end Issue related to the React Front End Dashboard label Feb 24, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Feb 24, 2026

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-6764 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-6764 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-e2e:pr-6764 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith:pr-6764 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-6764 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-6764 Finished ✅ Results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant