-
Notifications
You must be signed in to change notification settings - Fork 87
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
Do not show spinners or screenshots during refresh visits #177
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -103,6 +103,9 @@ | |
if (Turbo.navigator.locationWithActionIsSamePage(location, options.action)) { | ||
Turbo.navigator.view.scrollToAnchorFromLocation(location) | ||
return | ||
} else if (this.currentVisit?.location?.href === location.href) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In the corresponding Android PR, I found that the approach doesn't work immediately after a page cold boot, because
Comment on lines
103
to
+106
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd prefer that we changed the conditional logic to look like the modified Android adapter logic with comments and logging: https://github.com/hotwired/turbo-android/pull/292/files#diff-aafcc0efe91961803491a50ad6158bc1b6416c69417325a6fa5d1bc50a2be45cL101-L108 It's more clear and removes a conditional that was necessary during a transitional Turbo 7 rollout period. |
||
this.visitLocationWithOptionsAndRestorationIdentifier(location, options, Turbo.navigator.restorationIdentifier) | ||
return | ||
} | ||
} | ||
|
||
|
@@ -116,7 +119,7 @@ | |
|
||
visitStarted(visit) { | ||
this.currentVisit = visit | ||
this.postMessage("visitStarted", { identifier: visit.identifier, hasCachedSnapshot: visit.hasCachedSnapshot() }) | ||
this.postMessage("visitStarted", { identifier: visit.identifier, hasCachedSnapshot: visit.hasCachedSnapshot(), isPageRefresh: visit.isPageRefresh }) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't look compatible with Turbo 7 without page refresh support. The mobile adapters need to remain compatible with Turbolinks 5, Turbo 7, and Turbo 8. |
||
this.issueRequestForVisitWithIdentifier(visit.identifier) | ||
this.changeHistoryForVisitWithIdentifier(visit.identifier) | ||
this.loadCachedSnapshotForVisitWithIdentifier(visit.identifier) | ||
|
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.
Nice 👏