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 flickering during view transitions #8772

Merged
merged 3 commits into from
Oct 9, 2023
Merged

Fix flickering during view transitions #8772

merged 3 commits into from
Oct 9, 2023

Conversation

martrapp
Copy link
Member

@martrapp martrapp commented Oct 7, 2023

Changes

Reading window.scrollY after replacing the body's DOM triggered additional CSS transitions on elements during swap()
Swap() should be atomic with respect to page renders. This is important so users can restore attributes and classes in astro:after-swap. Intermediate state should not be observable.

Closes #8711

Testing

Added e2e test

Docs

n/a bug fix

@changeset-bot
Copy link

changeset-bot bot commented Oct 7, 2023

🦋 Changeset detected

Latest commit: 9f1fb0b

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 Oct 7, 2023
@martrapp martrapp changed the title Fix for #8711 Fix flickering during view transitions Oct 7, 2023
@martrapp martrapp merged commit c24f70d into main Oct 9, 2023
13 checks passed
@martrapp martrapp deleted the mt/no_flicker branch October 9, 2023 14:15
@astrobot-houston astrobot-houston mentioned this pull request Oct 9, 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)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flicker issue with ViewTransition, darkMode, and CSS Transition effects
2 participants