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

Deferred transitions #1453

Merged
merged 3 commits into from
May 13, 2018
Merged

Deferred transitions #1453

merged 3 commits into from
May 13, 2018

Conversation

Rich-Harris
Copy link
Member

This implements another part of #1431. Transitions can now return a function, which says 'come back to me in a moment'. This allows coordination between transitions, without worrying about order, which in turn facilitates this sort of thing:

redrover2

In this GIF, a pair of transitions (which happen to be called send and receive) essentially 'talk' to each other by sharing measurements — if a node with key 'c' outros and another with the same key intros, they can each generate a CSS animation that makes it look as though a single node is morphing, all while using custom transform behaviour for spinning and scaling.

There's an awkward gap left by the outroing node, if it's not the one at the bottom — that will be fixed with the final part of #1431.

@codecov-io
Copy link

codecov-io commented May 12, 2018

Codecov Report

Merging #1453 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #1453      +/-   ##
=========================================
+ Coverage   91.06%   91.1%   +0.04%     
=========================================
  Files         122     122              
  Lines        4523    4521       -2     
  Branches     1424    1422       -2     
=========================================
  Hits         4119    4119              
  Misses        159     159              
+ Partials      245     243       -2
Impacted Files Coverage Δ
src/compile/dom/index.ts 96.06% <ø> (+0.71%) ⬆️
src/compile/nodes/Element.ts 93.33% <100%> (ø) ⬆️
src/compile/nodes/Component.ts 94.58% <100%> (+0.41%) ⬆️

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 8d9a3ef...f02177d. Read the comment docs.

@Rich-Harris Rich-Harris merged commit 6d00f2b into master May 13, 2018
@Rich-Harris Rich-Harris deleted the deferred-transitions branch May 13, 2018 02:17
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.

None yet

2 participants