-
Notifications
You must be signed in to change notification settings - Fork 950
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
Navigate to YT from Duck Player #4780
Navigate to YT from Duck Player #4780
Conversation
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. Join @CrisBarreiro and the rest of your teammates on |
b267e13
to
4a370c6
Compare
5172524
to
8789ab0
Compare
40fc837
to
d9fa7be
Compare
8789ab0
to
8c40743
Compare
d9fa7be
to
8242a9f
Compare
8c40743
to
1865035
Compare
8242a9f
to
fab0899
Compare
1865035
to
742ea02
Compare
fab0899
to
8d68e61
Compare
742ea02
to
ae1e3be
Compare
8d68e61
to
1f34224
Compare
ae1e3be
to
54cc443
Compare
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.
Overall LGTM. Not really sure what to test functionality wise since there are no testing steps and more tests could be added. Will wait to get the different scenarios to test before approving.
@@ -1092,7 +1092,7 @@ class BrowserTabViewModel @Inject constructor( | |||
when (stateChange) { | |||
is WebNavigationStateChange.NewPage -> { | |||
val uri = stateChange.url.toUri() | |||
if (duckPlayer.isYoutubeNoCookie(uri)) { | |||
if (duckPlayer.isSimulatedYoutubeNoCookie(uri)) { |
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.
All the changes to the view model should probably be tested.
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.
Updated in top of the stack
@@ -383,12 +383,15 @@ class BrowserWebViewClient @Inject constructor( | |||
pageLoadedHandler.onPageLoaded(it, navigationList.currentItem?.title, safeStart, currentTimeProvider.elapsedRealtime()) | |||
shouldSendPagePaintedPixel(webView = webView, url = it) | |||
appCoroutineScope.launch(dispatcherProvider.io()) { | |||
if (duckPlayer.isYoutubeNoCookie(url)) { | |||
if (duckPlayer.isSimulatedYoutubeNoCookie(url)) { |
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.
Tests?
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.
Updated in top of the stack
@@ -159,6 +122,10 @@ class WebViewRequestInterceptor( | |||
return WebResourceResponse(null, null, null) | |||
} | |||
|
|||
if (url != null) { |
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.
Tests?
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.
Added to top of the stack
@@ -34,6 +34,7 @@ dependencies { | |||
implementation Kotlin.stdlib.jdk7 | |||
implementation AndroidX.core.ktx | |||
implementation KotlinX.coroutines.core | |||
implementation 'androidx.legacy:legacy-support-v4:1.0.0' |
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.
Curious why is this needed.
|
||
@SingleInstanceIn(AppScope::class) | ||
@ContributesBinding(AppScope::class) | ||
class RealDuckPlayer @Inject constructor( |
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.
Tests?
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.
Tested in the top of the stack
Had a go at the test cases and found these behaviours not matching them. Back button with Always Ask
Back button with Always
Back button age restricted videos
|
@marcosholgado thanks for having a look! Back button with Always Ask -> I think the current behavior makes sense, as the page the user had seen before contains the overlay, and we probably shouldn't treat it in the same way as tapping the YouTube button For the other 2 cases, as you mentioned, since YouTube never actually loads, it doesn't make sense to navigate back to it. That was a mistake on my site when writing the test cases |
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.
LGTM
0a98f10
to
2d3b27f
Compare
1f34224
to
878ad02
Compare
2d3b27f
to
9539c9c
Compare
9539c9c
into
feature/cris/duckplayer/create-module
Task/Issue URL: https://app.asana.com/0/0/1207562793310532/f
Description
Steps to test this PR
Feature 1
UI changes