-
-
Notifications
You must be signed in to change notification settings - Fork 143
Description
Describe the bug
Promoting moves are not animated even when animationDurationInMs option is set. All moves are animated except for promotions, which appear instant.
utils.getPositionUpdates only considers animating pieces of the same type so it always misses promoting from P to Q, R, B, N.
To Reproduce
- set animationDurationInMs to a positive value
- render position right before a promotion
- render position right after a promotion
You can also see this behavior if you let the random engine promote a pawn in Storybook > Options API > animationDurationInMs
Expected behaviour
The position update should have the pawn animate to the promoting square where it turns into the promoted piece
Screen Recording or Screenshots
Current Behavior:
Screen.Recording.2025-10-31.at.2.19.38.PM.mov
Ideal Behavior:
Screen.Recording.2025-10-31.at.2.21.46.PM.mov
Environment (please complete the following information):
- Package version: v5.4.0
- React version v19.1.1
- Node version v24.9.0
Desktop (please complete the following information):
- OS: macOS
- Browser: Chrome
- Version: 141.0.7390.123
Smartphone (please complete the following information):
N/A
Additional context
Add any other context about the problem here.