-
Notifications
You must be signed in to change notification settings - Fork 14
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
Add AMP links protection #488
Conversation
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.
Please check the implementation guidelines for this feature. I do not see where we're attaching ampUrl
to breakage reports. As well we need to attach urlParametersRemoved
when this is set as well.
onLinkRewrite: { [weak self] url, navigationAction in | ||
let navigationActionPolicy = await linkProtection.requestTrackingLinkRewrite(initiatingURL: webView.url, | ||
navigationAction: navigationAction, | ||
onExtracting: { isAMPProtectionExtracting = true }, |
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.
Would be great if isAMPProtectionExtracting
is handled only in this callback. The reason is you are setting it to false every time webview finishes loading (often unnecessary). Then isAMPProtectionExtracting
publishes unnecessary events and triggers unnecessary recompilations of properties in ViewModel
than may trigger unnecessary redrawing of View
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.
Done ;)
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 👍
Please be sure to use the appropriate BSK version and check CI passes before merging.
# By Tomas Strba (5) and others # Via GitHub * develop: Refresh the Autofill panel after importing (#496) Require authentication for login export (#494) Observations database clearing improvements (#495) Fix handling external schemes in address bar (#493) New autoconsent rules and move tab cleanup out of onCommitted (#489) Safari CSV Passwords import +LastPass, 1Password (#483) Split preferences into multiple screens and add an option to show full URL (#487) Color of hover label fixed (#497) Add AMP links protection (#488) Enhancements of fire button options (#484) Rename Logins+ to Autofill (#492) new tab page low hanging fruit (#491) Fix threading issues in Autoconsent (#478) Navigation bar improvement: CMD + back or CMD + forward opens a new tab (#486) TextField refactored to TextView in order to make it scrollable (#481) More Xcode cleaning (#485) # Conflicts: # DuckDuckGo.xcodeproj/project.pbxproj # DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
Task/Issue URL: https://app.asana.com/0/72649045549333/1201716942816245/f
Tech Design URL: https://app.asana.com/0/481882893211075/1201948311080451/f
CC: @tomasstrba
Description:
AMP Protection introduced to macOS browser.
Steps to test this PR:
Testing checklist: