-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix to get Integration Data even when a page is transitioned by ViewT…
…ransition (#10079) * Fix to get Integration Data even when a page is transitioned by ViewTransition. * add test case * add changeset * fix test * Fix typo
- Loading branch information
Showing
6 changed files
with
75 additions
and
12 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 @@ | ||
--- | ||
"astro": patch | ||
--- | ||
|
||
Fix integrationData fetch to always be called even if View Transition is enabled. |
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
18 changes: 18 additions & 0 deletions
18
packages/astro/e2e/fixtures/dev-toolbar/src/layout/Layout.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,18 @@ | ||
--- | ||
import { ViewTransitions } from 'astro:transitions'; | ||
--- | ||
<html lang="en"> | ||
<head> | ||
<title>View Transition Test</title> | ||
<ViewTransitions /> | ||
<script is:inline> | ||
// let playwright know when navigate() is done | ||
document.addEventListener('astro:before-swap', (e) => { | ||
e.viewTransition.ready.then(()=>console.log("ready")) | ||
}); | ||
</script> | ||
</head> | ||
<body> | ||
<slot /> | ||
</body> | ||
</html> |
7 changes: 7 additions & 0 deletions
7
packages/astro/e2e/fixtures/dev-toolbar/src/pages/view-transition-a.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,7 @@ | ||
--- | ||
import Layout from '../layout/Layout.astro' | ||
--- | ||
<Layout> | ||
<div>Test</div> | ||
<a href="/view-transition-b" id="go-to-b">Go to B</a> | ||
</Layout> |
7 changes: 7 additions & 0 deletions
7
packages/astro/e2e/fixtures/dev-toolbar/src/pages/view-transition-b.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,7 @@ | ||
--- | ||
import Layout from '../layout/Layout.astro' | ||
--- | ||
<Layout> | ||
<div>Test</div> | ||
<a href="/view-transition-a" id="go-to-a">Go to A</a> | ||
</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