Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tiny-transition): add LaggedBoolean #92

Closed
wants to merge 19 commits into from

Conversation

hi-ogawa
Copy link
Owner

@hi-ogawa hi-ogawa commented Oct 22, 2023

Inspired by the discussion on solid createPresense PR,

this adds a way simpler way of implementing transition.
The advantage is its simplicity where the library just provides "lagged" boolean state without managing DOM by itself.

idea

// animation in each direction requires two intemediate steps
//   false --(true)----> enterFrom --(next frame)--> enterTo  ---(timeout)-> true
//         <-(timeout)-- leaveTo   <-(next frame)-- leaveFrom <--(false)----

todo

  • explicitly transition enterFrom -> enterTo?
    • this turns out to be more tricky to counter against react scheduling anyways. so let's reject this idea... 812c4fa
  • can we rewrite Transition component based on this?

@hi-ogawa
Copy link
Owner Author

Overall, I'm not sure which is simpler when it comes to actually implementing general Transition component.
Probably this "lagged" value idea could be partially applied as a refactoring for the original TransitionManager, so maybe that's what I should go for...

@hi-ogawa
Copy link
Owner Author

@hi-ogawa hi-ogawa closed this Oct 23, 2023
@hi-ogawa hi-ogawa deleted the feat-tiny-transition-lagged branch October 23, 2023 04:07
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.

1 participant