-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Svelte view transition state persistence (#12006)
Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com>
- Loading branch information
1 parent
daca995
commit a582cb6
Showing
7 changed files
with
85 additions
and
22 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@astrojs/svelte': patch | ||
--- | ||
|
||
Fix Svelte component view transition state persistence |
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
11 changes: 11 additions & 0 deletions
11
packages/astro/e2e/fixtures/view-transitions/src/pages/island-svelte-one.astro
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 Counter from '../components/SvelteCounter.svelte'; | ||
import Layout from '../components/Layout.astro'; | ||
export const prerender = false; | ||
--- | ||
<Layout> | ||
<p id="island-one">Page 1</p> | ||
<a id="click-two" href="/island-svelte-two">go to 2</a> | ||
<Counter prefix="A" client:load transition:persist transition:name="counter"/> | ||
</Layout> |
11 changes: 11 additions & 0 deletions
11
packages/astro/e2e/fixtures/view-transitions/src/pages/island-svelte-two.astro
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 Counter from '../components/SvelteCounter.svelte'; | ||
import Layout from '../components/Layout.astro'; | ||
export const prerender = false; | ||
--- | ||
<Layout> | ||
<p id="island-two">Page 2</p> | ||
<a id="click-one" href="/island-svelte-one">go to 1</a> | ||
<Counter prefix="B" client:load transition:persist transition:name="counter"/> | ||
</Layout> |
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