With viewTransitions: true enabled in your Astro config's experimental section, pages using the <ViewTransition /> routing component can now access a new transition:persist directive.
With this directive, you can keep the state of DOM elements and islands on the old page when transitioning to the new page.
For example, to keep a video playing across page navigation, add transition:persist to the element:
This <video> element, with its current state, will be moved over to the next page (if the video also exists on that page).
Likewise, this feature works with any client-side framework component island. In this example, a counter's state is preserved and moved to the new page:
With viewTransitions: true enabled in your Astro config's experimental section, pages using the <ViewTransition /> routing component can now access a new transition:persist directive.
With this directive, you can keep the state of DOM elements and islands on the old page when transitioning to the new page.
For example, to keep a video playing across page navigation, add transition:persist to the element:
This <video> element, with its current state, will be moved over to the next page (if the video also exists on that page).
Likewise, this feature works with any client-side framework component island. In this example, a counter's state is preserved and moved to the new page:
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps astro from 2.8.1 to 2.10.1.
Release notes
Sourced from astro's releases.
... (truncated)
Changelog
Sourced from astro's changelog.
... (truncated)
Commits
49b3cf4
[ci] release (#7937)3d91d4a
[ci] format4b6deda
Export createTransitionScope from the runtime (#7936)8544a63
[ci] format6035bb3
Fix duplicate slash handling (#7935)39b044e
[ci] release (#7912)1f0ee49
Fix failed server restart calling integration hooks twice (#7917)6806629
[ci] format41afb84
Persistent DOM in ViewTransitions (#7861)4e651af
[ci] formatDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)