Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase consistency between navigation with and without ViewTransitions #9279

Merged
merged 8 commits into from
Dec 4, 2023

Conversation

martrapp
Copy link
Member

@martrapp martrapp commented Dec 3, 2023

Changes

Greater consistency between navigations with and without <ViewTransitions>:

  • New for direct calls to navigate(): Navigation to a URL whose origin does not match the origin of the current page is excluded from view transition processing and triggers the standard navigation of the browser.
  • New: Navigation to the current page (= same path name and same search parameters) without a hash fragment triggers view transition processing.
  • New for form submission: Navigation to a non-empty hash target on the current page does not trigger view transitions, but updates the browser history directly and scrolls to the target position.

Testing

Had to fix one test because page.back() does not wait for asynchronous actions.

Docs

Details have never been documented before, so there is nothing to update.

Copy link

changeset-bot bot commented Dec 3, 2023

🦋 Changeset detected

Latest commit: 2de16c3

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added pkg: astro Related to the core `astro` package (scope) pr: docs A PR that includes documentation for review semver: minor Change triggers a `minor` release labels Dec 3, 2023
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is blocked because it contains a minor changeset. A reviewer will merge this at the next release if approved.

Copy link
Member

@natemoo-re natemoo-re left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, would love to update the changeset before merging, though!

.changeset/nervous-beans-peel.md Outdated Show resolved Hide resolved
Co-authored-by: Nate Moore <natemoo-re@users.noreply.github.com>
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is blocked because it contains a minor changeset. A reviewer will merge this at the next release if approved.

@matthewp matthewp merged commit 6a9669b into main Dec 4, 2023
13 checks passed
@matthewp matthewp deleted the mt/same_page branch December 4, 2023 17:33
This was referenced Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope) pr: docs A PR that includes documentation for review semver: minor Change triggers a `minor` release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants