From 9be6e24845576ec19376c5b1c88b24c54e3dde5b Mon Sep 17 00:00:00 2001 From: Lorenzo Mattei Date: Fri, 13 Oct 2023 13:28:29 +0200 Subject: [PATCH 01/16] Update tabs tests (#2088) Co-authored-by: Lorenzo Mattei --- .maestro/release_tests/tabs.yaml | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/.maestro/release_tests/tabs.yaml b/.maestro/release_tests/tabs.yaml index 23e4024e3e..fd9b7460fe 100644 --- a/.maestro/release_tests/tabs.yaml +++ b/.maestro/release_tests/tabs.yaml @@ -20,7 +20,7 @@ tags: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://privacy-test-pages.glitch.me" +- inputText: "https://privacy-test-pages.site" - pressKey: Enter # Manage onboarding @@ -34,10 +34,8 @@ tags: - assertVisible: ".*Privacy Test Pages.*" # Add tab -- assertVisible: - id: "Tabs" -- tapOn: - id: "Tabs" +- assertVisible: Tab Switcher +- tapOn: Tab Switcher - assertVisible: ".*Privacy Test Pages.*" - assertVisible: id: "Add" @@ -52,23 +50,19 @@ tags: - assertVisible: "Search engine" # Switch Tab -- assertVisible: - id: "Tabs" -- tapOn: - id: "Tabs" +- assertVisible: Tab Switcher +- tapOn: Tab Switcher - assertVisible: ".*Privacy Test Pages.*" - assertVisible: ".*Ad Click Flow.*" - assertVisible: "2 Private Tabs" -- tapOn: "Open \"Privacy Test Pages - Home\" at privacy-test-pages.glitch.me" +- tapOn: "Open \"Privacy Test Pages - Home\" at privacy-test-pages.site" - assertNotVisible: ".*Ad Click Flow.*" - assertVisible: ".*Privacy Test Pages.*" - tapOn: "Refresh Page" # Close Tab -- assertVisible: - id: "Tabs" -- tapOn: - id: "Tabs" +- assertVisible: Tab Switcher +- tapOn: Tab Switcher - assertVisible: ".*Privacy Test Pages.*" - assertVisible: ".*Ad Click Flow.*" - assertVisible: "2 Private Tabs" From 27c542509c1fe411205a551b9f67e7ca261fb76a Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Fri, 13 Oct 2023 16:30:34 +0200 Subject: [PATCH 02/16] Release 7.93.0 (#2096) Co-authored-by: Tom Strba <57389842+tomasstrba@users.noreply.github.com> Co-authored-by: David Harbage Co-authored-by: Dax Mobile <44842493+daxmobile@users.noreply.github.com> Co-authored-by: GioSensation --- DuckDuckGo.xcodeproj/project.pbxproj | 48 +++++++++---------- .../xcshareddata/swiftpm/Package.resolved | 14 +++--- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 5ccb32bbef..368af03976 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -693,8 +693,8 @@ C17B59592A03AAD30055F2D1 /* PasswordGenerationPromptViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C17B59562A03AAD30055F2D1 /* PasswordGenerationPromptViewModel.swift */; }; C17B595A2A03AAD30055F2D1 /* PasswordGenerationPromptViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C17B59572A03AAD30055F2D1 /* PasswordGenerationPromptViewController.swift */; }; C17B595B2A03AAD30055F2D1 /* PasswordGenerationPromptView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C17B59582A03AAD30055F2D1 /* PasswordGenerationPromptView.swift */; }; - C18ED43C2AB8364400BF3805 /* FileTextPreviewDebugViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C18ED43B2AB8364400BF3805 /* FileTextPreviewDebugViewController.swift */; }; C18ED43A2AB6F77600BF3805 /* AutofillSettingsEnableFooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C18ED4392AB6F77600BF3805 /* AutofillSettingsEnableFooterView.swift */; }; + C18ED43C2AB8364400BF3805 /* FileTextPreviewDebugViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C18ED43B2AB8364400BF3805 /* FileTextPreviewDebugViewController.swift */; }; C1963863283794A000298D4D /* BookmarksCachingSearch.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1963862283794A000298D4D /* BookmarksCachingSearch.swift */; }; C1B0F6422AB08BE9001EAF05 /* MockPrivacyConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1B0F6412AB08BE9001EAF05 /* MockPrivacyConfiguration.swift */; }; C1B7B51C28941E980098FD6A /* HomeMessageViewModelBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1B7B51B28941E980098FD6A /* HomeMessageViewModelBuilder.swift */; }; @@ -2265,8 +2265,8 @@ C17B59562A03AAD30055F2D1 /* PasswordGenerationPromptViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PasswordGenerationPromptViewModel.swift; sourceTree = ""; }; C17B59572A03AAD30055F2D1 /* PasswordGenerationPromptViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PasswordGenerationPromptViewController.swift; sourceTree = ""; }; C17B59582A03AAD30055F2D1 /* PasswordGenerationPromptView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PasswordGenerationPromptView.swift; sourceTree = ""; }; - C18ED43B2AB8364400BF3805 /* FileTextPreviewDebugViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileTextPreviewDebugViewController.swift; sourceTree = ""; }; C18ED4392AB6F77600BF3805 /* AutofillSettingsEnableFooterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutofillSettingsEnableFooterView.swift; sourceTree = ""; }; + C18ED43B2AB8364400BF3805 /* FileTextPreviewDebugViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileTextPreviewDebugViewController.swift; sourceTree = ""; }; C1963862283794A000298D4D /* BookmarksCachingSearch.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BookmarksCachingSearch.swift; sourceTree = ""; }; C1B0F6412AB08BE9001EAF05 /* MockPrivacyConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockPrivacyConfiguration.swift; sourceTree = ""; }; C1B7B51B28941E980098FD6A /* HomeMessageViewModelBuilder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeMessageViewModelBuilder.swift; sourceTree = ""; }; @@ -7621,7 +7621,7 @@ CODE_SIGN_ENTITLEMENTS = PacketTunnelProvider/PacketTunnelProvider.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; @@ -7658,7 +7658,7 @@ CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -7750,7 +7750,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = ShareExtension/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -7777,7 +7777,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -7923,7 +7923,7 @@ CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGo.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; @@ -7947,7 +7947,7 @@ CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGo.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; INFOPLIST_FILE = DuckDuckGo/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -8011,7 +8011,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEAD_CODE_STRIPPING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = Widgets/Info.plist; @@ -8046,7 +8046,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; @@ -8080,7 +8080,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = OpenAction/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -8110,7 +8110,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8396,7 +8396,7 @@ CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGoAlpha.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; @@ -8422,7 +8422,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8454,7 +8454,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8491,7 +8491,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; @@ -8527,7 +8527,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8562,11 +8562,11 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 0; + DYLIB_CURRENT_VERSION = 2; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Core/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8740,11 +8740,11 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 0; + DYLIB_CURRENT_VERSION = 2; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Core/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8773,10 +8773,10 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 0; + DYLIB_CURRENT_VERSION = 2; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Core/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8962,7 +8962,7 @@ repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit"; requirement = { kind = exactVersion; - version = 81.1.0; + version = 81.3.0; }; }; C14882EB27F211A000D59F0C /* XCRemoteSwiftPackageReference "SwiftSoup" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index ce52c2c554..97ad8e77b8 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -15,8 +15,8 @@ "repositoryURL": "https://github.com/DuckDuckGo/BrowserServicesKit", "state": { "branch": null, - "revision": "43fd829917f61f605fc110b68bb1bf1841276b3c", - "version": "81.1.0" + "revision": "7cd525e28fe6d38f5dd4df85658a4ee6c688eebc", + "version": "81.3.0" } }, { @@ -33,8 +33,8 @@ "repositoryURL": "https://github.com/duckduckgo/content-scope-scripts", "state": { "branch": null, - "revision": "74b6142c016be354144f28551de41b50c4864b1f", - "version": "4.37.0" + "revision": "aa279a3b006a0b1e009707311283c7fcaed24fb7", + "version": "4.39.0" } }, { @@ -51,8 +51,8 @@ "repositoryURL": "https://github.com/duckduckgo/duckduckgo-autofill.git", "state": { "branch": null, - "revision": "55466f10a339843cb79a27af62d5d61c030740b2", - "version": "8.4.1" + "revision": "6dd7d696d4e666cedb2f1890a46fe53615226646", + "version": "8.4.2" } }, { @@ -156,7 +156,7 @@ }, { "package": "TrackerRadarKit", - "repositoryURL": "https://github.com/duckduckgo/TrackerRadarKit.git", + "repositoryURL": "https://github.com/duckduckgo/TrackerRadarKit", "state": { "branch": null, "revision": "4684440d03304e7638a2c8086895367e90987463", From 3586115f17811ae47711d3c71581f5ceb6b65383 Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Fri, 13 Oct 2023 16:30:34 +0200 Subject: [PATCH 03/16] Release 7.93.0 (#2096) Co-authored-by: Tom Strba <57389842+tomasstrba@users.noreply.github.com> Co-authored-by: David Harbage Co-authored-by: Dax Mobile <44842493+daxmobile@users.noreply.github.com> Co-authored-by: GioSensation --- DuckDuckGo.xcodeproj/project.pbxproj | 42 ++++++++++++++-------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index c3c1596e66..ecb3e45d5a 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -7621,7 +7621,7 @@ CODE_SIGN_ENTITLEMENTS = PacketTunnelProvider/PacketTunnelProvider.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; @@ -7658,7 +7658,7 @@ CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -7750,7 +7750,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = ShareExtension/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -7777,7 +7777,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -7923,7 +7923,7 @@ CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGo.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; @@ -7947,7 +7947,7 @@ CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGo.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; INFOPLIST_FILE = DuckDuckGo/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -8011,7 +8011,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEAD_CODE_STRIPPING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = Widgets/Info.plist; @@ -8046,7 +8046,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; @@ -8080,7 +8080,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = OpenAction/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -8110,7 +8110,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8396,7 +8396,7 @@ CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGoAlpha.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; @@ -8422,7 +8422,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8454,7 +8454,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8491,7 +8491,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; @@ -8527,7 +8527,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8562,11 +8562,11 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 0; + DYLIB_CURRENT_VERSION = 2; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Core/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8740,11 +8740,11 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 0; + DYLIB_CURRENT_VERSION = 2; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Core/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8773,10 +8773,10 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 0; + DYLIB_CURRENT_VERSION = 2; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Core/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; From 1fef42a543b2d5db3e42cd843a660bf5c642b764 Mon Sep 17 00:00:00 2001 From: Lorenzo Mattei Date: Sun, 15 Oct 2023 21:44:38 +0200 Subject: [PATCH 04/16] Add note about Danger matching rules (#2087) Co-authored-by: Lorenzo Mattei --- .../AppPrivacyConfigurationDataProvider.swift | 4 +- Core/AppURLs.swift | 3 + Core/ios-config.json | 823 ++++++++---------- scripts/update_embedded.sh | 3 +- 4 files changed, 376 insertions(+), 457 deletions(-) diff --git a/Core/AppPrivacyConfigurationDataProvider.swift b/Core/AppPrivacyConfigurationDataProvider.swift index 56755c581d..1ce3b85874 100644 --- a/Core/AppPrivacyConfigurationDataProvider.swift +++ b/Core/AppPrivacyConfigurationDataProvider.swift @@ -23,8 +23,8 @@ import BrowserServicesKit final public class AppPrivacyConfigurationDataProvider: EmbeddedDataProvider { public struct Constants { - public static let embeddedDataETag = "\"54efb258435567856e087913f93d43df\"" - public static let embeddedDataSHA = "d0f9c70c5baba23a0966b277f8b4c949ecf01612558a50d2bda720fe1919b43f" + public static let embeddedDataETag = "\"81da520221d37e6398ea3d8940595810\"" + public static let embeddedDataSHA = "19766ed7e598cdc123c9db702264b99d0cff5ddfb2ed226fba85b06d304f7e0b" } public var embeddedDataEtag: String { diff --git a/Core/AppURLs.swift b/Core/AppURLs.swift index 6feb8e7407..e7ebfa07f1 100644 --- a/Core/AppURLs.swift +++ b/Core/AppURLs.swift @@ -33,6 +33,9 @@ public extension URL { static let aboutLink = URL(string: AppDeepLinkSchemes.quickLink.appending("\(ddg.host!)/about"))! static let surrogates = URL(string: "\(staticBase)/surrogates.txt")! + + // The following URLs shall match the ones in update_embedded.sh. + // Danger checks that the URLs match on every PR. If the code changes, the regex that Danger uses may need an update. static let privacyConfig = URL(string: "\(staticBase)/trackerblocking/config/v3/ios-config.json")! static let trackerDataSet = URL(string: "\(staticBase)/trackerblocking/v5/current/ios-tds.json")! static let bloomFilter = URL(string: "\(staticBase)/https/https-mobile-v2-bloom.bin")! diff --git a/Core/ios-config.json b/Core/ios-config.json index b9847b8298..2598db1b60 100644 --- a/Core/ios-config.json +++ b/Core/ios-config.json @@ -1,6 +1,6 @@ { "readme": "https://github.com/duckduckgo/privacy-configuration", - "version": 1695828991975, + "version": 1697058000288, "features": { "adClickAttribution": { "readme": "https://help.duckduckgo.com/duckduckgo-help-pages/privacy/web-tracking-protections/#3rd-party-tracker-loading-protection", @@ -313,66 +313,6 @@ { "domain": "roll20.net", "reason": "Performance issue for too many fields." - }, - { - "domain": "amazon.ca", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.cn", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.co.jp", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.com", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.com.au", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.com.mx", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.co.uk", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.de", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.es", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.eu", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.fr", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.in", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.it", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.nl", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.sa", - "reason": "Performance issue, infinite loop." } ], "state": "enabled", @@ -398,7 +338,7 @@ "minSupportedVersion": "7.75.0" } }, - "hash": "c427670d1be007f3bd4af4c0e83addfb" + "hash": "0050520033bd94b10474e9d2f649f8f9" }, "clickToLoad": { "exceptions": [ @@ -1198,6 +1138,10 @@ "domain": "iamexpat.nl", "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1247" }, + { + "domain": "pocketbook.digital", + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1368" + }, { "domain": "earth.google.com", "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1099" @@ -1230,7 +1174,7 @@ } }, "state": "disabled", - "hash": "396f535f481c52cc31108ac8a0f7e53a" + "hash": "282361b69a7a17fbd3a6c53cdfba6b97" }, "clickToPlay": { "exceptions": [ @@ -1274,6 +1218,14 @@ "domain": "welt.de", "reason": "Video pauses at about 13-15 seconds in. Playing the video again results in a single frame rendering without progressing to the next frame." }, + { + "domain": "optout.aboutads.info", + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1377" + }, + { + "domain": "optout.networkadvertising.org", + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1377" + }, { "domain": "earth.google.com", "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1099" @@ -1291,7 +1243,7 @@ "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1085" } ], - "hash": "acdaea57d6585b8b4c15750545c477ff" + "hash": "f43e0ec67d1177139fe5cfc603cbd8a3" }, "cookie": { "settings": { @@ -1325,6 +1277,14 @@ "domain": "nespresso.com", "reason": "Clicking 'Continue' after filling out details for account creation yields an error." }, + { + "domain": "optout.aboutads.info", + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1377" + }, + { + "domain": "optout.networkadvertising.org", + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1377" + }, { "domain": "earth.google.com", "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1099" @@ -1343,10 +1303,145 @@ } ], "state": "disabled", - "hash": "d391a768cdcd83fe39d2229cfca7239c" + "hash": "ee691572b20893705632f670a2f72801" }, "customUserAgent": { "settings": { + "defaultPolicy": "ddg", + "ddgFixedSites": [], + "ddgDefaultSites": [ + { + "domain": "duckduckgo.com", + "reason": "Internal exclusion to roll out experiment" + } + ], + "ddgFixedUserAgent": { + "versions": [ + "391", + "389", + "388", + "386", + "383", + "382", + "379", + "377", + "376", + "374", + "371", + "370", + "367", + "365", + "364", + "361", + "360", + "358", + "356", + "353", + "351", + "349", + "348", + "345", + "343", + "341", + "340", + "338", + "336", + "334", + "332", + "330", + "327", + "325", + "324", + "322", + "319", + "317", + "316", + "314", + "311", + "310", + "307", + "305", + "303", + "301", + "299", + "297", + "296", + "294", + "292", + "290", + "288", + "286", + "283", + "282", + "280", + "277", + "275", + "273", + "272", + "270", + "267", + "265", + "264", + "261", + "259", + "258", + "255", + "253", + "252", + "250", + "247", + "246", + "243", + "242", + "240", + "237", + "235", + "233", + "231", + "229", + "227", + "225", + "224", + "221", + "219", + "217", + "216", + "214", + "212", + "210", + "207", + "206", + "204", + "201", + "200", + "198", + "195", + "193", + "192", + "189", + "188", + "186", + "183", + "181", + "179", + "177", + "175", + "174", + "172", + "170", + "168", + "166", + "164", + "162", + "159", + "158", + "156", + "153", + "151", + "149", + "147" + ] + }, "omitApplicationSites": [ { "domain": "thingiverse.com", @@ -1466,7 +1561,7 @@ }, "exceptions": [], "state": "enabled", - "hash": "8b39b35be3b5b92c999539eb1ebc252f" + "hash": "512418708ceed91fa734fcdbae795543" }, "duckPlayer": { "exceptions": [], @@ -1630,7 +1725,7 @@ } ], "settings": { - "useStrictHideStyleTag": true, + "useStrictHideStyleTag": false, "rules": [ { "selector": "[id*='gpt-']", @@ -1780,6 +1875,10 @@ "selector": "#topBanner", "type": "hide-empty" }, + { + "selector": ".top-ad", + "type": "hide-empty" + }, { "selector": ".ad-banner-container", "type": "hide-empty" @@ -2001,6 +2100,10 @@ { "domain": "github.com", "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1058" + }, + { + "domain": "pocketbook.digital", + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1365" } ], "hideTimeouts": [ @@ -2026,6 +2129,7 @@ "advertisements", "advertisment", "advertisementclose", + "advertisementadvertisement", "advertisementcontinue reading the main story", "advertisement\ncontinue reading the main story", "advertisement\n\ncontinue reading the main story", @@ -2044,6 +2148,7 @@ "sponsored", "sponsorisé", "story continues below advertisement", + "story continues below advertisementadvertisement", "publicité", "publicidade", "reklama", @@ -2963,6 +3068,15 @@ } ] }, + { + "domain": "refinery29.com", + "rules": [ + { + "selector": ".section-ad", + "type": "hide-empty" + } + ] + }, { "domain": "reuters.com", "rules": [ @@ -3049,6 +3163,15 @@ } ] }, + { + "domain": "slate.com", + "rules": [ + { + "selector": ".slate-ad", + "type": "hide-empty" + } + ] + }, { "domain": "snopes.com", "rules": [ @@ -3272,6 +3395,10 @@ { "selector": "#cx-what-to-read-next", "type": "closest-empty" + }, + { + "selector": "[class*='WSJTheme--adWrapper']", + "type": "hide-empty" } ] }, @@ -3299,6 +3426,10 @@ { "selector": ".darla", "type": "closest-empty" + }, + { + "selector": "[data-content='Advertisement']", + "type": "hide-empty" } ] }, @@ -3437,7 +3568,7 @@ ] }, "state": "enabled", - "hash": "d0034c140c0ee9ce9015b74b428523b3" + "hash": "0d1bbb9811caae04c96e677d78d9b9ce" }, "exceptionHandler": { "exceptions": [ @@ -3680,190 +3811,6 @@ "domain": "hyatt.com", "reason": "Site loads blank and does not proceed." }, - { - "domain": "bank.marksandspencer.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/794" - }, - { - "domain": "www7.marksandspencer.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/794" - }, - { - "domain": "fidelity.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/794" - }, - { - "domain": "citi.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/794" - }, - { - "domain": "americanexpress.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "capitalone.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "marcus.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "bankofamerica.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "wellsfargo.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "usbank.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "citizensbankonline.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "sofi.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "regions.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "usaa.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "boh.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "santander.com.br", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "pnc.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "edwardjones.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "ally.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "metrobank.com.ph", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "key.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "synchronybank.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "oldglorybank.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "santander.com.mx", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "secureinternetbank.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "bankfirst.com.au", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "fnbo.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "salliemae.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "bnc.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "kanza.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "prosperity.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "firstwestern.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "penncrest.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "northwest.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "bell.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "dollar.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "dellsbank.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "rcbbank.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "ebt.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "mybct.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "wells.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "365.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "atom.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "ibanking-services.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "bmo.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "tsb.co.uk", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, { "domain": "earth.google.com", "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1099" @@ -3882,7 +3829,7 @@ } ], "state": "enabled", - "hash": "f28bbd2f54f441ea5f830398df41f45e" + "hash": "c2469977eaaaf117362492d2c993fd1c" }, "fingerprintingScreenSize": { "settings": { @@ -3924,190 +3871,6 @@ "domain": "secureserver.net", "reason": "After entering login details and clicking to log in, the site shows an adwall and prevents login." }, - { - "domain": "bank.marksandspencer.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/794" - }, - { - "domain": "www7.marksandspencer.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/794" - }, - { - "domain": "fidelity.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/794" - }, - { - "domain": "citi.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/794" - }, - { - "domain": "americanexpress.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "capitalone.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "marcus.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "bankofamerica.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "wellsfargo.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "usbank.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "citizensbankonline.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "sofi.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "regions.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "usaa.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "boh.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "santander.com.br", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "pnc.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "edwardjones.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "ally.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "metrobank.com.ph", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "key.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "synchronybank.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "oldglorybank.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "santander.com.mx", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "secureinternetbank.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "bankfirst.com.au", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "fnbo.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "salliemae.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "bnc.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "kanza.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "prosperity.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "firstwestern.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "penncrest.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "northwest.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "bell.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "dollar.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "dellsbank.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "rcbbank.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "ebt.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "mybct.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "wells.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "365.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "atom.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "ibanking-services.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "bmo.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "tsb.co.uk", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, { "domain": "earth.google.com", "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1099" @@ -4126,7 +3889,7 @@ } ], "state": "enabled", - "hash": "702a26f39577785255f35af7fc7f2578" + "hash": "27afff6e74517f41184f4d3df479c53b" }, "fingerprintingTemporaryStorage": { "exceptions": [ @@ -4363,6 +4126,10 @@ "domain": "act.alz.org", "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1158" }, + { + "domain": "amica.com", + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1336" + }, { "domain": "earth.google.com", "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1099" @@ -4380,7 +4147,7 @@ "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1085" } ], - "hash": "8de33b0e54940edad6504523c8db58ff" + "hash": "22b055005a4ea3a5f5d387000c4b838b" }, "incontextSignup": { "exceptions": [], @@ -4395,11 +4162,18 @@ "state": "disabled", "features": { "rollout": { - "state": "disabled" + "state": "enabled", + "rollout": { + "steps": [ + { + "percent": 0.5 + } + ] + } } }, "exceptions": [], - "hash": "c1293c7b2687c8a2f7c5433a4d7a330d" + "hash": "429cea8d27316dc62af04159ec7c42b5" }, "navigatorInterface": { "exceptions": [ @@ -4435,10 +4209,13 @@ "features": { "waitlist": { "state": "disabled" + }, + "waitlistBetaActive": { + "state": "disabled" } }, "exceptions": [], - "hash": "bf4c9cd751a7626bd89136f6cc98ccf1" + "hash": "ba52a36920a4a76343fc3c44d98936f9" }, "newTabContinueSetUp": { "exceptions": [], @@ -5106,6 +4883,48 @@ }, "connatix.com": { "rules": [ + { + "rule": "cd.connatix.com", + "domains": [ + "" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/768" + }, + { + "rule": "cds.connatix.com", + "domains": [ + "" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/768" + }, + { + "rule": "cdn.connatix.com", + "domains": [ + "" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/768" + }, + { + "rule": "capi.connatix.com", + "domains": [ + "" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/768" + }, + { + "rule": "vid.connatix.com", + "domains": [ + "" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/768" + }, + { + "rule": "img.connatix.com", + "domains": [ + "" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/768" + }, { "rule": "connatix.com", "domains": [ @@ -5365,6 +5184,17 @@ } ] }, + "eccmp.com": { + "rules": [ + { + "rule": "eccmp.com/sts/scripts/conversen-SDK.js", + "domains": [ + "pch.com" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1344" + } + ] + }, "edgekey.net": { "rules": [ { @@ -5667,9 +5497,10 @@ "rule": "google-analytics.com/analytics.js", "domains": [ "doterra.com", - "easyjet.com" + "easyjet.com", + "worlddutyfree.com" ], - "reason": "doterra.com - For doterra.com/login/loading, the page shows a loading indicator and never redirects.,easyjet.com - Clicking 'Show Worldwide flights' after entering parameters for a worldwide flight in the flight viewing form does nothing." + "reason": "doterra.com - For doterra.com/login/loading, the page shows a loading indicator and never redirects.,easyjet.com - Clicking 'Show Worldwide flights' after entering parameters for a worldwide flight in the flight viewing form does nothing.,worlddutyfree.com - https://github.com/duckduckgo/privacy-configuration/issues/1380" }, { "rule": "www.google-analytics.com/plugins/ua/ecommerce.js", @@ -6193,7 +6024,8 @@ { "rule": "static.klaviyo.com/onsite/js/klaviyo.js", "domains": [ - "kidsguide.com" + "kidsguide.com", + "urbanebikes.com" ], "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1277" }, @@ -6216,6 +6048,13 @@ "andieswim.com" ], "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1285" + }, + { + "rule": "lightboxcdn.com/vendor/.*/user.js", + "domains": [ + "nascar.com" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1373" } ] }, @@ -6786,6 +6625,17 @@ } ] }, + "rokt.com": { + "rules": [ + { + "rule": "rokt.com/wsdk/integrations/snippet.js", + "domains": [ + "pch.com" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1344" + } + ] + }, "rumble.com": { "rules": [ { @@ -7020,6 +6870,34 @@ "royalcaribbean.com" ], "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1255" + }, + { + "rule": "tags.tiqcdn.com/utag/lbg/", + "domains": [ + "" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1334" + }, + { + "rule": "tags.tiqcdn.com/utag/pch/", + "domains": [ + "pch.com" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1344" + }, + { + "rule": "tags.tiqcdn.com/utag/tiqapp/utag.v.js", + "domains": [ + "oracle.com" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1353" + }, + { + "rule": "tags.tiqcdn.com/utag/politico/main/prod/utag.js", + "domains": [ + "politico.com" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1382" } ] }, @@ -7196,6 +7074,13 @@ "" ], "reason": "https://github.com/duckduckgo/privacy-configuration/issues/366" + }, + { + "rule": "yandex.ru/map-widget/", + "domains": [ + "" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1384" } ] }, @@ -7268,6 +7153,17 @@ } ] }, + "zopim.com": { + "rules": [ + { + "rule": "widget-mediator.zopim.com", + "domains": [ + "" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1360" + } + ] + }, "citi.com": { "rules": [ { @@ -7329,6 +7225,17 @@ "reason": "CNAME ENTRY GENERATED FROM: qualtrics.com" } ] + }, + "yandex.tm": { + "rules": [ + { + "rule": "mc.yandex.tm/map-widget/", + "domains": [ + "" + ], + "reason": "CNAME ENTRY GENERATED FROM: yandex.ru" + } + ] } } }, @@ -7350,7 +7257,7 @@ "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1085" } ], - "hash": "f9b5279848f985f769d973e76d09b28b" + "hash": "631ad08511317fe79ad266992d5a05a5" }, "trackingCookies1p": { "settings": { @@ -7560,17 +7467,25 @@ "state": "enabled", "features": { "rollout": { - "state": "disabled" + "state": "enabled", + "rollout": { + "steps": [ + { + "percent": 1 + }, + { + "percent": 5 + }, + { + "percent": 15 + } + ] + } } }, "exceptions": [], - "hash": "54776d4aa010391dc14a53ad69cd1777" + "hash": "39a36ca9002bd5aea4dd7b6bdb5b79d4" } }, - "unprotectedTemporary": [ - { - "domain": "vinted.fr", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/794" - } - ] + "unprotectedTemporary": [] } \ No newline at end of file diff --git a/scripts/update_embedded.sh b/scripts/update_embedded.sh index 892183b2c3..0001b6d31c 100755 --- a/scripts/update_embedded.sh +++ b/scripts/update_embedded.sh @@ -60,5 +60,6 @@ performUpdate() { rm -f "$TEMP_ETAG_FILENAME" } +# The following URLs shall match the ones in AppURLs.swift. Danger checks that the URLs match on every PR. If the code changes, the regex that Danger uses may need an update. performUpdate 'https://staticcdn.duckduckgo.com/trackerblocking/v5/current/ios-tds.json' "${base_dir}/Core/AppTrackerDataSetProvider.swift" "${base_dir}/Core/trackerData.json" -performUpdate 'https://staticcdn.duckduckgo.com/trackerblocking/config/v2/ios-config.json' "${base_dir}/Core/AppPrivacyConfigurationDataProvider.swift" "${base_dir}/Core/ios-config.json" +performUpdate 'https://staticcdn.duckduckgo.com/trackerblocking/config/v3/ios-config.json' "${base_dir}/Core/AppPrivacyConfigurationDataProvider.swift" "${base_dir}/Core/ios-config.json" From e119bad1c4a130d8d3deccc31c19ce16f4283ecc Mon Sep 17 00:00:00 2001 From: Lorenzo Mattei Date: Mon, 16 Oct 2023 17:14:10 +0200 Subject: [PATCH 05/16] Fix privacy tests (#2097) Co-authored-by: Lorenzo Mattei --- .maestro/privacy_tests/06_multi-tab.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.maestro/privacy_tests/06_multi-tab.yaml b/.maestro/privacy_tests/06_multi-tab.yaml index cee868a46d..b55aa36cbc 100644 --- a/.maestro/privacy_tests/06_multi-tab.yaml +++ b/.maestro/privacy_tests/06_multi-tab.yaml @@ -70,10 +70,8 @@ tags: - tapOn: "Done" - assertVisible: text: "Publisher site" -- assertVisible: - id: "Tabs" -- tapOn: - id: "Tabs" +- assertVisible: Tab Switcher +- tapOn: Tab Switcher - assertVisible: id: "Add" - tapOn: From 62615496d6e4cc2c44a72107c4293473606e3e57 Mon Sep 17 00:00:00 2001 From: Christopher Brind Date: Mon, 16 Oct 2023 20:12:13 +0100 Subject: [PATCH 06/16] address bar position (#2072) --- Core/PixelEvent.swift | 8 +- Core/UserDefaultsPropertyWrapper.swift | 3 + DuckDuckGo.xcodeproj/project.pbxproj | 20 +- .../xcshareddata/swiftpm/Package.resolved | 4 +- DuckDuckGo/ActionMessageView.swift | 19 +- ...essBarPositionSettingsViewController.swift | 99 ++++++++ DuckDuckGo/AppDelegate.swift | 7 +- DuckDuckGo/AppSettings.swift | 3 +- DuckDuckGo/AppUserDefaults.swift | 17 +- .../Arrow-Down-Left-24.svg | 3 + .../Arrow-Down-Left-24.imageset/Contents.json | 16 ++ .../24px/Share-24.imageset/Contents.json | 2 +- .../24px/Share-24.imageset/Share-24.pdf | Bin 2300 -> 0 bytes .../24px/Share-24.imageset/Share-Apple-24.svg | 4 + DuckDuckGo/AutocompleteViewController.swift | 50 +++- .../AutocompleteViewControllerDelegate.swift | 1 + .../Base.lproj/DaxOnboarding.storyboard | 31 ++- DuckDuckGo/Base.lproj/OmniBar.xib | 9 +- DuckDuckGo/Base.lproj/Settings.storyboard | 180 ++++++++++---- DuckDuckGo/BlankSnapshot.storyboard | 106 -------- DuckDuckGo/BlankSnapshotViewController.swift | 109 +++++---- DuckDuckGo/BrowserChromeManager.swift | 2 +- .../BrowsingMenuViewController.swift | 12 +- DuckDuckGo/DarkTheme.swift | 19 +- DuckDuckGo/FavoritesOverlay.swift | 22 +- .../FullscreenDaxDialogViewController.swift | 29 ++- DuckDuckGo/LightTheme.swift | 18 +- DuckDuckGo/MainView.swift | 122 +++++++-- .../MainViewController+CookiesManaged.swift | 2 +- DuckDuckGo/MainViewController+Email.swift | 4 +- .../MainViewController+KeyCommands.swift | 4 +- DuckDuckGo/MainViewController.swift | 231 +++++++++++------- DuckDuckGo/OmniBar.swift | 35 ++- DuckDuckGo/SettingsViewController.swift | 34 ++- DuckDuckGo/SuggestionTableViewCell.swift | 10 +- DuckDuckGo/TabViewController.swift | 38 ++- ...bViewControllerBrowsingMenuExtension.swift | 22 +- ...ControllerLongPressBookmarkExtension.swift | 12 +- DuckDuckGo/Theme+DesignSystem.swift | 36 +++ DuckDuckGo/UserText.swift | 5 +- DuckDuckGo/en.lproj/Localizable.strings | 6 + DuckDuckGo/menu_dark.json | 2 +- DuckDuckGo/menu_light.json | 2 +- DuckDuckGoTests/AppSettingsMock.swift | 5 + DuckDuckGoTests/BarsAnimatorTests.swift | 2 +- LocalPackages/Waitlist/Package.swift | 2 +- 46 files changed, 925 insertions(+), 442 deletions(-) create mode 100644 DuckDuckGo/AddressBarPositionSettingsViewController.swift create mode 100644 DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Arrow-Down-Left-24.imageset/Arrow-Down-Left-24.svg create mode 100644 DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Arrow-Down-Left-24.imageset/Contents.json delete mode 100644 DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Share-24.imageset/Share-24.pdf create mode 100644 DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Share-24.imageset/Share-Apple-24.svg delete mode 100644 DuckDuckGo/BlankSnapshot.storyboard create mode 100644 DuckDuckGo/Theme+DesignSystem.swift diff --git a/Core/PixelEvent.swift b/Core/PixelEvent.swift index 1b1193ddc2..e3b1b8dc82 100644 --- a/Core/PixelEvent.swift +++ b/Core/PixelEvent.swift @@ -245,6 +245,9 @@ extension Pixel { case autofillJSPixelFired(_ pixel: AutofillUserScript.JSPixel) + case navigationbarPositionBottom + case navigationBarPositionTop + case secureVaultInitError case secureVaultError @@ -576,7 +579,10 @@ extension Pixel.Event { case .autocompleteSelectedLocal: return "m_au_l" case .autocompleteSelectedRemote: return "m_au_r" - + + case .navigationbarPositionBottom: return "m_seturlbar_bottom" + case .navigationBarPositionTop: return "m_seturlbar_top" + case .feedbackPositive: return "mfbs_positive_submit" case .feedbackNegativePrefix(category: let category): return "mfbs_negative_\(category)" diff --git a/Core/UserDefaultsPropertyWrapper.swift b/Core/UserDefaultsPropertyWrapper.swift index 0d657b9533..7949c231c3 100644 --- a/Core/UserDefaultsPropertyWrapper.swift +++ b/Core/UserDefaultsPropertyWrapper.swift @@ -99,6 +99,9 @@ public struct UserDefaultsWrapper { case syncEnvironment = "com.duckduckgo.ios.sync-environment" case networkProtectionDebugOptionAlwaysOnDisabled = "com.duckduckgo.network-protection.always-on.disabled" + + case addressBarPosition = "com.duckduckgo.ios.addressbarposition" + case showFullSiteAddress = "com.duckduckgo.ios.showfullsiteaddress" } private let key: Key diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index ecb3e45d5a..0f645d1aea 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -374,6 +374,7 @@ 853273B624FFE0BB00E3C778 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8512EA4E24ED30D20073EE19 /* WidgetKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 8536A1C8209AF2410050739E /* MockVariantManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8536A1C7209AF2410050739E /* MockVariantManager.swift */; }; 8536A1CA209AF6490050739E /* HomeRowReminderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8536A1C9209AF6480050739E /* HomeRowReminderTests.swift */; }; + 8536A1FD2ACF114B003AC5BA /* Theme+DesignSystem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8536A1FC2ACF114B003AC5BA /* Theme+DesignSystem.swift */; }; 85371D242121B9D500920548 /* new_tab.json in Resources */ = {isa = PBXBuildFile; fileRef = 85371D232121B9D400920548 /* new_tab.json */; }; 85372447220DD103009D09CD /* UIKeyCommandExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85372446220DD103009D09CD /* UIKeyCommandExtension.swift */; }; 85374D3821AC419800FF5A1E /* NavigationSearchHomeViewSectionRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85374D3721AC419800FF5A1E /* NavigationSearchHomeViewSectionRenderer.swift */; }; @@ -405,6 +406,7 @@ 85514FFD2372DA0100DBC528 /* ios13-home-row.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 85514FFC2372DA0000DBC528 /* ios13-home-row.mp4 */; }; 8551912724746EDC0010FDD0 /* SnapshotHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8551912624746EDC0010FDD0 /* SnapshotHelper.swift */; }; 85582E0029D7409700E9AE35 /* SyncSettingsViewController+PDFRendering.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85582DFF29D7409700E9AE35 /* SyncSettingsViewController+PDFRendering.swift */; }; + 855D45D32ACD7DD1008F7AC6 /* AddressBarPositionSettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 855D45D22ACD7DD1008F7AC6 /* AddressBarPositionSettingsViewController.swift */; }; 855D914D2063EF6A00C4B448 /* TabSwitcherTransition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 855D914C2063EF6A00C4B448 /* TabSwitcherTransition.swift */; }; 8563A03C1F9288D600F04442 /* BrowserChromeManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8563A03B1F9288D600F04442 /* BrowserChromeManager.swift */; }; 8565A34B1FC8D96B00239327 /* LaunchTabNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8565A34A1FC8D96B00239327 /* LaunchTabNotification.swift */; }; @@ -501,7 +503,6 @@ 981CA7EA2617797500E119D5 /* MainViewController+AddFavoriteFlow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 981CA7E92617797500E119D5 /* MainViewController+AddFavoriteFlow.swift */; }; 981FED692201FE69008488D7 /* AutoClearSettingsScreenTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 981FED682201FE69008488D7 /* AutoClearSettingsScreenTests.swift */; }; 981FED6E22025151008488D7 /* BlankSnapshotViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 981FED6C22025151008488D7 /* BlankSnapshotViewController.swift */; }; - 981FED712202519C008488D7 /* BlankSnapshot.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 981FED702202519C008488D7 /* BlankSnapshot.storyboard */; }; 981FED7422046017008488D7 /* AutoClearTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 981FED7322046017008488D7 /* AutoClearTests.swift */; }; 981FED76220464EF008488D7 /* AutoClearSettingsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 981FED75220464EF008488D7 /* AutoClearSettingsModel.swift */; }; 9820EAF522613CD30089094D /* WebProgressWorker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9820EAF422613CD30089094D /* WebProgressWorker.swift */; }; @@ -1376,6 +1377,7 @@ 853273B124FF114700E3C778 /* DeepLinks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeepLinks.swift; sourceTree = ""; }; 8536A1C7209AF2410050739E /* MockVariantManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockVariantManager.swift; sourceTree = ""; }; 8536A1C9209AF6480050739E /* HomeRowReminderTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeRowReminderTests.swift; sourceTree = ""; }; + 8536A1FC2ACF114B003AC5BA /* Theme+DesignSystem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Theme+DesignSystem.swift"; sourceTree = ""; }; 85371D232121B9D400920548 /* new_tab.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = new_tab.json; sourceTree = ""; }; 85372446220DD103009D09CD /* UIKeyCommandExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIKeyCommandExtension.swift; sourceTree = ""; }; 85374D3721AC419800FF5A1E /* NavigationSearchHomeViewSectionRenderer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationSearchHomeViewSectionRenderer.swift; sourceTree = ""; }; @@ -1409,6 +1411,7 @@ 85519124247468580010FDD0 /* TrackerRadarIntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrackerRadarIntegrationTests.swift; sourceTree = ""; }; 8551912624746EDC0010FDD0 /* SnapshotHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SnapshotHelper.swift; path = fastlane/SnapshotHelper.swift; sourceTree = SOURCE_ROOT; }; 85582DFF29D7409700E9AE35 /* SyncSettingsViewController+PDFRendering.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "SyncSettingsViewController+PDFRendering.swift"; sourceTree = ""; }; + 855D45D22ACD7DD1008F7AC6 /* AddressBarPositionSettingsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddressBarPositionSettingsViewController.swift; sourceTree = ""; }; 855D914C2063EF6A00C4B448 /* TabSwitcherTransition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabSwitcherTransition.swift; sourceTree = ""; }; 8563A03B1F9288D600F04442 /* BrowserChromeManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrowserChromeManager.swift; sourceTree = ""; }; 8565A34A1FC8D96B00239327 /* LaunchTabNotification.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LaunchTabNotification.swift; sourceTree = ""; }; @@ -1544,7 +1547,6 @@ 981DCA992521EFAB00CD4C18 /* nb */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nb; path = nb.lproj/Localizable.strings; sourceTree = ""; }; 981FED682201FE69008488D7 /* AutoClearSettingsScreenTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutoClearSettingsScreenTests.swift; sourceTree = ""; }; 981FED6C22025151008488D7 /* BlankSnapshotViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlankSnapshotViewController.swift; sourceTree = ""; }; - 981FED702202519C008488D7 /* BlankSnapshot.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = BlankSnapshot.storyboard; sourceTree = ""; }; 981FED7322046017008488D7 /* AutoClearTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutoClearTests.swift; sourceTree = ""; }; 981FED75220464EF008488D7 /* AutoClearSettingsModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutoClearSettingsModel.swift; sourceTree = ""; }; 9820A5D522B1C0B20024E37C /* DDG Trace.tracetemplate */ = {isa = PBXFileReference; lastKnownFileType = file.bplist; path = "DDG Trace.tracetemplate"; sourceTree = ""; }; @@ -3684,19 +3686,20 @@ isa = PBXGroup; children = ( F1CDD3F11F16911700BE0581 /* AboutViewController.swift */, - 1E865AEF272042DB001C74F3 /* TextSizeSettingsViewController.swift */, + 855D45D22ACD7DD1008F7AC6 /* AddressBarPositionSettingsViewController.swift */, AA3D854623D9E88E00788410 /* AppIconSettingsCell.swift */, AA3D854423D9942200788410 /* AppIconSettingsViewController.swift */, 98F0FC1F21FF18E700CE77AB /* AutoClearSettingsViewController.swift */, + 1EE7C298294227EC0026C8CB /* AutoconsentSettingsViewController.swift */, + 02C57C4A2514FEFB009E5129 /* DoNotSellSettingsViewController.swift */, F456B3B425810BB900B79B90 /* FireButtonAnimationSettingsViewController.swift */, 85449EF423FDA02800512AAF /* KeyboardSettingsViewController.swift */, 8540BD5523D9E9C20057FDD2 /* PreserveLoginsSettingsViewController.swift */, F176699D1E40BC86003D3222 /* Settings.storyboard */, F1AB2B411E3F7D5C00868554 /* SettingsViewController.swift */, + 1E865AEF272042DB001C74F3 /* TextSizeSettingsViewController.swift */, 9881439B23326DC200573F7C /* ThemeSettingsViewController.swift */, 8531A08D1F9950E6000484F0 /* UnprotectedSitesViewController.swift */, - 02C57C4A2514FEFB009E5129 /* DoNotSellSettingsViewController.swift */, - 1EE7C298294227EC0026C8CB /* AutoconsentSettingsViewController.swift */, ); name = UI; sourceTree = ""; @@ -4067,6 +4070,7 @@ 98DA6EC92181E41F00E65433 /* ThemeManager.swift */, 98F3A1D9217B37200011A0D4 /* LightTheme.swift */, 98F3A1DB217B373E0011A0D4 /* DarkTheme.swift */, + 8536A1FC2ACF114B003AC5BA /* Theme+DesignSystem.swift */, ); name = Themes; sourceTree = ""; @@ -4933,7 +4937,6 @@ children = ( 984147B624F0264B00362052 /* Authentication.storyboard */, F1AE54E71F0425FC00D9A700 /* AuthenticationViewController.swift */, - 981FED702202519C008488D7 /* BlankSnapshot.storyboard */, 981FED6C22025151008488D7 /* BlankSnapshotViewController.swift */, F1CA3C3A1F045B65005FADB3 /* Authenticator.swift */, F1CA3C361F045878005FADB3 /* PrivacyStore.swift */, @@ -5709,7 +5712,6 @@ 1E16260B296845120004127F /* cookie-banner-illustration-animated.json in Resources */, AA4D6AD323DE4D27007E8790 /* AppIconPurple29x29@2x.png in Resources */, AA4D6AA123DE4CC4007E8790 /* AppIconBlue60x60@3x.png in Resources */, - 981FED712202519C008488D7 /* BlankSnapshot.storyboard in Resources */, 984147A824F0259000362052 /* Onboarding.storyboard in Resources */, AA4D6AF723DF0312007E8790 /* AppIconRed60x60@2x.png in Resources */, AA4D6AE923DE4D33007E8790 /* AppIconGreen29x29@3x.png in Resources */, @@ -6166,6 +6168,7 @@ F4147354283BF834004AA7A5 /* AutofillContentScopeFeatureToggles.swift in Sources */, 986DA94A24884B18004A7E39 /* WebViewTransition.swift in Sources */, 31B524572715BB23002225AB /* WebJSAlert.swift in Sources */, + 8536A1FD2ACF114B003AC5BA /* Theme+DesignSystem.swift in Sources */, F114C55B1E66EB020018F95F /* NibLoading.swift in Sources */, C10CB5F32A1A5BDF0048E503 /* AutofillViews.swift in Sources */, 982E5630222C3D5B008D861B /* FeedbackPickerViewController.swift in Sources */, @@ -6388,6 +6391,7 @@ 027F48782A4B663C001A1C6C /* AppTPFAQView.swift in Sources */, 02A4EACA29B0F464009BE006 /* AppTPToggleViewModel.swift in Sources */, 4B6484EE27FD1E350050A7A1 /* WindowsBrowserWaitlistDebugViewController.swift in Sources */, + 855D45D32ACD7DD1008F7AC6 /* AddressBarPositionSettingsViewController.swift in Sources */, F1D796EE1E7AF2EB0019D451 /* UIViewControllerExtension.swift in Sources */, 1EE411F12857C3640003FE64 /* TrackerAnimationImageProvider.swift in Sources */, 1E7A711C2934EEBC00B7EA19 /* OmniBarNotification.swift in Sources */, @@ -8978,7 +8982,7 @@ repositoryURL = "https://github.com/duckduckgo/DesignResourcesKit"; requirement = { kind = exactVersion; - version = 1.1.1; + version = 2.0.0; }; }; F486D2EF25069482002D07D7 /* XCRemoteSwiftPackageReference "Kingfisher" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index d12c93a90a..6b534cc924 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -42,8 +42,8 @@ "repositoryURL": "https://github.com/duckduckgo/DesignResourcesKit", "state": { "branch": null, - "revision": "5de78d59358ff60651b2cf9322c74a2297927b4e", - "version": "1.1.1" + "revision": "d7ea2561ec7624c224f52e1c9b349075ddf1c782", + "version": "2.0.0" } }, { diff --git a/DuckDuckGo/ActionMessageView.swift b/DuckDuckGo/ActionMessageView.swift index 37e86221b5..57ff705e6e 100644 --- a/DuckDuckGo/ActionMessageView.swift +++ b/DuckDuckGo/ActionMessageView.swift @@ -22,9 +22,9 @@ import UIKit extension ActionMessageView: NibLoading {} class ActionMessageView: UIView { - + enum PresentationLocation { - case withBottomBar + case withBottomBar(andAddressBarBottom: Bool) case withoutBottomBar } @@ -45,6 +45,11 @@ class ActionMessageView: UIView { return 70 } + + static var windowBottomPaddingWithAddressBar: CGFloat { + return windowBottomPaddingWithBottomBar + 52 + } + static var windowBottomPaddingWithoutBottomBar: CGFloat { return 0 } @@ -53,8 +58,8 @@ class ActionMessageView: UIView { private static func bottomPadding(for location: PresentationLocation) -> CGFloat { switch location { - case .withBottomBar: - return Constants.windowBottomPaddingWithBottomBar + case .withBottomBar(let isAddressBarBottom): + return isAddressBarBottom ? Constants.windowBottomPaddingWithAddressBar : Constants.windowBottomPaddingWithBottomBar case .withoutBottomBar: return Constants.windowBottomPaddingWithoutBottomBar } @@ -84,7 +89,7 @@ class ActionMessageView: UIView { static func present(message: NSAttributedString, numberOfLines: Int = 0, actionTitle: String? = nil, - presentationLocation: PresentationLocation = .withBottomBar, + presentationLocation: PresentationLocation = .withBottomBar(andAddressBarBottom: false), onAction: @escaping () -> Void = {}, onDidDismiss: @escaping () -> Void = {}) { let messageView = loadFromXib() @@ -100,7 +105,7 @@ class ActionMessageView: UIView { static func present(message: String, actionTitle: String? = nil, - presentationLocation: PresentationLocation = .withBottomBar, + presentationLocation: PresentationLocation = .withBottomBar(andAddressBarBottom: false), onAction: @escaping () -> Void = {}, onDidDismiss: @escaping () -> Void = {}) { let messageView = loadFromXib() @@ -116,7 +121,7 @@ class ActionMessageView: UIView { private static func present(messageView: ActionMessageView, message: String, actionTitle: String? = nil, - presentationLocation: PresentationLocation = .withBottomBar, + presentationLocation: PresentationLocation = .withBottomBar(andAddressBarBottom: false), onAction: @escaping () -> Void = {}, onDidDismiss: @escaping () -> Void = {}) { guard let window = UIApplication.shared.windows.filter({ $0.isKeyWindow }).first else { return } diff --git a/DuckDuckGo/AddressBarPositionSettingsViewController.swift b/DuckDuckGo/AddressBarPositionSettingsViewController.swift new file mode 100644 index 0000000000..b7df80ab5e --- /dev/null +++ b/DuckDuckGo/AddressBarPositionSettingsViewController.swift @@ -0,0 +1,99 @@ +// +// AddressBarPositionSettingsViewController.swift +// DuckDuckGo +// +// Copyright © 2023 DuckDuckGo. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +import UIKit +import Core + +class AddressBarPositionSettingsViewController: UITableViewController { + + private lazy var appSettings = AppDependencyProvider.shared.appSettings + + private lazy var options = AddressBarPosition.allCases + + override func viewDidLoad() { + super.viewDidLoad() + + applyTheme(ThemeManager.shared.currentTheme) + } + + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return options.count + } + + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + return tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) + } + + override func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) { + let theme = ThemeManager.shared.currentTheme + cell.backgroundColor = theme.tableCellBackgroundColor + cell.setHighlightedStateBackgroundColor(theme.tableCellHighlightedBackgroundColor) + + cell.tintColor = theme.buttonTintColor + cell.textLabel?.textColor = theme.tableCellTextColor + + cell.textLabel?.text = options[indexPath.row].descriptionText + cell.accessoryType = appSettings.currentAddressBarPosition.descriptionText == cell.textLabel?.text ? .checkmark : .none + } + + override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + appSettings.currentAddressBarPosition = AddressBarPosition.allCases[indexPath.row] + + switch appSettings.currentAddressBarPosition { + case .top: + Pixel.fire(pixel: .navigationBarPositionTop) + case .bottom: + Pixel.fire(pixel: .navigationbarPositionBottom) + } + + tableView.performBatchUpdates { + tableView.reloadSections(IndexSet(integer: 0), with: .automatic) + tableView.deselectRow(at: indexPath, animated: true) + } + } +} + +extension AddressBarPositionSettingsViewController: Themable { + + func decorate(with theme: Theme) { + + tableView.backgroundColor = theme.backgroundColor + tableView.separatorColor = theme.tableCellSeparatorColor + + tableView.reloadData() + } +} + +enum AddressBarPosition: String, CaseIterable { + case top + case bottom + + var isBottom: Bool { + self == .bottom + } + + var descriptionText: String { + switch self { + case .top: + return UserText.addressBarPositionTop + case .bottom: + return UserText.addressBarPositionBottom + } + } +} diff --git a/DuckDuckGo/AppDelegate.swift b/DuckDuckGo/AppDelegate.swift index 604b6db7f2..8707bce4f6 100644 --- a/DuckDuckGo/AppDelegate.swift +++ b/DuckDuckGo/AppDelegate.swift @@ -214,7 +214,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate { bookmarksDatabaseCleaner: syncDataProviders.bookmarksAdapter.databaseCleaner, appTrackingProtectionDatabase: appTrackingProtectionDatabase, syncService: syncService, - syncDataProviders: syncDataProviders) + syncDataProviders: syncDataProviders, + appSettings: AppDependencyProvider.shared.appSettings) main.loadViewIfNeeded() window = UIWindow(frame: UIScreen.main.bounds) @@ -543,9 +544,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate { overlayWindow = UIWindow(frame: frame) overlayWindow?.windowLevel = UIWindow.Level.alert - let overlay = BlankSnapshotViewController.loadFromStoryboard() + let overlay = BlankSnapshotViewController(appSettings: AppDependencyProvider.shared.appSettings) overlay.delegate = self - + overlayWindow?.rootViewController = overlay overlayWindow?.makeKeyAndVisible() window?.isHidden = true diff --git a/DuckDuckGo/AppSettings.swift b/DuckDuckGo/AppSettings.swift index d79c06e746..45b1354046 100644 --- a/DuckDuckGo/AppSettings.swift +++ b/DuckDuckGo/AppSettings.swift @@ -31,7 +31,8 @@ protocol AppSettings: AnyObject { var sendDoNotSell: Bool { get set } var currentFireButtonAnimation: FireButtonAnimationType { get set } - + var currentAddressBarPosition: AddressBarPosition { get set } + var textSize: Int { get set } var autofillCredentialsEnabled: Bool { get set } diff --git a/DuckDuckGo/AppUserDefaults.swift b/DuckDuckGo/AppUserDefaults.swift index 0a7d98d880..efbfe51d59 100644 --- a/DuckDuckGo/AppUserDefaults.swift +++ b/DuckDuckGo/AppUserDefaults.swift @@ -30,6 +30,7 @@ public class AppUserDefaults: AppSettings { public static let autofillEnabledChange = Notification.Name("com.duckduckgo.app.AutofillEnabledChange") public static let didVerifyInternalUser = Notification.Name("com.duckduckgo.app.DidVerifyInternalUser") public static let inspectableWebViewsToggled = Notification.Name("com.duckduckgo.app.DidToggleInspectableWebViews") + public static let addressBarPositionChanged = Notification.Name("com.duckduckgo.app.AddressBarPositionChanged") } private let groupName: String @@ -176,7 +177,21 @@ public class AppUserDefaults: AppSettings { userDefaults?.setValue(newValue.rawValue, forKey: Keys.currentFireButtonAnimationKey) } } - + + @UserDefaultsWrapper(key: .addressBarPosition, defaultValue: nil) + private var addressBarPositionStorage: String? + + var currentAddressBarPosition: AddressBarPosition { + get { + return AddressBarPosition(rawValue: addressBarPositionStorage?.lowercased() ?? "") ?? .top + } + + set { + addressBarPositionStorage = newValue.rawValue + NotificationCenter.default.post(name: Notifications.addressBarPositionChanged, object: currentAddressBarPosition) + } + } + @UserDefaultsWrapper(key: .textSize, defaultValue: 100) var textSize: Int diff --git a/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Arrow-Down-Left-24.imageset/Arrow-Down-Left-24.svg b/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Arrow-Down-Left-24.imageset/Arrow-Down-Left-24.svg new file mode 100644 index 0000000000..a2d3aa85a9 --- /dev/null +++ b/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Arrow-Down-Left-24.imageset/Arrow-Down-Left-24.svg @@ -0,0 +1,3 @@ + + + diff --git a/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Arrow-Down-Left-24.imageset/Contents.json b/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Arrow-Down-Left-24.imageset/Contents.json new file mode 100644 index 0000000000..e7a4bdced3 --- /dev/null +++ b/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Arrow-Down-Left-24.imageset/Contents.json @@ -0,0 +1,16 @@ +{ + "images" : [ + { + "filename" : "Arrow-Down-Left-24.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true, + "template-rendering-intent" : "template" + } +} diff --git a/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Share-24.imageset/Contents.json b/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Share-24.imageset/Contents.json index baf2e36c14..75bb7a584e 100644 --- a/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Share-24.imageset/Contents.json +++ b/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Share-24.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "Share-24.pdf", + "filename" : "Share-Apple-24.svg", "idiom" : "universal" } ], diff --git a/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Share-24.imageset/Share-24.pdf b/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Share-24.imageset/Share-24.pdf deleted file mode 100644 index 0031e2fa919d01be6aeeaf624dfa25145467550a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2300 zcmb7`O>Y}F5Qgvk6}%Wo4q9>eO&|!+*hx{eMI5EKpa*rmaTHj)t)vube|=tZm&0{k zpy(cq(Zk_zzR2;_?aiAFbwLP{N>0Ch7E-==Az!`}!+4i}3ccprpN8@N@<|%NUDi5Z zPQ(5vwl~9{hkn?7|4LrJU;paQ;txTcDxXwU*s#QFx~_%J&D#A@u-a4M+>au4#zWUh za-H_kl99&@tqBwhbT%52KsrP}BddZn8IiV87cK26knDx-l1bh~tZE&#Qt|=JnP9z@ zv5Pk05D7w2M-QUON0mS#R+N#Ui)6iVuw^N; zgMIDIT-RV+%nqu~2b73RpHM7g0{bV;Kk(6qt3kTSI@;nb{& z?nwm6)qVx5rDK-s8I4h>VpB};#`)xnJ(pBUC>^@YxMI#kAE2MN+Th5SbB(h`>0DxR zKFoRquk+R?m!KD)#78lTcmMnHk*P8K_wC~wyJ6{w>$2nkugcPmRND=xCa4Mx^|bVeoeixpIth1vHnqa~ zUrt&vb_owm(`4`Q#5CHHhK|UW)WX&33Gp+~7(9)0-uzlK);%q8(5n&g*=2X7>}LtH z(ufOcU4A?BRV~tn{a9s*Sua{f8RmC1CiE~;&yd~N@F5McH~Cqv&am{r9i9i(GKK2M z%F}5cW#nDrNoE;i!fn4B$LVsGAAZHe!?*qAuipo`z1`mr3;21sJM3RgU*(7PPI93% z$JnH5X*ZmwFQ9EpFviZ{3A;_z%w7%0>9p0_7Btjv$!$+ZH5Oe&klFb=cH_R i({zzJ;F93&`@`P@yf6Q!>`#{xj#eRxtE<;<-+Tj}ZPiZz diff --git a/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Share-24.imageset/Share-Apple-24.svg b/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Share-24.imageset/Share-Apple-24.svg new file mode 100644 index 0000000000..4615b33b2c --- /dev/null +++ b/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Share-24.imageset/Share-Apple-24.svg @@ -0,0 +1,4 @@ + + + + diff --git a/DuckDuckGo/AutocompleteViewController.swift b/DuckDuckGo/AutocompleteViewController.swift index 6113b67a2d..cc13fc7ead 100644 --- a/DuckDuckGo/AutocompleteViewController.swift +++ b/DuckDuckGo/AutocompleteViewController.swift @@ -43,9 +43,17 @@ class AutocompleteViewController: UIViewController { private var bookmarksSearch: BookmarksStringSearch! + private var appSettings: AppSettings! + + var backgroundColor: UIColor { + appSettings.currentAddressBarPosition.isBottom ? + UIColor(designSystemColor: .background) : + UIColor.black.withAlphaComponent(0.2) + } + var showBackground = true { didSet { - view.backgroundColor = showBackground ? UIColor.black.withAlphaComponent(0.2) : UIColor.clear + view.backgroundColor = showBackground ? backgroundColor : UIColor.clear } } @@ -61,12 +69,15 @@ class AutocompleteViewController: UIViewController { @IBOutlet weak var tableView: UITableView! var shouldOffsetY = false - static func loadFromStoryboard(bookmarksSearch: BookmarksStringSearch) -> AutocompleteViewController { + static func loadFromStoryboard(bookmarksSearch: BookmarksStringSearch, + appSettings: AppSettings = AppDependencyProvider.shared.appSettings) -> AutocompleteViewController { let storyboard = UIStoryboard(name: "Autocomplete", bundle: nil) + guard let controller = storyboard.instantiateInitialViewController() as? AutocompleteViewController else { fatalError("Failed to instatiate correct Autocomplete view controller") } controller.bookmarksSearch = bookmarksSearch + controller.appSettings = appSettings return controller } @@ -101,13 +112,18 @@ class AutocompleteViewController: UIViewController { override func viewWillDisappear(_ animated: Bool) { super.viewWillDisappear(animated) - resetNaviagtionBar() + resetNavigationBar() } - private func resetNaviagtionBar() { + private func resetNavigationBar() { navigationController?.hidesBarsOnSwipe = hidesBarsOnSwipeDefault } + override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { + super.traitCollectionDidChange(previousTraitCollection) + tableView.reloadData() + } + func updateQuery(query: String) { self.query = query selectedItem = -1 @@ -210,12 +226,16 @@ extension AutocompleteViewController: UITableViewDataSource { let currentTheme = ThemeManager.shared.currentTheme - cell.updateFor(query: query, suggestion: suggestions[indexPath.row], with: currentTheme) + cell.updateFor(query: query, + suggestion: suggestions[indexPath.row], + with: currentTheme, + isAddressBarAtBottom: appSettings.currentAddressBarPosition.isBottom) cell.plusButton.tag = indexPath.row - let color = indexPath.row == selectedItem ? currentTheme.tableCellSelectedColor : UIColor(designSystemColor: .panel) - - cell.backgroundColor = color + let baseBackgroundColor = isPad ? UIColor(designSystemColor: .panel) : UIColor(designSystemColor: .background) + let backgroundColor = indexPath.row == selectedItem ? currentTheme.tableCellSelectedColor : baseBackgroundColor + + cell.backgroundColor = backgroundColor cell.tintColor = currentTheme.autocompleteCellAccessoryColor cell.setHighlightedStateBackgroundColor(currentTheme.tableCellHighlightedBackgroundColor) @@ -229,14 +249,24 @@ extension AutocompleteViewController: UITableViewDataSource { } let currentTheme = ThemeManager.shared.currentTheme - cell.backgroundColor = UIColor(designSystemColor: .panel) + cell.backgroundColor = appSettings.currentAddressBarPosition.isBottom ? + UIColor(designSystemColor: .background) : + UIColor(designSystemColor: .panel) + cell.tintColor = currentTheme.autocompleteCellAccessoryColor cell.label?.textColor = currentTheme.tableCellTextColor cell.setHighlightedStateBackgroundColor(currentTheme.tableCellHighlightedBackgroundColor) - + return cell } + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + if appSettings.currentAddressBarPosition.isBottom && suggestions.isEmpty { + return view.frame.height + } + return 46 + } + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return receivedResponse ? max(Constants.minItems, suggestions.count) : 0 } diff --git a/DuckDuckGo/AutocompleteViewControllerDelegate.swift b/DuckDuckGo/AutocompleteViewControllerDelegate.swift index d345970988..fbb0b6d9fb 100644 --- a/DuckDuckGo/AutocompleteViewControllerDelegate.swift +++ b/DuckDuckGo/AutocompleteViewControllerDelegate.swift @@ -28,6 +28,7 @@ protocol AutocompleteViewControllerDelegate: AnyObject { func autocomplete(pressedPlusButtonForSuggestion suggestion: Suggestion) func autocompleteWasDismissed() + } protocol AutocompleteViewControllerPresentationDelegate: AnyObject { diff --git a/DuckDuckGo/Base.lproj/DaxOnboarding.storyboard b/DuckDuckGo/Base.lproj/DaxOnboarding.storyboard index f9ac8b1264..f95f44d472 100644 --- a/DuckDuckGo/Base.lproj/DaxOnboarding.storyboard +++ b/DuckDuckGo/Base.lproj/DaxOnboarding.storyboard @@ -1,9 +1,9 @@ - + - + @@ -149,7 +149,7 @@ DuckDuckGo! - + @@ -161,7 +161,7 @@ DuckDuckGo! - +