Skip to content

Nested transitions#1451

Merged
Rich-Harris merged 5 commits intomasterfrom
nested-transitions
May 13, 2018
Merged

Nested transitions#1451
Rich-Harris merged 5 commits intomasterfrom
nested-transitions

Conversation

@Rich-Harris
Copy link
Copy Markdown
Member

@Rich-Harris Rich-Harris commented May 12, 2018

This is the next key part of the transition system overhaul after #1448. It adds a nestedTransitions compiler option, which, like skipIntroByDefault, is intended as a stopgap measure so that we can release this without having to bump the major version immediately.

TODO:

  • replace 'countdown' method of scheduling outrocallback with something that requires less repetitive code (e.g. outrocallback = callAfter(outrocallback, 5) if there are 5 outroing elements in a block)
  • handle EachBlock, AwaitBlock and Component, as well as IfBlock, plus IfBlock with else
  • (probably separate to this PR) introduce some mechanism for preventing child transitions — I suggested this previously:
<!-- it would be weird if each <li> slid out while the <ul> itself was fading -->
{#if showList}
  <ul transition:fade childtransition:false>
    {#each list as item (item.id)}
      <li transition:slide>{item.name}</li>
    {/each}
  </ul>
{/each}

@codecov-io
Copy link
Copy Markdown

codecov-io commented May 12, 2018

Codecov Report

Merging #1451 into master will increase coverage by 0.07%.
The diff coverage is 88.37%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1451      +/-   ##
==========================================
+ Coverage   90.98%   91.06%   +0.07%     
==========================================
  Files         122      122              
  Lines        4495     4523      +28     
  Branches     1410     1424      +14     
==========================================
+ Hits         4090     4119      +29     
- Misses        158      159       +1     
+ Partials      247      245       -2
Impacted Files Coverage Δ
src/shared/utils.js 100% <ø> (ø) ⬆️
src/compile/nodes/EachBlock.ts 98.08% <100%> (+0.12%) ⬆️
src/compile/nodes/Element.ts 93.33% <100%> (+0.19%) ⬆️
src/compile/dom/index.ts 95.34% <100%> (+0.07%) ⬆️
src/compile/nodes/AwaitBlock.ts 96.47% <100%> (+0.12%) ⬆️
src/compile/nodes/IfBlock.ts 94.77% <57.14%> (-1.81%) ⬇️
src/compile/nodes/Component.ts 94.16% <85.71%> (+1.33%) ⬆️
src/compile/dom/Block.ts 93.45% <88.88%> (+0.38%) ⬆️

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 338c856...d6bcdb1. Read the comment docs.

@Rich-Harris Rich-Harris changed the title [WIP] Nested transitions Nested transitions May 12, 2018
@Rich-Harris Rich-Harris mentioned this pull request May 12, 2018
@Rich-Harris Rich-Harris merged commit c37e6a7 into master May 13, 2018
@Rich-Harris Rich-Harris deleted the nested-transitions branch May 13, 2018 02:04
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.

2 participants