Closed
Bug 1389236
Opened 7 years ago
Closed 7 years ago
Open external links in PWAs in a Custom Tab
Categories
(Firefox for Android Graveyard :: Web Apps (PWAs), enhancement)
Firefox for Android Graveyard
Web Apps (PWAs)
Tracking
(firefox57 fixed, firefox58 verified)
VERIFIED
FIXED
Firefox 57
People
(Reporter: snorp, Assigned: esawin)
References
Details
Attachments
(4 files, 2 obsolete files)
1.27 KB,
patch
|
snorp
:
review+
|
Details | Diff | Splinter Review |
1.14 KB,
patch
|
snorp
:
review+
|
Details | Diff | Splinter Review |
4.54 KB,
patch
|
snorp
:
review+
|
Details | Diff | Splinter Review |
1.61 KB,
patch
|
snorp
:
review+
|
Details | Diff | Splinter Review |
Instead of doing a mini-browser as in bug 1388747, product has requested we simply kick out to a custom tab, since that's pretty much what you'd expect in a native app as well.
Reporter | ||
Comment 1•7 years ago
|
||
Eugen, this might be the next thing to tackle, as discussed. We'll need to not only handle target=_blank stuff, but also links that are in the same window.
Assignee: nobody → esawin
Assignee | ||
Comment 2•7 years ago
|
||
Wait for the callback result for each URI loading request. The result is boolean for now. The handler returns true if the request has been handled, false if Gecko should handle it instead. In the latter case, GeckoView decided on how to handle it. I've also simplified the "where" argument, possible target windows are now DEFAULT, CURRENT and NEW, removing NEWTAB and SWITCHTAB which are specific to Fennec.
Attachment #8897007 -
Flags: review?(snorp)
Assignee | ||
Comment 3•7 years ago
|
||
Custom tabs always return true since we always handle the event.
Attachment #8897008 -
Flags: review?(snorp)
Assignee | ||
Comment 4•7 years ago
|
||
PWAs launch a custom tabs intent for URIs not in their scope. This will fire the generic custom tabs intent.
Attachment #8897009 -
Flags: review?(snorp)
Assignee | ||
Comment 5•7 years ago
|
||
Attachment #8897010 -
Flags: review?(snorp)
Assignee | ||
Comment 6•7 years ago
|
||
Fixed syntax error.
Attachment #8897007 -
Attachment is obsolete: true
Attachment #8897007 -
Flags: review?(snorp)
Attachment #8897123 -
Flags: review?(snorp)
Reporter | ||
Updated•7 years ago
|
Attachment #8897008 -
Flags: review?(snorp) → review+
Reporter | ||
Updated•7 years ago
|
Attachment #8897123 -
Flags: review?(snorp) → review+
Reporter | ||
Comment 7•7 years ago
|
||
Comment on attachment 8897009 [details] [diff] [review] 0003-Bug-1389236-3.0-Launch-a-custom-tabs-intent-for-out-.patch Review of attachment 8897009 [details] [diff] [review]: ----------------------------------------------------------------- ::: mobile/android/base/java/org/mozilla/gecko/webapps/WebAppActivity.java @@ +270,4 @@ > if (isInScope(uri)) { > view.loadUri(uri); > } else { > + CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder(); I think we should use the theme_color from the manifest as the toolbar color. @@ +271,5 @@ > view.loadUri(uri); > } else { > + CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder(); > + CustomTabsIntent intent = builder.build(); > + intent.launchUrl(this, Uri.parse(uri)); I think we may need to do our own thing here to ensure that we launch into our own Custom Tab implementation and not whatever it chooses. Maybe it's enough to set the class on the CustomTabsIntent.intent instance?
Attachment #8897009 -
Flags: review?(snorp) → review-
Reporter | ||
Updated•7 years ago
|
Attachment #8897010 -
Flags: review?(snorp) → review+
Assignee | ||
Comment 8•7 years ago
|
||
Launch our custom tabs activity for out-of-scope URI load requests.
Attachment #8897009 -
Attachment is obsolete: true
Attachment #8898840 -
Flags: review?(snorp)
Reporter | ||
Comment 9•7 years ago
|
||
Comment on attachment 8898840 [details] [diff] [review] 0003-Bug-1389236-3.1-Launch-a-custom-tabs-intent-for-out-.patch Review of attachment 8898840 [details] [diff] [review]: ----------------------------------------------------------------- We should set the theme color too, but maybe that can be done in a followup.
Attachment #8898840 -
Flags: review?(snorp) → review+
Comment 10•7 years ago
|
||
Pushed by esawin@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/1fe42a7f6174 [1.0] Allow sync handling of all URI loading requests in the app. r=snorp https://hg.mozilla.org/integration/mozilla-inbound/rev/8013338c457c [2.0] Mark URI-loading requests in the custom tabs handler as handled. r=snorp https://hg.mozilla.org/integration/mozilla-inbound/rev/dac0b47a5734 [3.1] Launch a custom tabs intent for out-of-scope URIs in the PWA's onLoadUri handler. r=snorp https://hg.mozilla.org/integration/mozilla-inbound/rev/8ee92d119955 [4.0] Mark URI-loading requests in the GeckoView example app handler as handled. r=snorp
Comment 11•7 years ago
|
||
Pushed by esawin@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/db59558afbdf [5.0] Fix rebase. r=me
Comment 12•7 years ago
|
||
> We'll need to not only handle target=_blank stuff, but also links that are in the same window. Yep, essentially, we want links that are outside of the PWA scope to open in a custom tab. > I think we should use the theme_color from the manifest as the toolbar color. That seems indeed like a good idea. To be clear: we want to use the theme_color asset defined in the manifest of the installed PWA, and not the theme color defined in the <meta> section or manifest of the site loaded in the custom tab.
Comment 13•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/1fe42a7f6174 https://hg.mozilla.org/mozilla-central/rev/8013338c457c https://hg.mozilla.org/mozilla-central/rev/dac0b47a5734 https://hg.mozilla.org/mozilla-central/rev/8ee92d119955 https://hg.mozilla.org/mozilla-central/rev/db59558afbdf
Status: NEW → RESOLVED
Closed: 7 years ago
status-firefox57:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 57
Comment 14•7 years ago
|
||
Verified as fixed on Nightly 58 (2017-09-22). Devices: Prestigio Grace X5 (Android 4.4.2) LG G4 (Android 5.1) Huawei Honor 8 (Android 6.0) Asus ZenPad 8.0 Z380KL (Android 6.0.1)
Status: RESOLVED → VERIFIED
status-firefox58:
--- → verified
Updated•3 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•