-
Notifications
You must be signed in to change notification settings - Fork 11
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
fire pixels when showing the error screen #3462
Conversation
@@ -1251,6 +1251,8 @@ extension Tab/*: NavigationResponder*/ { // to be moved to Tab+Navigation.swift | |||
|
|||
@MainActor | |||
func webContentProcessDidTerminate(with reason: WKProcessTerminationReason?) { | |||
guard (error?.code.rawValue ?? WKError.Code.unknown.rawValue) != WKError.Code.webContentProcessTerminated.rawValue else { return } |
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.
try to avoid duplicate executions of this in case the app is stuck in some kind of loop
@@ -153,6 +154,32 @@ final class TabCollectionViewModel: NSObject { | |||
burnerMode: burnerMode) | |||
} | |||
|
|||
var selectedTabCancellable: AnyCancellable? | |||
private func subscribeToSelectedTab() { |
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.
Out of curiosity, how come we send the pixel again when the user switch tabs? Won’t this generate noise in the pixels since it will send failures to load for the same webpage even tho it has not loaded multiple times?
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.
Future suggestion: Perhaps we can inject the fire function and unit test the behaviour
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, the requirement is to fire the pixel when the user sees the error screen and I checked this with Bobby as it would have been harder to have some state to only fire it the first time the error screen is seen and reset it, etc.
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! The PR work as expected. I left a comment about sending the pixels when switching tabs.
# By Dax the Duck (5) and others # Via GitHub (4) and Diego Rey Mendez (1) * main: (26 commits) PIR broker configs: Add sub actions to ExpectationAction (#3452) Fix Neighbor Report Broker JSON and include optOutUrl for all brokers (#3463) Freemium DBP: Feature Branch to Main PR (#3426) Remove noisy PIR pixels (#3459) Bump version to 1.112.0 (290) Set marketing version to 1.112.0 Update embedded files update fe onboarding (#3415) fire pixels when showing the error screen (#3462) Disable NTP animation when toggling Privacy Feed (#3460) Bump version to 1.111.0 (289) Check the config test pixel from the subscription monitor (#3455) Update OnboardingUserScript to use a weak script broker reference (#3456) fix flaky bookmark store tests (#3431) Workaround for stuck scans on Xcode 16 (#3453) Set autohidesScrollers in Bookmarks Manager; Fix scrollers positioning (#3451) fix Suggestions not reacting to clicks after being interacted with using keyboard (#3457) Fix testWhenChangingSortingInThePanelIsReflectedInTheManager UI Test (#3454) add contextual onboarding pixels (#3447) Bump version to 1.111.0 (288) ... # Conflicts: # DuckDuckGo/Preferences/View/PreferencesViewController.swift
Task/Issue URL: https://app.asana.com/0/392891325557410/1208511720659950/f
Tech Design URL:
CC:
Description:
Fires a pixel when the error screen is shown.
Steps to test this PR:
Definition of Done:
Internal references:
Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation