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

[WIP] Unmount nodes in destroy methods #1421

Merged
merged 3 commits into from
May 5, 2018
Merged

[WIP] Unmount nodes in destroy methods #1421

merged 3 commits into from
May 5, 2018

Conversation

Rich-Harris
Copy link
Member

block.u() is always followed by block.d(). The reason for the separation is that we sometimes want to 'destroy' something without detaching it, if it's inside a parent element that has been destroyed.

It seems like it would make more sense to combine the two things. For one thing it results in less code. For another, I think there were cases previously where we were detaching unnecessarily; that shouldn't happen any more.

@codecov-io
Copy link

codecov-io commented May 5, 2018

Codecov Report

Merging #1421 into master will decrease coverage by 0.15%.
The diff coverage is 87.5%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1421      +/-   ##
==========================================
- Coverage   91.23%   91.07%   -0.16%     
==========================================
  Files         122      122              
  Lines        4493     4484       -9     
  Branches     1394     1400       +6     
==========================================
- Hits         4099     4084      -15     
- Misses        153      158       +5     
- Partials      241      242       +1
Impacted Files Coverage Δ
src/compile/dom/index.ts 96% <ø> (ø) ⬆️
src/compile/nodes/Slot.ts 89.39% <100%> (-0.32%) ⬇️
src/compile/nodes/Component.ts 94.46% <100%> (-0.03%) ⬇️
src/compile/nodes/AwaitBlock.ts 96.29% <100%> (ø) ⬆️
src/compile/nodes/RawMustacheTag.ts 97.5% <100%> (+0.13%) ⬆️
src/compile/nodes/Element.ts 93.06% <100%> (ø) ⬆️
src/compile/dom/Block.ts 93.06% <66.66%> (-0.33%) ⬇️
src/compile/nodes/EachBlock.ts 97.95% <66.66%> (-0.7%) ⬇️
src/compile/nodes/IfBlock.ts 96.55% <66.66%> (-0.71%) ⬇️
src/utils/CodeBuilder.ts 80% <0%> (-5.34%) ⬇️

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 21bc182...a18be79. Read the comment docs.

@Rich-Harris Rich-Harris merged commit dc8b0d6 into master May 5, 2018
@Rich-Harris Rich-Harris deleted the unmount-destroy branch May 5, 2018 23:01
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