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

Allow clients to specify urls that should open externally #70

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

kiftio
Copy link
Contributor

@kiftio kiftio commented Feb 28, 2024

What are you trying to accomplish?

It's difficult to know which URLs should be opened in an external browser with the apis we have available. We get more information in swift, with WKNavigationType and it's linkActivated.

Checkout contains a large number of (frequently changing) URLs making a whitelist difficult to create.

Merchants may have store policies with links to various sites, checkout ui extensions with custom links and so on. The may also be rendered in cross-domain iframes.

This PR would allow merchants to specify any URLs (regex) where loading should be overridden, and we'd instead invoke onCheckoutLinkClicked(). Which is a little onerous for clients, but with the APIs and information we have available, it might be the best we can do.

Example clicking on policy link:

links.mp4

Before you deploy

@kiftio kiftio force-pushed the dk/allow-specifying-external-urls branch from 9841276 to ef8d041 Compare February 29, 2024 11:10
@kiftio kiftio force-pushed the dk/allow-specifying-external-urls branch from ef8d041 to cc3bd83 Compare February 29, 2024 15:15
Base automatically changed from dk/v2.0 to main March 18, 2024 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant