Skip to content

feat: animation state machine for predictable animation lifecycle#496

Merged
RUKAYAT-CODER merged 4 commits into
rinafcode:mainfrom
Tboy123-emm:feat/animation-state-machine
May 30, 2026
Merged

feat: animation state machine for predictable animation lifecycle#496
RUKAYAT-CODER merged 4 commits into
rinafcode:mainfrom
Tboy123-emm:feat/animation-state-machine

Conversation

@Tboy123-emm
Copy link
Copy Markdown
Contributor

@Tboy123-emm Tboy123-emm commented May 29, 2026

closes #357

- Add useAnimationStateMachine hook (CLOSED/OPENING/OPEN/CLOSING)
- Pure reducer — illegal transitions are no-ops, preventing race conditions
- Refactor FilterSheet to use the state machine:
  - open() only fires from CLOSED or CLOSING states
  - close() only fires from OPEN or OPENING states
  - isVisible drives Modal mount (stays mounted during CLOSING animation)
  - ANIMATION_DONE advances state after each animation completes
- 9 unit tests covering all transitions and race condition scenario
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@Tboy123-emm Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER
Copy link
Copy Markdown
Contributor

Kindly resolve conflict and fix workflow.
You can simply delete the package-lock.json and do npm i again
pull before pushing

Resolved conflict in package-lock.json by regenerating via npm install.
…kflow

The 'build' script does not exist in package.json. expo export produces
the 'dist' folder that checkBundleSize.js expects.
@Tboy123-emm
Copy link
Copy Markdown
Contributor Author

fixed workflow no conflicts

@RUKAYAT-CODER RUKAYAT-CODER merged commit edfcf97 into rinafcode:main May 30, 2026
1 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement efficient animation state machine with xstate or similar

2 participants