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

Add Navigator#locationWithActionIsPageRefresh for native adapter use #1201

Conversation

pfeiffer
Copy link
Contributor

@pfeiffer pfeiffer commented Feb 23, 2024

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 to Navigator, 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.

@pfeiffer
Copy link
Contributor Author

I've opened a corresponding PR in Turbo iOS using this new method: hotwired/turbo-ios#179

CC @jayohms @afcapel

@pfeiffer
Copy link
Contributor Author

Closing as discussed in hotwired/turbo-ios#178 (comment)

@brunoprietog
Copy link
Collaborator

Oops, not closed yet

@pfeiffer pfeiffer closed this Feb 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants