-
Notifications
You must be signed in to change notification settings - Fork 1k
[lit-html] Remove some redundant code from removePart() #4975
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
Conversation
Also fixes a directive-helpers test that was incorrectly constructing its test case.
🦋 Changeset detectedLatest commit: bc5514d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
📊 Tachometer Benchmark ResultsSummarynop-update
render
update
update-reflect
Resultsthis-change
render
update
update-reflect
this-change, tip-of-tree, previous-release
render
update
nop-update
this-change, tip-of-tree, previous-release
render
update
this-change, tip-of-tree, previous-release
render
update
update-reflect
|
| const childPart2 = insertPart(part, undefined); | ||
| const childPart1 = insertPart(part, undefined, childPart2); | ||
| const childPart2 = insertPart(part); | ||
| const childPart1 = insertPart(part, childPart2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Previously the test mixed up the parameter for the refPart and the part to be inserted. Passing the third parameter meant that the second call wasn't making a new part.
|
The size of lit-html.js and lit-core.min.js are as expected. |
|
This passes all of Google's internal tests! |
|
Thanks for running the google3 tests, @rictic! |
|
@justinfagnani It looks like this change causes some unforseen behaviour. When using the CustomElement below to reshuffle a list of items with varying length via the Could you please verify? Thanks! |
|
@jimfranke since this PR is merged, can you open a new issue so we can be sure to track it? |
|
I do think I see the problem here. We need some more tests for repeat and directive helpers. |
Thanks, sure! #5010 |
Also fixes a directive-helpers test that was incorrectly constructing its test case.
I noticed that
removePart()was almost the same asChildPart.$_clear()with the exception of removing the start node. I also optimizedChildPart.$_clear()a little and noticed that theinsertPart()test was wrong.