Skip to content

Commit

Permalink
Sync promotions added to Bookmarks & Passwords screens (#3260)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/72649045549333/1208017419957473/f
Tech Design URL:
CC:

Description:
New promo banners added + Sync screen updates to include link to download app on other devices
  • Loading branch information
amddg44 authored Sep 1, 2024
1 parent 46bd8e2 commit 496f43b
Show file tree
Hide file tree
Showing 42 changed files with 1,322 additions and 101 deletions.
6 changes: 6 additions & 0 deletions Core/FeatureFlag.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ public enum FeatureFlag: String {
case newTabPageSections
case duckPlayer
case sslCertificatesBypass
case syncPromotionBookmarks
case syncPromotionPasswords
}

extension FeatureFlag: FeatureFlagSourceProviding {
Expand Down Expand Up @@ -74,6 +76,10 @@ extension FeatureFlag: FeatureFlagSourceProviding {
return .remoteReleasable(.feature(.duckPlayer))
case .sslCertificatesBypass:
return .remoteReleasable(.subfeature(sslCertificatesSubfeature.allowBypass))
case .syncPromotionBookmarks:
return .remoteReleasable(.subfeature(SyncPromotionSubfeature.bookmarks))
case .syncPromotionPasswords:
return .remoteReleasable(.subfeature(SyncPromotionSubfeature.passwords))
}
}
}
Expand Down
18 changes: 16 additions & 2 deletions Core/PixelEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ extension Pixel {
case autofillManagementSaveLogin
case autofillManagementUpdateLogin

case autofillMultipleAuthCallsTriggered
case autofillLoginsReportFailure
case autofillLoginsReportAvailable
case autofillLoginsReportConfirmationPromptDisplayed
Expand Down Expand Up @@ -611,6 +610,14 @@ extension Pixel {
case syncDeleteAccountError
case syncLoginExistingAccountError

case syncGetOtherDevices
case syncGetOtherDevicesCopy
case syncGetOtherDevicesShare

case syncPromoDisplayed
case syncPromoConfirmed
case syncPromoDismissed

case swipeTabsUsedDaily
case swipeToOpenNewTab

Expand Down Expand Up @@ -1085,7 +1092,6 @@ extension Pixel.Event {
case .autofillManagementUpdateLogin:
return "m_autofill_management_update_login"

case .autofillMultipleAuthCallsTriggered: return "m_autofill_multiple_auth_calls_triggered"
case .autofillLoginsReportFailure: return "autofill_logins_report_failure"
case .autofillLoginsReportAvailable: return "autofill_logins_report_available"
case .autofillLoginsReportConfirmationPromptDisplayed: return "autofill_logins_report_confirmation_prompt_displayed"
Expand Down Expand Up @@ -1380,6 +1386,14 @@ extension Pixel.Event {
case .syncDeleteAccountError: return "m_d_sync_delete_account_error"
case .syncLoginExistingAccountError: return "m_d_sync_login_existing_account_error"

case .syncGetOtherDevices: return "sync_get_other_devices"
case .syncGetOtherDevicesCopy: return "sync_get_other_devices_copy"
case .syncGetOtherDevicesShare: return "sync_get_other_devices_share"

case .syncPromoDisplayed: return "sync_promotion_displayed"
case .syncPromoConfirmed: return "sync_promotion_confirmed"
case .syncPromoDismissed: return "sync_promotion_dismissed"

case .swipeTabsUsedDaily: return "m_swipe-tabs-used-daily"
case .swipeToOpenNewTab: return "m_addressbar_swipe_new_tab"

Expand Down
3 changes: 3 additions & 0 deletions Core/UserDefaultsPropertyWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ public struct UserDefaultsWrapper<T> {
case autofillFillDate = "com.duckduckgo.app.autofill.FillDate"
case autofillOnboardedUser = "com.duckduckgo.app.autofill.OnboardedUser"

case syncPromoBookmarksDismissed = "com.duckduckgo.app.sync.PromoBookmarksDismissed"
case syncPromoPasswordsDismissed = "com.duckduckgo.app.sync.PromoPasswordsDismissed"

// .v2 suffix added to fix https://app.asana.com/0/547792610048271/1206524375402369/f
case featureFlaggingDidVerifyInternalUser = "com.duckduckgo.app.featureFlaggingDidVerifyInternalUser.v2"

Expand Down
30 changes: 29 additions & 1 deletion DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -853,14 +853,19 @@
C1B924B72ACD6E6800EE7B06 /* AutofillNeverSavedTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1B924B62ACD6E6800EE7B06 /* AutofillNeverSavedTableViewCell.swift */; };
C1BF0BA529B63D7200482B73 /* AutofillLoginPromptHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1BF0BA429B63D7200482B73 /* AutofillLoginPromptHelper.swift */; };
C1BF0BA929B63E2200482B73 /* AutofillLoginPromptViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1BF0BA729B63E1A00482B73 /* AutofillLoginPromptViewModelTests.swift */; };
C1BF26152C74D10F00F6405E /* SyncPromoManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1BF26142C74D10F00F6405E /* SyncPromoManager.swift */; };
C1CCCBA7283E101500CF3791 /* FaviconsHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1CCCBA6283E101500CF3791 /* FaviconsHelper.swift */; };
C1CDA3162AFB9C7F006D1476 /* AutofillNeverPromptWebsitesManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1CDA3152AFB9C7F006D1476 /* AutofillNeverPromptWebsitesManager.swift */; };
C1CDA31E2AFBF811006D1476 /* AutofillNeverPromptWebsitesManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1CDA31D2AFBF811006D1476 /* AutofillNeverPromptWebsitesManagerTests.swift */; };
C1D21E2D293A5965006E5A05 /* AutofillLoginSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1D21E2C293A5965006E5A05 /* AutofillLoginSession.swift */; };
C1D21E2F293A599C006E5A05 /* AutofillLoginSessionTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1D21E2E293A599C006E5A05 /* AutofillLoginSessionTests.swift */; };
C1EA86602C74CB6C00E8604D /* SyncPromoView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1EA865F2C74CB6C00E8604D /* SyncPromoView.swift */; };
C1EA86622C74CB8B00E8604D /* SyncPromoViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1EA86612C74CB8B00E8604D /* SyncPromoViewModel.swift */; };
C1F341C52A6924000032057B /* EmailAddressPromptView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1F341C42A6924000032057B /* EmailAddressPromptView.swift */; };
C1F341C72A6924100032057B /* EmailAddressPromptViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1F341C62A6924100032057B /* EmailAddressPromptViewModel.swift */; };
C1F341C92A6926920032057B /* EmailAddressPromptViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1F341C82A6926920032057B /* EmailAddressPromptViewController.swift */; };
C1FFBD462C761BE20073622B /* SyncPromoManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1FFBD452C761BE20073622B /* SyncPromoManagerTests.swift */; };
C1FFBD482C7749A90073622B /* SyncSettingsViewController+PlatformLinks.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1FFBD472C7749A90073622B /* SyncSettingsViewController+PlatformLinks.swift */; };
CB1143DE2AF6D4B600C1CCD3 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = CB1143DC2AF6D4B600C1CCD3 /* InfoPlist.strings */; };
CB258D1229A4F24900DEBA24 /* ConfigurationManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB258D0F29A4D0FD00DEBA24 /* ConfigurationManager.swift */; };
CB258D1329A4F24E00DEBA24 /* ConfigurationStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB84C7C029A3F0280088A5B8 /* ConfigurationStore.swift */; };
Expand Down Expand Up @@ -2612,14 +2617,19 @@
C1B924B62ACD6E6800EE7B06 /* AutofillNeverSavedTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutofillNeverSavedTableViewCell.swift; sourceTree = "<group>"; };
C1BF0BA429B63D7200482B73 /* AutofillLoginPromptHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AutofillLoginPromptHelper.swift; sourceTree = "<group>"; };
C1BF0BA729B63E1A00482B73 /* AutofillLoginPromptViewModelTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AutofillLoginPromptViewModelTests.swift; sourceTree = "<group>"; };
C1BF26142C74D10F00F6405E /* SyncPromoManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SyncPromoManager.swift; sourceTree = "<group>"; };
C1CCCBA6283E101500CF3791 /* FaviconsHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FaviconsHelper.swift; sourceTree = "<group>"; };
C1CDA3152AFB9C7F006D1476 /* AutofillNeverPromptWebsitesManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AutofillNeverPromptWebsitesManager.swift; sourceTree = "<group>"; };
C1CDA31D2AFBF811006D1476 /* AutofillNeverPromptWebsitesManagerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutofillNeverPromptWebsitesManagerTests.swift; sourceTree = "<group>"; };
C1D21E2C293A5965006E5A05 /* AutofillLoginSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutofillLoginSession.swift; sourceTree = "<group>"; };
C1D21E2E293A599C006E5A05 /* AutofillLoginSessionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutofillLoginSessionTests.swift; sourceTree = "<group>"; };
C1EA865F2C74CB6C00E8604D /* SyncPromoView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SyncPromoView.swift; sourceTree = "<group>"; };
C1EA86612C74CB8B00E8604D /* SyncPromoViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SyncPromoViewModel.swift; sourceTree = "<group>"; };
C1F341C42A6924000032057B /* EmailAddressPromptView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmailAddressPromptView.swift; sourceTree = "<group>"; };
C1F341C62A6924100032057B /* EmailAddressPromptViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmailAddressPromptViewModel.swift; sourceTree = "<group>"; };
C1F341C82A6926920032057B /* EmailAddressPromptViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmailAddressPromptViewController.swift; sourceTree = "<group>"; };
C1FFBD452C761BE20073622B /* SyncPromoManagerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SyncPromoManagerTests.swift; sourceTree = "<group>"; };
C1FFBD472C7749A90073622B /* SyncSettingsViewController+PlatformLinks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "SyncSettingsViewController+PlatformLinks.swift"; sourceTree = "<group>"; };
CB1143DD2AF6D4B600C1CCD3 /* bg */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = bg; path = bg.lproj/InfoPlist.strings; sourceTree = "<group>"; };
CB15F4762AF6D5100062A994 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = fr.lproj/InfoPlist.strings; sourceTree = "<group>"; };
CB18F2712AF6D4E400A0F8FE /* el */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = el; path = el.lproj/InfoPlist.strings; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3671,6 +3681,7 @@
5694372F2BE3F63B00C0881B /* SyncErrorHandlerSyncPausedAlertsTests.swift */,
569437322BE4E3DD00C0881B /* SyncErrorHandlerSyncErrorsAlertsTests.swift */,
569437352BE5160600C0881B /* SyncSettingsViewControllerErrorTests.swift */,
C1FFBD452C761BE20073622B /* SyncPromoManagerTests.swift */,
);
name = Sync;
sourceTree = "<group>";
Expand Down Expand Up @@ -4437,6 +4448,7 @@
85582DFF29D7409700E9AE35 /* SyncSettingsViewController+PDFRendering.swift */,
85F98F91296F32BD00742F4A /* SyncSettingsViewController.swift */,
85047C762A0D5D3D00D2FF3F /* SyncSettingsViewController+SyncDelegate.swift */,
C1FFBD472C7749A90073622B /* SyncSettingsViewController+PlatformLinks.swift */,
);
name = Controllers;
sourceTree = "<group>";
Expand Down Expand Up @@ -4490,6 +4502,7 @@
85F0E97229952D7A003D5181 /* DuckDuckGo Recovery Document.pdf */,
85DD44232976C7A8005CC388 /* Controllers */,
560E990E2BEE2CB800507CE0 /* SyncErrorMessage.swift */,
C1EA865E2C74CB5500E8604D /* Promotion */,
);
name = Sync;
sourceTree = "<group>";
Expand Down Expand Up @@ -4986,6 +4999,16 @@
name = EmailSignup;
sourceTree = "<group>";
};
C1EA865E2C74CB5500E8604D /* Promotion */ = {
isa = PBXGroup;
children = (
C1EA865F2C74CB6C00E8604D /* SyncPromoView.swift */,
C1EA86612C74CB8B00E8604D /* SyncPromoViewModel.swift */,
C1BF26142C74D10F00F6405E /* SyncPromoManager.swift */,
);
name = Promotion;
sourceTree = "<group>";
};
C1F341C32A6923D70032057B /* EmailAddressPrompt */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -7116,6 +7139,7 @@
D664C7CE2B289AA200CBFA76 /* SubscriptionPagesUseSubscriptionFeature.swift in Sources */,
EE9D68DC2AE16AE100B55EF4 /* NotificationsAuthorizationController.swift in Sources */,
AA3D854923DA1DFB00788410 /* AppIcon.swift in Sources */,
C1BF26152C74D10F00F6405E /* SyncPromoManager.swift in Sources */,
D6E83C2E2B1EA06E006C8AFB /* SettingsViewModel.swift in Sources */,
6FD8E5222C5BA5C400345670 /* NewTabPageIntroMessageSetup.swift in Sources */,
8590CB612684D0600089F6BF /* CookieDebugViewController.swift in Sources */,
Expand Down Expand Up @@ -7523,6 +7547,7 @@
EE4BE0092A740BED00CD6AA8 /* ClearTextField.swift in Sources */,
56D060282C380D83003BAEB5 /* OnboardingSuggestedSearchesProvider.swift in Sources */,
F44D279C27F331BB0037F371 /* AutofillLoginPromptView.swift in Sources */,
C1EA86622C74CB8B00E8604D /* SyncPromoViewModel.swift in Sources */,
F1FDC9302BF4E0B3006B1435 /* SubscriptionEnvironment+Default.swift in Sources */,
CBD4F13E279EBFAB00B20FD7 /* HomeMessageView.swift in Sources */,
851DFD87212C39D300D95F20 /* TabSwitcherButton.swift in Sources */,
Expand Down Expand Up @@ -7550,6 +7575,7 @@
D6E83C682B23B6A3006C8AFB /* FontSettings.swift in Sources */,
1DEAADF62BA4809400E25A97 /* CookiePopUpProtectionView.swift in Sources */,
31EF52E1281B3BDC0034796E /* AutofillLoginListItemViewModel.swift in Sources */,
C1EA86602C74CB6C00E8604D /* SyncPromoView.swift in Sources */,
1E4FAA6627D8DFC800ADC5B3 /* CompleteDownloadRowViewModel.swift in Sources */,
3712091E2C21E390003ADF3D /* RemoteMessagingStoreErrorHandling.swift in Sources */,
83004E862193E5ED00DA013C /* TabViewControllerBrowsingMenuExtension.swift in Sources */,
Expand All @@ -7570,6 +7596,7 @@
F16390821E648B7A005B4550 /* HomeViewController.swift in Sources */,
985892522260B1B200EEB31B /* ProgressView.swift in Sources */,
85BA585A1F3506AE00C6E8CA /* AppSettings.swift in Sources */,
C1FFBD482C7749A90073622B /* SyncSettingsViewController+PlatformLinks.swift in Sources */,
3151F0EA27357FBA00226F58 /* SpeechRecognizer.swift in Sources */,
85B9814E2B5EB618009AC9A6 /* SwipeTabsCoordinator.swift in Sources */,
985AAE4524899369007A43EC /* HomeScreenTransition.swift in Sources */,
Expand Down Expand Up @@ -7785,6 +7812,7 @@
F17D72391E8B35C6003E8B0E /* AppURLsTests.swift in Sources */,
F1134ED61F40F29F00B73467 /* StatisticsUserDefaultsTests.swift in Sources */,
98629D342C21BE37001E6031 /* BookmarksStateValidationTests.swift in Sources */,
C1FFBD462C761BE20073622B /* SyncPromoManagerTests.swift in Sources */,
F1BDDBFF2C340D9C00459306 /* SubscriptionPagesUseSubscriptionFeatureTests.swift in Sources */,
98EA2C3C218B9AAD0023E1DC /* ThemeManagerTests.swift in Sources */,
569437292BDD487600C0881B /* SyncCredentialsAdapterTests.swift in Sources */,
Expand Down Expand Up @@ -10650,7 +10678,7 @@
repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit";
requirement = {
kind = exactVersion;
version = 190.0.1;
version = 190.0.2;
};
};
9F8FE9472BAE50E50071E372 /* XCRemoteSwiftPackageReference "lottie-spm" */ = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/DuckDuckGo/BrowserServicesKit",
"state" : {
"revision" : "245750c9ca559813307641e819fb27c6d294339f",
"version" : "190.0.1"
"revision" : "2e9282d79f4a36ad851e9e130ffd936a5c8e74c7",
"version" : "190.0.2"
}
},
{
Expand Down
12 changes: 12 additions & 0 deletions DuckDuckGo/Assets.xcassets/Sync-Start-96.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "Sync-Start-96.svg",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 496f43b

Please sign in to comment.