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/home nav bug (2nd try) #331

Merged
merged 4 commits into from
Jul 26, 2023
Merged

Fix/home nav bug (2nd try) #331

merged 4 commits into from
Jul 26, 2023

Conversation

th0rgall
Copy link
Contributor

No description provided.

…h default local transitions

Caused by global transitions blocking the onDestroy of the old page, which left its nodes in the DOM for 300 ms (probably) after the onMount of the new page triggered. The new page is thus added below the old one (commonly reported issue). This resulted in the onMount ephemerally getting a far too high offsetTop value for the pricing section (because the old page content was still on top), which in turn made the scroll animation scroll to the end of the page instead.

Svelte 4 defaults to local transitions. It's still possible that some local "out" transition blocks the destroy of an old page, but for now, it seems to be fixed, because (now local) transitions on the home page are sufficiently nested.

All transitions were by default"global" before, I couldn't easily check the behavior of all global -> local migration cases. It's possible this fix causes a problem elsewhere. However, keeping the "local" default seems preferrable, since "global" lead to this bug.
…ade some deps

According to the docs, it seems to be required now for SPA usage (default is undefined). adapter-static was also out-of-sync with the newest sveltekit. Vite upgrade is unrelated.
@th0rgall th0rgall temporarily deployed to staging July 26, 2023 10:52 — with GitHub Actions Inactive
@github-actions
Copy link

Visit the preview URL for this PR (updated for commit a42534e):

https://wtmg-dev--pr331-fix-home-nav-bug-qxoksvp3.web.app

(expires Wed, 02 Aug 2023 10:56:48 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 7773005e481e8bc60fd60a58f2d818cc7378f95b

@th0rgall th0rgall merged commit 5f16bfc into master Jul 26, 2023
2 checks passed
@th0rgall th0rgall deleted the fix/home-nav-bug branch September 7, 2023 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant