Skip to content

Commit

Permalink
VPN Settings pane changes for App Exclusions (behind feature flag) (#…
Browse files Browse the repository at this point in the history
…3771)

Task/Issue URL:
https://app.asana.com/0/1206580121312550/1209150117333881/f

## Important note

While several files are changed, most of the changes are just due to the
change to PreferencesUI and should be easy to validate.

## Description

We're introducing the first changes to implement App Exclusions behind a
feature flag.
We're also unifying some shareable UI components for macOS preferences
under a new Framework named PreferencesUI.

Here's the link to [the Figma
design](https://www.figma.com/design/y7g8d3Nuefhfedq4638Rhu/VPN%3A-Domain-and-App-exclusions-on-Windows?node-id=134-18153&p=f&m=dev)
for reference.
  • Loading branch information
diegoreymendez authored Jan 29, 2025
1 parent db394d8 commit 7399629
Show file tree
Hide file tree
Showing 52 changed files with 812 additions and 78 deletions.
27 changes: 18 additions & 9 deletions DuckDuckGo-macOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,6 @@
373B2F862C387B840013A94B /* ActiveRemoteMessageModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 373B2F802C384DEB0013A94B /* ActiveRemoteMessageModelTests.swift */; };
373D9B4829EEAC1B00381FDD /* SyncMetadataDatabase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 373D9B4729EEAC1B00381FDD /* SyncMetadataDatabase.swift */; };
373D9B4929EEAC1B00381FDD /* SyncMetadataDatabase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 373D9B4729EEAC1B00381FDD /* SyncMetadataDatabase.swift */; };
373FB4B32B4D6C4B004C88D6 /* PreferencesViews in Frameworks */ = {isa = PBXBuildFile; productRef = 373FB4B22B4D6C4B004C88D6 /* PreferencesViews */; };
374286252CC5940100E66323 /* HomePageSettingsVisibilityModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 374286242CC593F900E66323 /* HomePageSettingsVisibilityModelTests.swift */; };
374286262CC5940100E66323 /* HomePageSettingsVisibilityModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 374286242CC593F900E66323 /* HomePageSettingsVisibilityModelTests.swift */; };
37445F992A1566420029F789 /* SyncDataProviders.swift in Sources */ = {isa = PBXBuildFile; fileRef = 37445F982A1566420029F789 /* SyncDataProviders.swift */; };
Expand Down Expand Up @@ -1926,6 +1925,8 @@
7BEC20432B0F505F00243D3E /* AddBookmarkPopoverView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BEC20402B0F505F00243D3E /* AddBookmarkPopoverView.swift */; };
7BEC20452B0F505F00243D3E /* AddBookmarkFolderPopoverView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BEC20412B0F505F00243D3E /* AddBookmarkFolderPopoverView.swift */; };
7BEC20462B0F505F00243D3E /* AddBookmarkFolderPopoverView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BEC20412B0F505F00243D3E /* AddBookmarkFolderPopoverView.swift */; };
7BECF1A92D4905DA00C1D691 /* PreferencesUI-macOS in Frameworks */ = {isa = PBXBuildFile; productRef = 7BECF1A82D4905DA00C1D691 /* PreferencesUI-macOS */; };
7BECF1AB2D4905E000C1D691 /* PreferencesUI-macOS in Frameworks */ = {isa = PBXBuildFile; productRef = 7BECF1AA2D4905E000C1D691 /* PreferencesUI-macOS */; };
7BEEA5122AD1235B00A9E72B /* NetworkProtectionIPC in Frameworks */ = {isa = PBXBuildFile; productRef = 7BEEA5112AD1235B00A9E72B /* NetworkProtectionIPC */; };
7BEEA5142AD1236300A9E72B /* NetworkProtectionIPC in Frameworks */ = {isa = PBXBuildFile; productRef = 7BEEA5132AD1236300A9E72B /* NetworkProtectionIPC */; };
7BEEA5162AD1236E00A9E72B /* NetworkProtectionUI in Frameworks */ = {isa = PBXBuildFile; productRef = 7BEEA5152AD1236E00A9E72B /* NetworkProtectionUI */; };
Expand Down Expand Up @@ -3424,7 +3425,7 @@
/* Begin PBXCopyFilesBuildPhase section */
4B2D065D2A11D2AE00DE1F49 /* Embed Login Items */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
buildActionMask = 12;
dstPath = Contents/Library/LoginItems;
dstSubfolderSpec = 1;
files = (
Expand Down Expand Up @@ -4195,6 +4196,7 @@
7BB4BC622C5BC13D00E06FC8 /* ActiveSiteInfoPublisher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActiveSiteInfoPublisher.swift; sourceTree = "<group>"; };
7BB4BC692C5CD96200E06FC8 /* ActiveDomainPublisher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ActiveDomainPublisher.swift; sourceTree = "<group>"; };
7BBD45B02A691AB500C83CA9 /* NetworkProtectionDebugUtilities.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkProtectionDebugUtilities.swift; sourceTree = "<group>"; };
7BC5F7DF2D49044C0005B3D9 /* PreferencesUI-macOS */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = "PreferencesUI-macOS"; sourceTree = "<group>"; };
7BCB90C12C18626E008E3543 /* VPNControllerXPCClient+ConvenienceInitializers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "VPNControllerXPCClient+ConvenienceInitializers.swift"; sourceTree = "<group>"; };
7BD1688D2AD4A4C400D24876 /* NetworkExtensionController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkExtensionController.swift; sourceTree = "<group>"; };
7BD3AF5C2A8E7AF1006F9F56 /* KeychainType+ClientDefault.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "KeychainType+ClientDefault.swift"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -5056,7 +5058,6 @@
files = (
F1DF95E42BD1807C0045E591 /* Crashes in Frameworks */,
37DF37072CF38B9F005ED34B /* PrivacyStats in Frameworks */,
373FB4B32B4D6C4B004C88D6 /* PreferencesViews in Frameworks */,
4BF97AD32B43C43F00EB4240 /* NetworkProtectionUI in Frameworks */,
7B1459572B7D43E500047F2C /* NetworkProtectionProxy in Frameworks */,
B6F7128229F6820A00594A45 /* QuickLookUI.framework in Frameworks */,
Expand All @@ -5076,6 +5077,7 @@
3706FCA7293F65D500E42796 /* BrowserServicesKit in Frameworks */,
C18BF9CE2C73678C00ED6B8A /* Freemium in Frameworks */,
3129788A2B64131200B67619 /* DataBrokerProtection in Frameworks */,
7BECF1AB2D4905E000C1D691 /* PreferencesUI-macOS in Frameworks */,
F198C7202BD18D92000BF24D /* SwiftLintTool in Frameworks */,
4BCBE4582BA7E17800FC75A1 /* SubscriptionUI in Frameworks */,
379230962D3852860019E130 /* HistoryView in Frameworks */,
Expand Down Expand Up @@ -5335,6 +5337,7 @@
379230942D38527E0019E130 /* HistoryView in Frameworks */,
B6F7128129F681EB00594A45 /* QuickLookUI.framework in Frameworks */,
EE7295E32A545B9A008C0991 /* NetworkProtection in Frameworks */,
7BECF1A92D4905DA00C1D691 /* PreferencesUI-macOS in Frameworks */,
9807F645278CA16F00E1547B /* BrowserServicesKit in Frameworks */,
D6BC8AC62C5A95AA0025375B /* DuckPlayer in Frameworks */,
987799ED299998B1005D8EB6 /* Bookmarks in Frameworks */,
Expand Down Expand Up @@ -6021,15 +6024,16 @@
9DB6E7222AA0DA7A00A17F3C /* LoginItems */,
7B25FE322AD12C990012AFAB /* NetworkProtectionMac */,
374F18B32D006F940032EA4E /* NewTabPage */,
7BC5F7DF2D49044C0005B3D9 /* PreferencesUI-macOS */,
378F44E229B4B7B600899924 /* SwiftUIExtensions */,
1E862A882A9FC01200F84D4B /* SubscriptionUI */,
4B94B7512D471E7E0014AAB8 /* SyncUI-macOS */,
7BEC182D2AD5D89C00D30536 /* SystemExtensionManager */,
7B8594172B5B25FB0007EB3E /* UDSHelper */,
373DE97A2D3916FD000577EE /* UserScriptActionsManager */,
3772BEDF2D01A1400019B9EF /* Utilities */,
3720B7F82D00DA4500D20F23 /* WebKitExtensions */,
7B76E6852AD5D77600186A84 /* XPCHelper */,
4B94B7512D471E7E0014AAB8 /* SyncUI-macOS */,
);
path = LocalPackages;
sourceTree = "<group>";
Expand Down Expand Up @@ -10006,7 +10010,6 @@
4BF97AD02B43C43F00EB4240 /* NetworkProtectionIPC */,
4BF97AD22B43C43F00EB4240 /* NetworkProtectionUI */,
4BF97AD42B43C43F00EB4240 /* NetworkProtection */,
373FB4B22B4D6C4B004C88D6 /* PreferencesViews */,
312978892B64131200B67619 /* DataBrokerProtection */,
7B1459562B7D43E500047F2C /* NetworkProtectionProxy */,
85E2BBCF2B8F534A00DBEC7A /* History */,
Expand Down Expand Up @@ -10036,6 +10039,7 @@
5641734C2CFE169400F4B716 /* PixelExperimentKit */,
379230952D3852860019E130 /* HistoryView */,
4B94B79A2D4731F00014AAB8 /* SyncUI-macOS */,
7BECF1AA2D4905E000C1D691 /* PreferencesUI-macOS */,
);
productName = DuckDuckGo;
productReference = 3706FD05293F65D500E42796 /* DuckDuckGo App Store.app */;
Expand Down Expand Up @@ -10522,6 +10526,7 @@
5641734A2CFE168700F4B716 /* PixelExperimentKit */,
379230932D38527E0019E130 /* HistoryView */,
4B94B7982D4731E80014AAB8 /* SyncUI-macOS */,
7BECF1A82D4905DA00C1D691 /* PreferencesUI-macOS */,
);
productName = DuckDuckGo;
productReference = AA585D7E248FD31100E9A3E2 /* DuckDuckGo.app */;
Expand Down Expand Up @@ -15681,10 +15686,6 @@
package = 9807F643278CA16F00E1547B /* XCRemoteSwiftPackageReference "BrowserServicesKit" */;
productName = DDGSync;
};
373FB4B22B4D6C4B004C88D6 /* PreferencesViews */ = {
isa = XCSwiftPackageProductDependency;
productName = PreferencesViews;
};
374EFDEA2D01A1D800B30939 /* Utilities */ = {
isa = XCSwiftPackageProductDependency;
productName = Utilities;
Expand Down Expand Up @@ -16001,6 +16002,14 @@
isa = XCSwiftPackageProductDependency;
productName = SystemExtensionManager;
};
7BECF1A82D4905DA00C1D691 /* PreferencesUI-macOS */ = {
isa = XCSwiftPackageProductDependency;
productName = "PreferencesUI-macOS";
};
7BECF1AA2D4905E000C1D691 /* PreferencesUI-macOS */ = {
isa = XCSwiftPackageProductDependency;
productName = "PreferencesUI-macOS";
};
7BEEA5112AD1235B00A9E72B /* NetworkProtectionIPC */ = {
isa = XCSwiftPackageProductDependency;
productName = NetworkProtectionIPC;
Expand Down
15 changes: 15 additions & 0 deletions DuckDuckGo/Assets.xcassets/Images/Globe-16.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "Globe-16.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Binary file not shown.
15 changes: 15 additions & 0 deletions DuckDuckGo/Assets.xcassets/Images/Window-16.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "Window-16.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import AppKit
import Combine
import PreferencesViews
import PreferencesUI_macOS

protocol BookmarkManagementSidebarViewControllerDelegate: AnyObject {

Expand Down Expand Up @@ -90,7 +90,7 @@ final class BookmarkManagementSidebarViewController: NSViewController {
view.addSubview(scrollView)

tabSwitcherButton.translatesAutoresizingMaskIntoConstraints = false
tabSwitcherButton.font = PreferencesViews.Const.Fonts.popUpButton
tabSwitcherButton.font = PreferencesUI_macOS.Const.Fonts.popUpButton
tabSwitcherButton.setButtonType(.momentaryLight)
tabSwitcherButton.isBordered = false
tabSwitcherButton.target = self
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import SwiftUI
import SwiftUIExtensions
import PreferencesViews
import PreferencesUI_macOS

struct BookmarkFavoriteView: View {
@Binding var isFavorite: Bool
Expand Down
10 changes: 10 additions & 0 deletions DuckDuckGo/Common/Localizables/UserText+NetworkProtection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,12 @@ extension UserText {

static let vpnLocationTitle = NSLocalizedString("vpn.location.title", value: "Location", comment: "Location section title in VPN settings")

static let vpnExclusionsTitle = NSLocalizedString("vpn.exclusions.title", value: "Exclusions", comment: "Exclusions section title in VPN settings")

static let vpnExcludedSitesTitle = NSLocalizedString("vpn.excluded.sites.title", value: "Excluded Websites", comment: "Excluded Sites title in VPN settings")

static let vpnExcludedAppsTitle = NSLocalizedString("vpn.excluded.apps.title", value: "Excluded Apps", comment: "Excluded Apps title in VPN settings")

static let vpnGeneralTitle = NSLocalizedString("vpn.general.title", value: "General", comment: "General section title in VPN settings")

static let vpnShortcutsSettingsTitle = NSLocalizedString("vpn.shortcuts.settings.title", value: "Shortcuts", comment: "Shortcuts section title in VPN settings")
Expand Down Expand Up @@ -212,6 +216,12 @@ extension UserText {
return String(format: message, count)
}

// MARK: - Exclusions

static let vpnSettingsExclusionsDescription = NSLocalizedString("vpn.setting.exclusions.description", value: "Some websites and apps are not compatible with VPNs. Exclude these sites and apps to use them while connected to the VPN.", comment: "The description shown for the exclusions section in VPN settings")

static let vpnSettingsManageExclusionsButtonTitle = NSLocalizedString("vpn.setting.exclusions.manage.button.title", value: "Manage...", comment: "Title for the button to manage exclusions")

// MARK: - Excluded Domains

static let vpnExcludedDomainsDescription = NSLocalizedString("vpn.setting.excluded.domains.description", value: "Excluded websites will bypass the VPN.", comment: "Excluded Sites description")
Expand Down
Loading

0 comments on commit 7399629

Please sign in to comment.