Skip to content

feat(tiny-transition): add LaggedBoolean#92

Closed
hi-ogawa wants to merge 19 commits intomainfrom
feat-tiny-transition-lagged
Closed

feat(tiny-transition): add LaggedBoolean#92
hi-ogawa wants to merge 19 commits intomainfrom
feat-tiny-transition-lagged

Conversation

@hi-ogawa
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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