Skip to content

[BUG] Promoting moves are not animated #220

@antonryoung02

Description

@antonryoung02

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

  1. set animationDurationInMs to a positive value
  2. render position right before a promotion
  3. 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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions