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

Add feature-flagged VPN Settings Pane. #1858

merged 48 commits into from
Nov 28, 2023

Conversation

diegoreymendez
Copy link
Contributor

@diegoreymendez diegoreymendez commented Nov 15, 2023

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

BSK PR: duckduckgo/BrowserServicesKit#565
iOS PR: duckduckgo/iOS#2165

Description

Adds a feature-flagged VPN Settings Pane.

Designs

Settings Pane

Light Dark
Screenshot 2023-11-15 at 5 16 38 PM Screenshot 2023-11-15 at 5 16 28 PM

Uninstall confirmation alert

Light Dark
Screenshot 2023-11-15 at 5 16 49 PM Screenshot 2023-11-15 at 5 16 41 PM

Testing

Test in light and dark mode

Before running this make sure to disable our VPN agent using launchctl remove com.duckduckgo.macos.vpn.debug

  • Launch the app.
  • Reset Network Protection via the debug menu, and remove your auth token.
  • There should be no settings pane in the app settings.
  • Now enter an invite code via the easter egg flow, and enable NetP.
  • There should be a new VPN Settings pane in the app settings.
  • Selecting "VPN Settings" in the status menu bar item should open the VPN Settings pane.
  • Make sure the VPN Setting pane options work as described in each one.

Internal references:

Pull Request Review Checklist
Software Engineering Expectations
Technical Design Template
Pull Request Documentation

Copy link
Contributor

github-actions bot commented Nov 15, 2023

Warnings
⚠️ PR has more than 500 lines of code changing. Consider splitting into smaller PRs if possible.

Generated by 🚫 dangerJS against c37d3d8

@diegoreymendez diegoreymendez changed the title VPN Settings Add feature-flagged VPN Settings Pane. Nov 15, 2023
@@ -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.

@@ -48,7 +49,7 @@ public final class AppLauncher: AppLaunching {

public func launchApp(withCommand command: AppLaunchCommand) async {
let configuration = NSWorkspace.OpenConfiguration()
configuration.allowsRunningApplicationSubstitution = false
configuration.allowsRunningApplicationSubstitution = command.allowsRunningApplicationSubstitution
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are likely to commands to launch picking the open app instead of a new instance. This was previously false for our helper apps that required new instances. Now it's customizable by each command.

Copy link
Collaborator

@samsymons samsymons left a comment

Choose a reason for hiding this comment

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

This is working really nicely for me now, the code is nice as well. I still worry a bit about the timestamp checks we're doing for the login item, but I don't think it needs to block this.

diegoreymendez and others added 16 commits November 22, 2023 17:52
# By Dominik Kapusta (15) and others
# Via Dominik Kapusta (7) and Alexey Martemyanov (1)
* develop: (28 commits)
  Update embedded files
  1.65.2 (85)
  Use BSK 84.1.1-2
  Update embedded files
  1.64.4 (84)
  Update BSK to 83.0.0-4
  Fix migrating from Bookmarks V2 and older (#1889)
  Revert "Fix migrating from Bookmarks V2 and older"
  Fix migrating from Bookmarks V2 and older
  Fix bug where VPN location isn't respected (#1887)
  Bump Submodules/privacy-reference-tests from `7519c3d` to `a3acc21` (#1867)
  bump bsk for cbr user script energy optimisation  (#1888)
  Add folders from the Bookmark Creation Popover (#1861)
  DBP: Prepare database for external users (#1880)
  Address Bar Spoofing Remediations + Test Cases (#1815)
  1.65.1 (83)
  Update BSK ref
  Set version to 1.64.3 (82)
  Update embedded files
  Fix migration to form-factor-specific favorites (#1884)
  ...

# Conflicts:
#	DuckDuckGo.xcodeproj/project.pbxproj
#	DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved
# By Fernando Bunn
# Via GitHub
* develop:
  Add DBP App Group (#1894)

# Conflicts:
#	DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtection+ConvenienceInitializers.swift
#	DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionDebugMenu.swift
#	DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionNavBarPopoverManager.swift
#	DuckDuckGo/Waitlist/NetworkProtectionFeatureDisabler.swift
#	DuckDuckGoVPN/DuckDuckGoVPNAppDelegate.swift
@samsymons samsymons merged commit a6141af into develop Nov 28, 2023
16 checks passed
@samsymons samsymons deleted the diego/vpn-settings branch November 28, 2023 02:22
federicocappelli pushed a commit to duckduckgo/iOS that referenced this pull request Nov 28, 2023
federicocappelli pushed a commit to duckduckgo/BrowserServicesKit that referenced this pull request Nov 28, 2023
Task/Issue URL: https://app.asana.com/0/0/1205958731729757/f

iOS PR: duckduckgo/iOS#2165
macOS PR: duckduckgo/macos-browser#1858
What kind of version bump will this require?: Major/Minor/Patch

Description

Adds support for the settings we'll be showing in our macOS Settings pane.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants