react-transition-group: add nodeRef to remaining CSSTransition consumers for React 19#112347
Merged
paulopmt1 merged 2 commits intoJul 7, 2026
Merged
Conversation
Jetpack Cloud Live (direct link)
Automattic for Agencies Live (direct link)
Dashboard Live (dotcom) (direct link)
|
cb91e30 to
dd00773
Compare
…ers for React 19 PR #112342 fixed the A4A licenses list but a repo-wide sweep shows three more `CSSTransition` consumers that still call the React-19-removed `ReactDOM.findDOMNode` (react-transition-group 4.4.5 falls back to `findDOMNode` unless a `nodeRef` is given): - Jetpack Cloud partner-portal license list — crashed at `/partner-portal/licenses`. - `client/me/account/main.jsx` — the username/account form toggle. - plans-grid-next plan-type-selector popup tooltips. Give each consumer a `nodeRef`. For the popover-based tooltip the ref must land on the `.popover` node (transition CSS is keyed to `.popover-*`), so `Popover`/`PopoverInner` now forward an optional `nodeRef` to that element while keeping their internal ref. Backward-compatible with React 18. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
dd00773 to
7e70d94
Compare
|
Looks like one of the E2E tests has failed. You can fix them following these steps:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Follow-up to #112342. A repo-wide sweep for
CSSTransition/TransitionGroupfound three more consumers that still crash under React 19 (react-transition-group 4.4.5 falls back to the removedReactDOM.findDOMNodeunless anodeRefis provided). Each now gets anodeRef:client/jetpack-cloud/.../license-list) — wrap children in<div ref={nodeRef}>(same fix as the A4A list in react-transition-group: upgrade to 4.4.5 and use nodeRef for React 19 #112342).client/me/account/main.jsx— extract a functionalUsernameFormToggleTransitionwrapper that owns its ownuseRef, so the changingusername/accountkey gets a distinct ref per instance.popup-messages.tsx) — the transition CSS is keyed to.popover-*classes on the popover element, so a wrapper div won't work;Popover/PopoverInnernow forward an optionalnodeRefto the.popovernode (merged with the internal positioning/focus ref).Why are these changes being made?
React 19 removed
ReactDOM.findDOMNode.react-transition-group'sTransition.updateStatuscalls it on every enter/exit, so the Jetpack Cloud partner portal threwUncaught TypeError: findDOMNode is not a functionat/partner-portal/licenses. #112342 only covered one of fourCSSTransitionconsumers; this closes the remaining three.Verified against React 19.2.7 in isolation (jsdom +
createRoot): each pattern crashes withoutnodeRefand renders cleanly with it. For the popover tooltip, the transition classes correctly land on.popover(popover popover-enter popover-enter-active), preserving the animation. Backward-compatible with React 18.Testing Instructions
/partner-portal/licenses— the list renders with nofindDOMNodeconsole error and rows animate in/out.Pre-merge Checklist
🤖 Generated with Claude Code