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

allow transition functions to return nothing #2246

Merged
merged 5 commits into from
Aug 5, 2019
Merged

Conversation

Rich-Harris
Copy link
Member

Allows a transition function to return nothing, indicating no transition should take place.

There's a better way to do this, which is not running the transition at all (rather than running and immediately canceling), but it involves some fiddling to ensure outros still happen at the correct time, so I'm just going to leave this as a note to self

@codecov-io
Copy link

codecov-io commented Mar 17, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@a067ebe). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2246   +/-   ##
=========================================
  Coverage          ?   91.83%           
=========================================
  Files             ?        1           
  Lines             ?       49           
  Branches          ?        0           
=========================================
  Hits              ?       45           
  Misses            ?        4           
  Partials          ?        0

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a067ebe...c069aba. Read the comment docs.

@Conduitry
Copy link
Member

Does it make sense to just merge this in its current form and open up a separate issue for optimizing this?

@Rich-Harris
Copy link
Member Author

yeah, fair enough. brought it up to date with master, but there's some TypeScript bullshit to deal with

@Conduitry
Copy link
Member

What do you think about a similar change for #3300 where we have a null_animation object with a constantly 0 easing function?

@Rich-Harris
Copy link
Member Author

That seems reasonable, yeah. I couldn't quite tell if { duration: 0 } would work or if it needs to override the easing function, but either way, something along those lines.

@Rich-Harris Rich-Harris merged commit d61387d into master Aug 5, 2019
@Rich-Harris Rich-Harris deleted the null-transition branch August 5, 2019 01:13
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.

3 participants