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

fix(astro): newer navigation aborts existing one #10900

Merged
merged 8 commits into from Apr 30, 2024
Merged

fix(astro): newer navigation aborts existing one #10900

merged 8 commits into from Apr 30, 2024

Conversation

martrapp
Copy link
Member

Changes

Closes #10807

Detects when navigate() is called while another instance is still executing.
Uses an AbortController to abort running fetch operations and signal at various points in the implementation that the current navigation should be abandoned.
For simulation mode, adds the ability to prevent/cancel running animations of view transitions (for native view transitions this is automatic)
Made the handling of asynchronous parts in the existing implementation more robust for cases where something really goes wrong.

Testing

Two new e2e test that test for canceling of earlier requests and canceling of ongoing animations.

Docs

n.a. / Bug Fix

Copy link

changeset-bot bot commented Apr 28, 2024

🦋 Changeset detected

Latest commit: cc3b8c9

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 the pkg: astro Related to the core `astro` package (scope) label Apr 28, 2024
@martrapp martrapp requested a review from matthewp April 28, 2024 22:37
@martrapp martrapp changed the title Mt/abort fix(astro): newer navigation aborts existing one Apr 29, 2024
@martrapp martrapp merged commit 36bb3b6 into main Apr 30, 2024
13 checks passed
@martrapp martrapp deleted the mt/abort branch April 30, 2024 09:46
@astrobot-houston astrobot-houston mentioned this pull request Apr 30, 2024
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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ViewTransitions causes out of order navigation when interacting with slow-to-load non-prerendered routes
2 participants