Always go through the adapter to decide how to propose visits #1054
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.
This fixes a bug introduced in: #410
#410 made a change that made the decision to visit internal vs external urls outside of the
adapter
. This works fine in the browser context, but breaks the expectations for theturbo-ios
andturbo-android
native adapters.Native apps using the native turbo libraries already must provide logic for properly routing internal/external urls to the WebView or an external app/browser. This change brings back the capability for programmatic
Turbo.visit(url)
proposals to flow through the adapter, even for external urls. This gives the native adapters the opportunity to pass external url visit proposals to the native apps.Before this change
Turbo.visit("https://google.com")
would result in the native app's Turbo WebView navigating directly togoogle.com
, bypassing the Turbo visit flow, which should never happen.Additionally this adds a set of unit tests for the native adapter interface to prevent regressions in the future. Previously, there weren't any unit tests for the native adapter interface.