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

Bugfix: Fix Youtube Internal links when 'Watching on Youtube' from Duck Player #3733

Merged
merged 2 commits into from
Dec 17, 2024

Conversation

afterxleep
Copy link
Collaborator

Task/Issue URL: https://app.asana.com/0/1204099484721401/1208930843675395/f
Tech Design URL:
CC:

Description:
Fixes an issue causing Youtube internal links to open Duck Player

Steps to test this PR:

  • 1. Set Duck Player mode to 'Always'
  • 2. Go to Youtube.com and open a video in Duck Player
  • 3. Tap "Watch on Youtube"
  • 4. Tap the Youtube "search" icon or the page's three dot menu
  • 5. Confirm Youtube UI shows up and Duck Player does not open.

Demo:
RocketSim_Recording_iPhone_(18 0)_6 1_2024-12-17_10 02 35

@afterxleep afterxleep requested review from a team and federicocappelli and removed request for a team December 17, 2024 09:05
Copy link
Member

@federicocappelli federicocappelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, only a question about the test

@@ -582,4 +582,24 @@ class DuckPlayerNavigationHandlerTests: XCTestCase {
XCTAssertNil(tabNavigator.openedURL, "No new tabs should open")
}

@MainActor
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is @mainactor needed here? I think that Bartek is working thorwards parallelising the unit tests and this could interfeer, In any case I don't think we should run tests on main therad.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call. Although not required, it was to align with the convention that any code interacting with WebKit or UI components runs on the main thread.

Like If you replace MockWebView with a real WKWebView or integrate other WKNavigationDelegate-related logic in the future, @mainactor will help avoid threading issues. Not likely happen in a test though. I'll make a note to revise/update the class.

Copy link
Member

@federicocappelli federicocappelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, only a question about the test

@afterxleep afterxleep merged commit 4baa50b into main Dec 17, 2024
18 of 19 checks passed
@afterxleep afterxleep deleted the daniel/youtube.internal branch December 17, 2024 17:34
samsymons added a commit that referenced this pull request Dec 19, 2024
# By Michal Smaga (10) and others
# Via Michal Smaga (4) and others
* main: (66 commits)
  DuckPlayer: Don’t open new tabs or DuckPlayer at launch when in alwaysAsk mode (#3738)
  Fix BrowsingMenu layout (#3712)
  Remove ESLint config files (#3739)
  Release 7.150.0-1 (#3742)
  An additional protective in case users try to access the passwords list via the extension, before launching the app
  Ensure migration has occurred before accessing vault
  Populate credential store if user has enabled before launching app
  Update to target main app
  Ensure migration has occurred before accessing vault
  Release 7.149.1-0 (#3740)
  An additional protective in case users try to access the passwords list via the extension, before launching the app
  Ensure migration has occurred before accessing vault
  Populate credential store if user has enabled before launching app
  Update to target main app
  Ensure migration has occurred before accessing vault
  Bugfix: Fix Youtube Internal links when 'Watching on Youtube' from Duck Player (#3733)
  point to BSK branch (#3732)
  Remove duck.ai 10min timer (#3731)
  Release 7.150.0-0 (#3729)
  Update autoconsent to v12.3.0 (#3728)
  ...

# Conflicts:
#	Core/PixelEvent.swift
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
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.

2 participants