Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(vdom): bring back optimization for singular text nodes
- Loading branch information
Showing
56 changed files
with
978 additions
and
709 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
packages/ivi/src/vdom/__tests__/__snapshots__/render_text_content.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<div>""</div> 1`] = `<div />`; | ||
|
||
exports[`<div>""</div> 2`] = ` | ||
Object { | ||
"appendChild": 1, | ||
"createElement": 2, | ||
"createElementNS": 0, | ||
"createTextNode": 0, | ||
"insertBefore": 1, | ||
"removeChild": 0, | ||
"replaceChild": 0, | ||
} | ||
`; | ||
|
||
exports[`<div>"abc"</div> 1`] = ` | ||
<div> | ||
abc | ||
</div> | ||
`; | ||
|
||
exports[`<div>"abc"</div> 2`] = ` | ||
Object { | ||
"appendChild": 1, | ||
"createElement": 2, | ||
"createElementNS": 0, | ||
"createTextNode": 0, | ||
"insertBefore": 1, | ||
"removeChild": 0, | ||
"replaceChild": 0, | ||
} | ||
`; | ||
|
||
exports[`<div>10</div> 1`] = ` | ||
<div> | ||
10 | ||
</div> | ||
`; | ||
|
||
exports[`<div>10</div> 2`] = ` | ||
Object { | ||
"appendChild": 1, | ||
"createElement": 2, | ||
"createElementNS": 0, | ||
"createTextNode": 0, | ||
"insertBefore": 1, | ||
"removeChild": 0, | ||
"replaceChild": 0, | ||
} | ||
`; |
21 changes: 21 additions & 0 deletions
21
packages/ivi/src/vdom/__tests__/__snapshots__/sync_text_content.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`<div>""</div> => <div>"abc"</div> 1`] = ` | ||
<div> | ||
abc | ||
</div> | ||
`; | ||
|
||
exports[`<div>"abc"</div> => <div>""</div> 1`] = ` | ||
<div> | ||
</div> | ||
`; | ||
|
||
exports[`<div>"abc"</div> => <div>""</div> 2`] = `<div />`; | ||
|
||
exports[`<div></div> => <div>"abc"</div> 1`] = ` | ||
<div> | ||
abc | ||
</div> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.