[pull] main from motiondivision:main#202
Merged
Conversation
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
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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 : )