Skip to content

Comments

[pull] main from motiondivision:main#202

Merged
pull[bot] merged 26 commits intocode:mainfrom
motiondivision:main
Jan 22, 2026
Merged

[pull] main from motiondivision:main#202
pull[bot] merged 26 commits intocode:mainfrom
motiondivision:main

Conversation

@pull
Copy link

@pull pull bot commented Jan 22, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

claude and others added 26 commits January 20, 2026 12:36
When using layoutId with layoutDependency, shared layout animations were
incorrectly triggered when the component unmounted and remounted in a
different location (e.g., switching sections), even when layoutDependency
hadn't changed.

The issue was that layoutDependency was only checked during component
updates (in getSnapshotBeforeUpdate), but not during the shared layout
transition when a new component with the same layoutId mounts.

The fix:
1. Store layoutDependency on the projection node's options
2. In NodeStack.promote(), compare layoutDependency between the new node
   and previous lead - if both are defined and equal, skip the animation
   by not setting up resumeFrom or copying the snapshot

This allows components with layoutId to opt-out of shared layout
animations when their layoutDependency hasn't changed, even when
unmounting and remounting in different locations.
- Add test-react-19 job to CircleCI workflow
- Add experimentalShadowDomSupport to cypress.react-19.json for Shadow DOM tests
- Configure Vite to deduplicate React instances, fixing Radix UI dialog tests

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When dragging SVG elements inside an SVG with a viewBox that differs from
its rendered dimensions (e.g., viewBox="0 0 100 100" but rendered at 500x500px),
pointer coordinates need to be transformed to match the SVG's coordinate system.

This adds a new opt-in utility `transformViewBoxPoint` that can be passed to
MotionConfig to fix this issue:

```jsx
const svgRef = useRef<SVGSVGElement>(null)

<MotionConfig transformPagePoint={transformViewBoxPoint(svgRef)}>
  <svg ref={svgRef} viewBox="0 0 100 100" width={500} height={500}>
    <motion.rect drag />
  </svg>
</MotionConfig>
```

This fixes issue #1414.

Changes:
- Add transformViewBoxPoint utility function
- Export from framer-motion main index
- Add Cypress E2E test for SVG viewBox drag scaling
- Add React test component and example
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The CreateVisualElement parameter type was too narrow (defaulting to
CreateVisualElement<{}, "div">), causing type errors when passed to
the generic createMotionComponent function. Changed to use explicit
<any, any> type parameters to allow the proxy to work with any props
and tag names.
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.21 to 4.17.23.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](lodash/lodash@4.17.21...4.17.23)

---
updated-dependencies:
- dependency-name: lodash
  dependency-version: 4.17.23
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
In React 19, during list reorder reconciliation, components may briefly
unmount and remount while a drag is still active. Previously, unmount
would unconditionally end the pan session, killing the drag gesture.

Now we check isDragging before ending the pan session, allowing the
gesture to continue via its window-level event listeners.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Clear timeout in useEffect cleanup to prevent stale timeout from
  firing after StrictMode remount
- Increase animation duration from 0.2s to 1s for more CI timing margin

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add 100ms wait after getting draggable element before triggering
pointerdown in constraint tests. This gives React 19 StrictMode time
to complete the double-mount cycle.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
When page content changes dynamically (height increases/decreases),
scrollYProgress now automatically recalculates without requiring manual
scroll. This is achieved by adding frame-based scroll dimension checking
that detects when scrollHeight/scrollWidth changes and triggers
remeasurement.

Fixes #2718, #2274, #2333

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Widen accepted animation count ranges to accommodate React 19's
  different reconciliation behavior ([23]→[234], [45]→[4567])
- Increase wait times for CI timing reliability

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add React 19 tests to CI and fix failing tests
…lodash-4.17.23

Bump lodash from 4.17.21 to 4.17.23
…ts-error-Irw5S

Fix TypeScript error in create-proxy component
Respect `layoutDependency` with shared element animations.
…ayout-animations-7yR71

Fix drag within SVG viewBoxes that differ from rendered dimensions.
…yout

Fix scrollYProgress recalculation on dynamic content changes
…onConfig

This fixes two related issues:
- #2593: MotionConfig reducedMotion setting doesn't affect animate() function
- #2771: animate() automatically disables transform/layout animations based on
  device preference without developer control

Changes:
- Add reduceMotion option to AnimationOptions allowing explicit override
- useAnimate now automatically injects reduceMotion based on MotionConfig context
- Pass reduceMotion through animateTarget to override visualElement.shouldReduceMotion

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add reduceMotion option to animate() and make useAnimate respect MotionConfig
@pull pull bot locked and limited conversation to collaborators Jan 22, 2026
@pull pull bot added the ⤵️ pull label Jan 22, 2026
@pull pull bot merged commit ea4b2e0 into code:main Jan 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants