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

Open links in-app by default on Android, once that has a good UX #279

Closed
gnprice opened this issue Aug 17, 2023 · 2 comments · Fixed by #295
Closed

Open links in-app by default on Android, once that has a good UX #279

gnprice opened this issue Aug 17, 2023 · 2 comments · Fixed by #295
Labels
a-Android Issues specific to Android, or requiring Android-specific work
Milestone

Comments

@gnprice
Copy link
Member

gnprice commented Aug 17, 2023

When opening an external link, we have a choice whether to do so within the app or in an external browser.

Currently we do so following the upstream Flutter defaults (documented at launchUrl), except that on Android we always use an external app rather than the in-app browser. That's because Flutter's implementation of the latter is currently not a good UX:

Once that's fixed, I think it'd be best to default on Android to opening in-app, just as the Flutter url_launcher plugin defaults to. That's what we chose on zulip-mobile, for reasons discussed in this chat thread, and I think all the same reasoning still applies.

Separately:

  • We should offer an option (again just as we do in zulip-mobile), so that this is only about the default. That's part of Store some client settings #97.
  • On iOS our choice in zulip-mobile was to default to an external app, unlike on Android. That reasoning is in the same thread and again I think it all still applies. That differs from the url_launcher default, so we should adjust that: Open links externally by default on iOS #280
@gnprice gnprice added the a-Android Issues specific to Android, or requiring Android-specific work label Aug 17, 2023
@gnprice
Copy link
Member Author

gnprice commented Aug 17, 2023

Milestoning as post-launch based on the scenario where it falls to us to fix the upstream issue. But if someone else picks up that upstream issue and fixes it sooner, then what's left of this issue will be an easy tweak and we should go ahead and do it.

@gnprice gnprice added this to the Post-launch milestone Aug 17, 2023
gnprice added a commit that referenced this issue Aug 17, 2023
The second TODO, about the behavior of externalApplication, turns out
to be just how things work these days on Android:
  #74 (comment)

The first one, about the behavior of inAppWebView or platformDefault,
I've filed as #279.  I also added a number of details on the upstream
issue, and cross-linked it with a couple of other issues that would
be fixed by the same solution.
@rajveermalviya
Copy link
Collaborator

rajveermalviya commented Aug 18, 2023

I opened flutter/packages#4739 which uses Android Custom Tabs when launchUrl is called with LaunchMode.externalApplication. So, after that is maybe merged we can change to use that for android platform.

rajveermalviya added a commit to rajveermalviya/zulip-flutter that referenced this issue Sep 1, 2023
url_launcher plugin now supports the desired behavior, which is using
Android Custom Tabs, so we don't need the workaround of opening the
links in external browser.

Upstream PR:
 flutter/packages#4739

Fixes zulip#279
rajveermalviya added a commit to rajveermalviya/zulip-flutter that referenced this issue Sep 1, 2023
`url_launcher` plugin now supports the desired behavior, which is using
Android Custom Tabs, so we don't need the workaround of opening the
links in external browser anymore, thus removed them.

Upstream PR:
 flutter/packages#4739

Fixes zulip#279
@gnprice gnprice closed this as completed in 806a81a Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-Android Issues specific to Android, or requiring Android-specific work
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants