-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Force re-execution of Partytown's head snippet on view transitions #9666
Conversation
…e a reload on the next page
🦋 Changeset detectedLatest commit: 90302ea 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 |
Looks good! |
Does this fix an open issue? |
@OliverSpeir had an inspiring (pun intended) example which got stuck in view transitions or didn't work at all once view transitions were enabled. This, and the discussions with him, helped a lot as minimal reproduction, but to my knowledge, we currently do not have an official issue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bit of a hack but that's okay because that's what partytown itself is.
Looks great to me!
I have not yet found another part for Code Golf in the codebase. |
…9666) * Remove the header script before a view transition takes place to force a reload on the next page * Add changeset * Save another char
* feat(i18n): disable redirect * feat(i18n): add option to disable redirect to default language * chore: add schema validation * docs * changeset * Update packages/astro/src/core/config/schema.ts Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com> * chore: address feedback * fix test * Update .changeset/cyan-grapes-suffer.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Update packages/astro/src/@types/astro.ts Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * Fix discord fetch code (#9663) * Force re-execution of Partytown's head snippet on view transitions (#9666) * Remove the header script before a view transition takes place to force a reload on the next page * Add changeset * Save another char * [ci] format * fix(assets): Implement all hooks in the passthrough image service (#9668) * fix(assets): Implement all hooks in the passthrough image service * chore: changeset * refactor(toolbar): Rename every internal reference of overlay/plugins to toolbar/apps (#9647) * refactor(toolbar): Rename every internal reference of overlay/plugins to toolbar/apps * refactor: rename vite plugin * fix: update import * nit: add setting fallback * Disable file watcher for internal one-off vite servers (#9665) * Use node:test and node:assert/strict (#9649) * [ci] format * fix(i18n): emit an error when the index isn't found (#9678) * fix(i18n): emit an error when the index isn't found * changeset * Update .changeset/proud-guests-bake.md Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> * rename * Update packages/astro/src/core/errors/errors-data.ts Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev> --------- Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev> * feat(i18n): add option to disable redirect to default language * chore: rebase * Update packages/astro/src/@types/astro.ts Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com> * lock file update --------- Co-authored-by: Bjorn Lu <bjornlu.dev@gmail.com> Co-authored-by: Sarah Rainsberger <sarah@rainsberger.ca> Co-authored-by: Martin Trapp <94928215+martrapp@users.noreply.github.com> Co-authored-by: Martin Trapp <martrapp@users.noreply.github.com> Co-authored-by: Erika <3019731+Princesseuh@users.noreply.github.com> Co-authored-by: Bjorn Lu <bluwy@users.noreply.github.com> Co-authored-by: Florian Lefebvre <contact@florian-lefebvre.dev>
Changes
Just before the view transition swap(), remove the Partytown
<head>
snippet.This forces a re-execution on the target page.
Testing
Manually tested
Docs
n.a. / bug fix