-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support client reorder attribute
- Loading branch information
1 parent
159e273
commit 3514bad
Showing
10 changed files
with
173 additions
and
21 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
16 changes: 16 additions & 0 deletions
16
...-frame/__tests__/__snapshots__/ssr-client-reorder-loading/renders.expected/loading.0.html
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,16 @@ | ||
<div> | ||
Host app | ||
</div> | ||
<div | ||
data-src="embed" | ||
id="GENERATED-0" | ||
> | ||
<span | ||
id="GENERATED-1" | ||
> | ||
Loading... | ||
</span> | ||
</div> | ||
<div> | ||
Host footer | ||
</div> |
32 changes: 32 additions & 0 deletions
32
...-frame/__tests__/__snapshots__/ssr-client-reorder-loading/renders.expected/loading.1.html
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,32 @@ | ||
<div> | ||
Host app | ||
</div> | ||
<div | ||
data-src="embed" | ||
id="GENERATED-0" | ||
> | ||
<span | ||
id="GENERATED-1" | ||
> | ||
Loading... | ||
</span> | ||
</div> | ||
<div> | ||
Host footer | ||
</div> | ||
<div | ||
id="GENERATED-2" | ||
style="display:none" | ||
> | ||
<div> | ||
<h1> | ||
Hello | ||
</h1> | ||
<h2> | ||
World | ||
</h2> | ||
</div> | ||
</div> | ||
<script> | ||
function $af(d,a,e,l,g,h,k,b,f,c){c=$af;if(a&&!c[a])(c[a+="$"]||(c[a]=[])).push(d);else{e=document;l=e.getElementById("af"+d);g=e.getElementById("afph"+d);h=e.createDocumentFragment();k=l.childNodes;b=0;for(f=k.length;b<f;b++)h.appendChild(k.item(0));g&&g.parentNode.replaceChild(h,g);c[d]=1;if(a=c[d+"$"])for(b=0,f=a.length;b<f;b++)c(a[b])}};$af(0) | ||
</script> |
26 changes: 26 additions & 0 deletions
26
...-frame/__tests__/__snapshots__/ssr-client-reorder-loading/renders.expected/loading.2.html
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,26 @@ | ||
<div> | ||
Host app | ||
</div> | ||
<div | ||
data-src="embed" | ||
id="GENERATED-0" | ||
> | ||
<div> | ||
<h1> | ||
Hello | ||
</h1> | ||
<h2> | ||
World | ||
</h2> | ||
</div> | ||
</div> | ||
<div> | ||
Host footer | ||
</div> | ||
<div | ||
id="GENERATED-1" | ||
style="display:none" | ||
/> | ||
<script> | ||
function $af(d,a,e,l,g,h,k,b,f,c){c=$af;if(a&&!c[a])(c[a+="$"]||(c[a]=[])).push(d);else{e=document;l=e.getElementById("af"+d);g=e.getElementById("afph"+d);h=e.createDocumentFragment();k=l.childNodes;b=0;for(f=k.length;b<f;b++)h.appendChild(k.item(0));g&&g.parentNode.replaceChild(h,g);c[d]=1;if(a=c[d+"$"])for(b=0,f=a.length;b<f;b++)c(a[b])}};$af(0) | ||
</script> |
11 changes: 11 additions & 0 deletions
11
src/components/micro-frame/__tests__/fixtures/ssr-stream-client-reorder/embed.marko
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,11 @@ | ||
import { wait } from "../../../../../__tests__/queue"; | ||
<esbuild-assets/> | ||
|
||
<div> | ||
<h1>Hello</h1> | ||
<await(wait())> | ||
<@then> | ||
<h2>World</h2> | ||
</@then> | ||
</await> | ||
</div> |
18 changes: 18 additions & 0 deletions
18
src/components/micro-frame/__tests__/fixtures/ssr-stream-client-reorder/index.marko
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,18 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Simple Example</title> | ||
<esbuild-assets/> | ||
</head> | ||
<body> | ||
<div>Host app</div> | ||
<micro-frame client-reorder src="embed"> | ||
<@loading> | ||
Loading... | ||
</@loading> | ||
</micro-frame> | ||
<div>Host footer</div> | ||
</body> | ||
</html> |
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