-
Notifications
You must be signed in to change notification settings - Fork 476
Provide request interceptor to automatically navigate into PWAs #7367
Conversation
Codecov Report
@@ Coverage Diff @@
## master #7367 +/- ##
============================================
- Coverage 77.76% 77.03% -0.73%
+ Complexity 5045 4815 -230
============================================
Files 647 660 +13
Lines 24170 23683 -487
Branches 3538 3426 -112
============================================
- Hits 18795 18244 -551
- Misses 3903 4036 +133
+ Partials 1472 1403 -69 Continue to review full report at Codecov.
|
NotWoods
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks so much for working on another big PWA feature! This is also laying groundwork for other PWA & custom tabs improvements, which is great.
I like the overall direction but I left some comments about the interceptor and some general nits.
...nts/feature/pwa/src/main/java/mozilla/components/feature/pwa/intent/WebAppIntentProcessor.kt
Outdated
Show resolved
Hide resolved
...nents/feature/intent/src/main/java/mozilla/components/feature/intent/ext/IntentExtensions.kt
Outdated
Show resolved
Hide resolved
...nents/feature/intent/src/main/java/mozilla/components/feature/intent/ext/IntentExtensions.kt
Outdated
Show resolved
Hide resolved
...nents/feature/intent/src/main/java/mozilla/components/feature/intent/ext/IntentExtensions.kt
Outdated
Show resolved
Hide resolved
components/feature/pwa/src/main/java/mozilla/components/feature/pwa/WebAppInterceptor.kt
Outdated
Show resolved
Hide resolved
components/feature/pwa/src/main/java/mozilla/components/feature/pwa/WebAppInterceptor.kt
Outdated
Show resolved
Hide resolved
components/feature/pwa/src/main/java/mozilla/components/feature/pwa/WebAppInterceptor.kt
Outdated
Show resolved
Hide resolved
components/feature/pwa/src/main/java/mozilla/components/feature/pwa/WebAppInterceptor.kt
Outdated
Show resolved
Hide resolved
d7cfed7 to
adb65db
Compare
samples/browser/src/main/java/org/mozilla/samples/browser/BaseBrowserFragment.kt
Outdated
Show resolved
Hide resolved
samples/browser/src/main/java/org/mozilla/samples/browser/request/SampleRequestInterceptor.kt
Show resolved
Hide resolved
|
Because there's still some UI needed to make this a good user experience, here's what I propose moving forward: Let's merge in this PR for Android Components, but close the Fenix work for now. We can have this working in sample browser (and maybe Reference Browser) to test with. We'll need to try and figure out a good UI for this feature. One option is to make it a user toggle, another is to display a list of choices when the link is opened. We'll also need to make this work alongside app links. (ie, what happens if both "Open in app" and "Open in PWA" are turned on?) Unfortunately my communication was poor in the original issue and we'll still need the UI. I think it would be jarring to always move the user to the PWA, especially since we can't accurately determine when they are removed. |
@NotWoods Right now app links take precedence over web apps. |
|
@TitanNano, make sure tests are fixed since you changed the |
|
@MarcLeclair Can you give this a look over from a perf perspective while I'm OOO? I don't think we need formal measurement but ensure nothing looks suspicious. See #7367 (comment) for a previous concern. |
|
@mcomella (I'm late to answer, forgot to do so) but nothing jumps out of the ordinary in terms of performance. Unless we need those things right away to populate our UI on MAIN start up (or even VIEW), then it could delay but it doesn't seem like this is the case so I think we're good. |
cf73c3d to
a8c542b
Compare
…la-mobile#7366 - a WebAppInterceptor is needed to redirect to a separate WebApp activity - the manifest dao currently reports a web app as installed when it was last used before the deadline / expiration time. This is the oposite of what it's supposed to do. - The intent extension should also hold an override URL so a WebApp intent can be launched with a deeplink. - The WebAppIntentProcessor currently launches new sessions for each intent. This will break user expectations when they start to be switched to a already running WebApp activity but loose their session. - we need a cache for currently installed web app scopes, so we don't have to do blocking IO during page load.
|
@rocketsroger I added new tests and everything else also passes now. |
@TitanNano I have couple of concerns:
|
|
|
Removing self as reviewer as I defer to MarcLeclair from #7367 (comment) |
Ah I see. I'm good with the change then. Since this is only available in the sample browser. |
|
@rocketsroger @NotWoods who will give the final approval? 😄 |
|
@NotWoods I'm good with the change from my end. But I'll defer to your approval since you have a outstanding change request on the review. ✅ |
NotWoods
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Let's start testing with Sample Browser & Reference Browser
|
bors r+ |
|
Build succeeded: |
For #7366 and mozilla-mobile/fenix#5772
activity
last used before the deadline / expiration time. This is the oposite
of what it's supposed to do.
intent can be launched with a deeplink.
intent. This will break user expectations when they start to be
switched to a already running WebApp activity but loose their session.
Pull Request checklist
After merge