Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add feature-flagged VPN Settings Pane. #1858

Merged
merged 48 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
07502b4
Implemented the VPN settings pane
diegoreymendez Nov 10, 2023
599ae79
Merge branch 'develop' into diego/vpn-settings
diegoreymendez Nov 10, 2023
f38eb84
Re-implemented connect on login
diegoreymendez Nov 10, 2023
e3c199a
Implements the option to show the menu, brings several other improvem…
diegoreymendez Nov 13, 2023
7ee6bcd
Improves localization, implements VPN uninstallation
diegoreymendez Nov 13, 2023
4d4df9b
Adds option to open App showing our vpn settings
diegoreymendez Nov 13, 2023
1e13253
Added a fix so that a new window will be opened if needed when trying…
diegoreymendez Nov 15, 2023
5a161b5
Merges the latest from develop
diegoreymendez Nov 15, 2023
2a07527
Implements notification settings
diegoreymendez Nov 15, 2023
c73aa79
Feature flagged the new VPN Settings tab
diegoreymendez Nov 15, 2023
15635e5
Corrected the uninstall designs + copy
diegoreymendez Nov 15, 2023
762c329
Merge branch 'develop' into diego/vpn-settings
diegoreymendez Nov 15, 2023
b1f1b40
Updates BSK
diegoreymendez Nov 15, 2023
eea3f2a
Updates BSK
diegoreymendez Nov 15, 2023
18e8014
Fixes swiftlint violations
diegoreymendez Nov 15, 2023
f6d049a
Corrects a mistake
diegoreymendez Nov 15, 2023
538bec9
Renames TunnelSettings to VPNSettings. Cross platform improvements fo…
diegoreymendez Nov 16, 2023
9ab40c9
Removes NetworkProtectionUserDefaultsConstants.swift
diegoreymendez Nov 16, 2023
74fd824
Removes the show-vpn-settings feature flag
diegoreymendez Nov 16, 2023
5efc7b2
Updates BSK
diegoreymendez Nov 16, 2023
93d20f8
Updates BSK
diegoreymendez Nov 16, 2023
4e3170d
Fixes some swiftlint warnings
diegoreymendez Nov 16, 2023
0c9384d
Updates BSK
diegoreymendez Nov 17, 2023
4463e49
Open a new window with a tab collection directly.
samsymons Nov 17, 2023
55071ed
Corrects the copy for VPN settings
diegoreymendez Nov 17, 2023
d56cd0a
Merge branch 'diego/vpn-settings' of github.com:duckduckgo/macos-brow…
diegoreymendez Nov 17, 2023
8c2c618
Adjusted several small mistakes in the copy
diegoreymendez Nov 17, 2023
26ca943
Fixes copy errors
diegoreymendez Nov 17, 2023
038208f
Fixes the VPN settings so that they're only visible if NetP has been …
diegoreymendez Nov 20, 2023
0ab83fe
Hides the 'Uninstall...' button when the VPN is not installed
diegoreymendez Nov 20, 2023
dec1643
Makes several UI adjustments
diegoreymendez Nov 20, 2023
c2655e8
Removes some unnecessary code
diegoreymendez Nov 20, 2023
21d8639
Code cleanup, and ship review changes
diegoreymendez Nov 22, 2023
94a95f6
Updates BSK
diegoreymendez Nov 22, 2023
85ff1f3
Merge branch 'develop' of github.com:duckduckgo/macos-browser into de…
diegoreymendez Nov 22, 2023
6b6d7da
Updates to the latest from develop and the latest BSK
diegoreymendez Nov 22, 2023
e61f393
Remove the VPN settings pane when the VPN is uninstalled
diegoreymendez Nov 23, 2023
79ae572
Fixes the VPN uninstall error handling so that it won't uninstall if …
diegoreymendez Nov 23, 2023
4ce92e6
Uninstalling NetP now shows a confirmation bubble
diegoreymendez Nov 23, 2023
4706c7c
Fixes some final issues
diegoreymendez Nov 23, 2023
06bb1ed
Merge branch 'develop' into diego/vpn-settings
samsymons Nov 27, 2023
206985d
Fix merge issues and sandboxed build compilation.
samsymons Nov 27, 2023
bd8e2d0
Fix test compilation.
samsymons Nov 27, 2023
4300489
Fix SwiftLint violations.
samsymons Nov 27, 2023
4849b7b
Fix whitespace… again?
samsymons Nov 27, 2023
841e098
Merge branch 'develop' into diego/vpn-settings
samsymons Nov 28, 2023
0bc21e1
Fix post-merge issues.
samsymons Nov 28, 2023
c37d3d8
Set BSK to 86.0.0.
samsymons Nov 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 36 additions & 2 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2906,7 +2906,17 @@
7B5F9A752AE2BE4E002AEBC0 /* PixelKit in Frameworks */ = {isa = PBXBuildFile; productRef = 7B5F9A742AE2BE4E002AEBC0 /* PixelKit */; };
7B6D98672ADEB4B000CD35FE /* DataBrokerProtectionLoginItemScheduler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B6D98662ADEB4B000CD35FE /* DataBrokerProtectionLoginItemScheduler.swift */; };
7B74F2482ADEB03900147283 /* PixelKit in Frameworks */ = {isa = PBXBuildFile; productRef = 7B74F2472ADEB03900147283 /* PixelKit */; };
7B8BF22B2AFD698C00A9E03E /* PreferencesVPNView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B8BF22A2AFD698C00A9E03E /* PreferencesVPNView.swift */; };
7B8BF22C2AFD698C00A9E03E /* PreferencesVPNView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B8BF22A2AFD698C00A9E03E /* PreferencesVPNView.swift */; };
7B8BF22D2AFD698C00A9E03E /* PreferencesVPNView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B8BF22A2AFD698C00A9E03E /* PreferencesVPNView.swift */; };
7B8BF22E2AFD698C00A9E03E /* PreferencesVPNView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B8BF22A2AFD698C00A9E03E /* PreferencesVPNView.swift */; };
7B8BF2302AFD6A1800A9E03E /* VPNPreferencesModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B8BF22F2AFD6A1800A9E03E /* VPNPreferencesModel.swift */; };
7B8BF2312AFD6A1800A9E03E /* VPNPreferencesModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B8BF22F2AFD6A1800A9E03E /* VPNPreferencesModel.swift */; };
7B8BF2322AFD6A1800A9E03E /* VPNPreferencesModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B8BF22F2AFD6A1800A9E03E /* VPNPreferencesModel.swift */; };
7B8BF2332AFD6A1800A9E03E /* VPNPreferencesModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B8BF22F2AFD6A1800A9E03E /* VPNPreferencesModel.swift */; };
7B8C083C2AE1268E00F4C67F /* PixelKit in Frameworks */ = {isa = PBXBuildFile; productRef = 7B8C083B2AE1268E00F4C67F /* PixelKit */; };
7B90625A2AFE6E54006B8C6E /* LoginItems in Frameworks */ = {isa = PBXBuildFile; productRef = 7B9062592AFE6E54006B8C6E /* LoginItems */; };
7B90625C2AFE6E5A006B8C6E /* LoginItems in Frameworks */ = {isa = PBXBuildFile; productRef = 7B90625B2AFE6E5A006B8C6E /* LoginItems */; };
7B934C412A866DD400FC8F9C /* UserDefaults+NetworkProtectionShared.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B934C402A866DD400FC8F9C /* UserDefaults+NetworkProtectionShared.swift */; };
7B96D0DC2ADFDB8E007E02C8 /* DataBrokerProtectionPixelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B96D0DB2ADFDB8E007E02C8 /* DataBrokerProtectionPixelTests.swift */; };
7BA4727D26F01BC400EAA165 /* CoreDataTestUtilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B9292C42667104B00AD2C21 /* CoreDataTestUtilities.swift */; };
Expand Down Expand Up @@ -4343,6 +4353,8 @@
7B6EC5E42AE2D8AF004FE6DF /* DuckDuckGoDBPAgentAppStore.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = DuckDuckGoDBPAgentAppStore.xcconfig; sourceTree = "<group>"; };
7B6EC5E52AE2D8AF004FE6DF /* DuckDuckGoDBPAgent.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = DuckDuckGoDBPAgent.xcconfig; sourceTree = "<group>"; };
7B76E6852AD5D77600186A84 /* XPCHelper */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = XPCHelper; sourceTree = "<group>"; };
7B8BF22A2AFD698C00A9E03E /* PreferencesVPNView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PreferencesVPNView.swift; sourceTree = "<group>"; };
7B8BF22F2AFD6A1800A9E03E /* VPNPreferencesModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VPNPreferencesModel.swift; sourceTree = "<group>"; };
7B934C3D2A866CFF00FC8F9C /* NetworkProtectionOnboardingMenu.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NetworkProtectionOnboardingMenu.swift; sourceTree = "<group>"; };
7B934C402A866DD400FC8F9C /* UserDefaults+NetworkProtectionShared.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UserDefaults+NetworkProtectionShared.swift"; sourceTree = "<group>"; };
7B96D0CF2ADFDA7E007E02C8 /* DuckDuckGoDBPTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = DuckDuckGoDBPTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
Expand Down Expand Up @@ -5051,6 +5063,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
7B90625A2AFE6E54006B8C6E /* LoginItems in Frameworks */,
7BEEA5122AD1235B00A9E72B /* NetworkProtectionIPC in Frameworks */,
7BA7CC5F2AD1210C0042E5CE /* Networking in Frameworks */,
7BEEA5162AD1236E00A9E72B /* NetworkProtectionUI in Frameworks */,
Expand All @@ -5069,6 +5082,7 @@
7BEEA5142AD1236300A9E72B /* NetworkProtectionIPC in Frameworks */,
EE7295EF2A545C12008C0991 /* NetworkProtection in Frameworks */,
4B2D067F2A1334D700DE1F49 /* NetworkProtectionUI in Frameworks */,
7B90625C2AFE6E5A006B8C6E /* LoginItems in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -5627,6 +5641,7 @@
3776582E27F82E62009A6B35 /* AutofillPreferences.swift */,
37CD54C327F2FDD100F1F7B9 /* DownloadsPreferences.swift */,
37CD54C527F2FDD100F1F7B9 /* AboutModel.swift */,
7B8BF22F2AFD6A1800A9E03E /* VPNPreferencesModel.swift */,
);
path = Model;
sourceTree = "<group>";
Expand Down Expand Up @@ -5721,6 +5736,7 @@
379DE4BC27EA31AC002CC3DE /* PreferencesAutofillView.swift */,
37CC53EF27E8D1440028713D /* PreferencesDownloadsView.swift */,
37AFCE9127DB8CAD00471A10 /* PreferencesAboutView.swift */,
7B8BF22A2AFD698C00A9E03E /* PreferencesVPNView.swift */,
);
path = View;
sourceTree = "<group>";
Expand Down Expand Up @@ -8834,6 +8850,7 @@
7BEEA5152AD1236E00A9E72B /* NetworkProtectionUI */,
7BEC182E2AD5D8DC00D30536 /* SystemExtensionManager */,
7BFCB74D2ADE7E1A00DA3EA7 /* PixelKit */,
7B9062592AFE6E54006B8C6E /* LoginItems */,
);
productName = DuckDuckGoAgent;
productReference = 4B2D06392A11CFBB00DE1F49 /* DuckDuckGo VPN.app */;
Expand All @@ -8859,6 +8876,7 @@
7BA7CC602AD1211C0042E5CE /* Networking */,
7BEEA5132AD1236300A9E72B /* NetworkProtectionIPC */,
7BFCB74F2ADE7E2300DA3EA7 /* PixelKit */,
7B90625B2AFE6E5A006B8C6E /* LoginItems */,
);
productName = DuckDuckGoAgentAppStore;
productReference = 4B2D06692A13318400DE1F49 /* DuckDuckGo VPN App Store.app */;
Expand Down Expand Up @@ -10304,6 +10322,7 @@
3192A0902A4C4CFF0084EA89 /* NSSavePanelExtension.swift in Sources */,
3192A0912A4C4CFF0084EA89 /* AppPrivacyConfigurationDataProvider.swift in Sources */,
BB8705162A96324B003359A2 /* WKBackForwardListExtension.swift in Sources */,
7B8BF22D2AFD698C00A9E03E /* PreferencesVPNView.swift in Sources */,
318115E52A8A4F3300129796 /* CredentialsCleanupErrorHandling.swift in Sources */,
3192A0922A4C4CFF0084EA89 /* LinkButton.swift in Sources */,
3192A0932A4C4CFF0084EA89 /* TemporaryFileHandler.swift in Sources */,
Expand Down Expand Up @@ -10593,6 +10612,7 @@
3192A1942A4C4CFF0084EA89 /* BookmarkList.swift in Sources */,
3192A1952A4C4CFF0084EA89 /* NEOnDemandRuleExtension.swift in Sources */,
31C5FFB92AF64D120008A79F /* DataBrokerProtectionFeatureVisibility.swift in Sources */,
7B8BF2322AFD6A1800A9E03E /* VPNPreferencesModel.swift in Sources */,
3192A1962A4C4CFF0084EA89 /* BookmarkTableRowView.swift in Sources */,
3192A1972A4C4CFF0084EA89 /* FavoritesView.swift in Sources */,
3192A1982A4C4CFF0084EA89 /* HomePage.swift in Sources */,
Expand Down Expand Up @@ -10904,6 +10924,7 @@
3707C71F294B5D2900682A9F /* WKUserContentControllerExtension.swift in Sources */,
3706FB1A293F65D500E42796 /* OutlineSeparatorViewCell.swift in Sources */,
3706FB1B293F65D500E42796 /* SafariDataImporter.swift in Sources */,
7B8BF2312AFD6A1800A9E03E /* VPNPreferencesModel.swift in Sources */,
3706FB1D293F65D500E42796 /* StatisticsLoader.swift in Sources */,
3793FDD829535EBA00A2E28F /* Assertions.swift in Sources */,
3706FB1E293F65D500E42796 /* WebsiteBreakageReporter.swift in Sources */,
Expand Down Expand Up @@ -11254,6 +11275,7 @@
3706FC2F293F65D500E42796 /* MouseOverButton.swift in Sources */,
3706FC30293F65D500E42796 /* FireInfoViewController.swift in Sources */,
3706FC31293F65D500E42796 /* PermissionButton.swift in Sources */,
7B8BF22C2AFD698C00A9E03E /* PreferencesVPNView.swift in Sources */,
3706FC32293F65D500E42796 /* MoreOptionsMenu.swift in Sources */,
3706FC34293F65D500E42796 /* PermissionAuthorizationViewController.swift in Sources */,
3706FC35293F65D500E42796 /* BookmarkNode.swift in Sources */,
Expand Down Expand Up @@ -12116,6 +12138,7 @@
4B957A702AC7AE700062CA31 /* RecentlyClosedCoordinator.swift in Sources */,
4B957A712AC7AE700062CA31 /* URLRequestExtension.swift in Sources */,
4B957A722AC7AE700062CA31 /* FaviconHostReference.swift in Sources */,
7B8BF22E2AFD698C00A9E03E /* PreferencesVPNView.swift in Sources */,
4B957A732AC7AE700062CA31 /* DownloadsTabExtension.swift in Sources */,
4B957A742AC7AE700062CA31 /* WebsiteBreakageSender.swift in Sources */,
4B957A752AC7AE700062CA31 /* ASN1Parser.swift in Sources */,
Expand Down Expand Up @@ -12298,6 +12321,7 @@
4B957B232AC7AE700062CA31 /* WaitlistRootView.swift in Sources */,
4B957B242AC7AE700062CA31 /* YoutubeOverlayUserScript.swift in Sources */,
4B957B252AC7AE700062CA31 /* DictionaryExtension.swift in Sources */,
7B8BF2332AFD6A1800A9E03E /* VPNPreferencesModel.swift in Sources */,
4B957B262AC7AE700062CA31 /* Publishers.NestedObjectChanges.swift in Sources */,
4B957B272AC7AE700062CA31 /* MenuItemSelectors.swift in Sources */,
4B957B282AC7AE700062CA31 /* FaviconView.swift in Sources */,
Expand Down Expand Up @@ -12802,6 +12826,7 @@
31B9226C288054D5001F55B7 /* CookieConsentPopoverManager.swift in Sources */,
4BE65474271FCD40008D1D63 /* PasswordManagementIdentityItemView.swift in Sources */,
B6F41031264D2B23003DA42C /* ProgressExtension.swift in Sources */,
7B8BF2302AFD6A1800A9E03E /* VPNPreferencesModel.swift in Sources */,
4B723E0F26B0006500E14D75 /* CSVParser.swift in Sources */,
B6DA44082616B30600DD1EC2 /* PixelDataModel.xcdatamodeld in Sources */,
B63BDF7E27FDAA640072D75B /* PrivacyDashboardWebView.swift in Sources */,
Expand Down Expand Up @@ -12845,6 +12870,7 @@
AA5C8F632591021700748EB7 /* NSApplicationExtension.swift in Sources */,
AA9E9A5625A3AE8400D1959D /* NSWindowExtension.swift in Sources */,
7BD3AF5D2A8E7AF1006F9F56 /* KeychainType+ClientDefault.swift in Sources */,
7B8BF22B2AFD698C00A9E03E /* PreferencesVPNView.swift in Sources */,
370A34B12AB24E3700C77F7C /* SyncDebugMenu.swift in Sources */,
AAC5E4C725D6A6E8007F5990 /* BookmarkPopover.swift in Sources */,
37CC53F027E8D1440028713D /* PreferencesDownloadsView.swift in Sources */,
Expand Down Expand Up @@ -14430,8 +14456,8 @@
isa = XCRemoteSwiftPackageReference;
repositoryURL = "https://github.com/duckduckgo/BrowserServicesKit";
requirement = {
kind = exactVersion;
version = 84.0.1;
kind = revision;
revision = d1784c9240204ece3349e8cd65b621876653c4d0;
};
};
AA06B6B52672AF8100F541C5 /* XCRemoteSwiftPackageReference "Sparkle" */ = {
Expand Down Expand Up @@ -14872,6 +14898,14 @@
isa = XCSwiftPackageProductDependency;
productName = PixelKit;
};
7B9062592AFE6E54006B8C6E /* LoginItems */ = {
isa = XCSwiftPackageProductDependency;
productName = LoginItems;
};
7B90625B2AFE6E5A006B8C6E /* LoginItems */ = {
isa = XCSwiftPackageProductDependency;
productName = LoginItems;
};
7BA59C9A2AE18B49009A97B1 /* SystemExtensionManager */ = {
isa = XCSwiftPackageProductDependency;
productName = SystemExtensionManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
"kind" : "remoteSourceControl",
"location" : "https://github.com/duckduckgo/BrowserServicesKit",
"state" : {
"revision" : "075773533bfca9196115674d2ab1b085570854dd",
"version" : "84.0.1"
"revision" : "d1784c9240204ece3349e8cd65b621876653c4d0"
}
},
{
Expand Down Expand Up @@ -129,7 +128,7 @@
{
"identity" : "trackerradarkit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/duckduckgo/TrackerRadarKit.git",
"location" : "https://github.com/duckduckgo/TrackerRadarKit",
"state" : {
"revision" : "4684440d03304e7638a2c8086895367e90987463",
"version" : "1.2.1"
Expand Down
2 changes: 2 additions & 0 deletions DuckDuckGo/Application/URLEventHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ final class URLEventHandler {
Task {
await WindowControllersManager.shared.showNetworkProtectionStatus()
}
case AppLaunchCommand.showSettings.launchURL:
WindowControllersManager.shared.showPreferencesTab(withSelectedPane: .vpn)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory I could open URL "about:preferences/vpn" but when I tried doing this it was failing for some reason. This should be fine too I guess.

default:
return
}
Expand Down
12 changes: 12 additions & 0 deletions DuckDuckGo/Assets.xcassets/Images/VPN.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "VPN-Multicolor-16 1.pdf",
samsymons marked this conversation as resolved.
Show resolved Hide resolved
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ extension UserText {
// MARK: - Navigation Bar Status View

static let networkProtectionNavBarStatusViewShareFeedback = NSLocalizedString("network.protection.navbar.status.view.share.feedback", value: "Share Feedback...", comment: "Menu item for 'Share Feedback' in the Network Protection status view that's shown in the navigation bar")
static let networkProtectionStatusMenuOpenDuckDuckGo = NSLocalizedString("network.protection.status.menu.open.duckduckgo", value: "Open DuckDuckGo...", comment: "The status menu 'Open DuckDuckGo' menu item")
static let networkProtectionNavBarStatusMenuVPNSettings = NSLocalizedString("network.protection.status.menu.vpn.settings", value: "VPN Settings...", comment: "The status menu 'VPN Settings' menu item")

// MARK: - System Extension Installation Messages

Expand Down
Loading
Loading