Add Navigator#locationWithActionIsPageRefresh
for native adapter use
#1201
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to hotwired/turbo-ios#178 in Turbo iOS.
In order to support refreshes in Turbo Native, the native adapters need to determine if a proposed visit is a refresh visit. This PR adds a new method
locationWithActionIsPageRefresh
toNavigator
, which the native adapters can call instead of implementing the logic on their own to determine if a proposed visit is a refresh or not.This way, the native adapters do not need to care about how to determine if a visit is refresh; this is kept inside Turbo and can be updated without having to publish new native modules.
This PR also adds tests for the methods on
Navigator
which the native adapters use today, so that we make sure that whatever refactoring of Turbo still keep the required interface intact for supporting the native adapters.See discussion in: hotwired/turbo-ios#178 (comment)
There will be a corresponding PR in Turbo iOS using this method.