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

Launch VPN Location screen from status view #2077

Merged
merged 25 commits into from
Jan 25, 2024

Conversation

graeme
Copy link
Collaborator

@graeme graeme commented Jan 17, 2024

Task/Issue URL: https://app.asana.com/0/1199230911884351/1206362436696619/f
BSK PR: duckduckgo/BrowserServicesKit#627

Description:

Updates the server location item on the VPN status view to be a link button which triggers the opening of the VPN Locations sheet. Also improves the loading state on this view as it’s more pronounced now that it can’t be preloaded before displaying.

Steps to test this PR:

  1. Make sure you’re internal
  2. Start Network Protection
  3. Go to each of the status views (macOS menu bar + … menu) and click the location link
  4. You should be taken to the VPN Locations screen

Internal references:

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

static let networkProtectionServerLocationUnknown = NSLocalizedString("network.protection.server.location.unknown", value: "Unknown", comment: "When we can't tell the user the location of the NetP server")
static let networkProtectionServerLocationUnknown = NSLocalizedString("network.protection.server.location.unknown", value: "Unknown...", comment: "When we can't tell the user the location of the NetP server")
static func networkProtectionFormattedServerLocation(_ location: String) -> String {
let localized = NSLocalizedString("network.protection.server.location.link", value: "%@...", comment: "Clickable text linking to the server location picker screen")
Copy link
Collaborator

Choose a reason for hiding this comment

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

I mentioned this as a possible bug in the O-N Apple channel, not realizing that the ellipsis addition is to indicate that this label is now clickable. 🤦

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 great for me, nice work!

@graeme
Copy link
Collaborator Author

graeme commented Jan 19, 2024

Holding off on merging this until Ship Review is approved as the code cannot be feature flagged.

@graeme graeme requested a review from diegoreymendez January 24, 2024 15:06
graeme and others added 3 commits January 25, 2024 13:26
Task/Issue URL: https://app.asana.com/0/0/1206417809840737/f
Design review Task/Issue URL:
https://app.asana.com/0/0/1206382695809291/f
Copy review Task/Issue URL:
https://app.asana.com/0/38424471409662/1206382794710141/f

**Description**:
Design and copy review. Includes:
- [x] The list seems to load each time when I open it. I thought we'd
cache it after opening it for the first time. Is this something we need
to add?
- [x] Could we make the dialog slightly larger vertically (max-height?)
so we use more screen real estate?
- [x] For the US city drop-down, can we make the width of it larger so
it can show the full city names?
- [x] The country label text-color is slightly off. It should be the
same color as the IP address.
- [x] I think we could actually remove the spinner, the list loads
pretty fast.

**Steps to test this PR**:
1. Enabled Network Protection
2. Go to the various Status View UIs, the VPN Locations sheet and the
VPN preferences screen and check that this feedback has been addressed.

—
###### Internal references:
[Pull Request Review
Checklist](https://app.asana.com/0/1202500774821704/1203764234894239/f)
[Software Engineering
Expectations](https://app.asana.com/0/59792373528535/199064865822552)
[Technical Design
Template](https://app.asana.com/0/59792373528535/184709971311943)
[Pull Request
Documentation](https://app.asana.com/0/1202500774821704/1204012835277482/f)
@graeme graeme merged commit ebcd93c into main Jan 25, 2024
14 checks passed
@graeme graeme deleted the graeme/macos-vpn-status-view-link-to-locations-2 branch January 25, 2024 12:57
samsymons added a commit that referenced this pull request Jan 25, 2024
# By Alexey Martemyanov (11) and others
# Via Dominik Kapusta (3) and others
* main: (56 commits)
  Adds info about whether the login items are actually running (#2122)
  Remove connection status awaiter. (#2121)
  Launch VPN Location screen from status view  (#2077)
  Display different copy in alerts when a flag is enabled in a newer version (#2114)
  Remove delayed webView attaching to main window (#2116)
  Always start onboarding from the beginning when shown (#2117)
  Update spacing between UI components in settings (#2109)
  Show history menu on cmd+y shortcut (#2112)
  Bump version to 1.72.0 (112)
  Update embedded files
  fix WebView value validation popover crash when WebView not in hierarchy (#2108)
  Fix agent startup (#2107)
  Support brand UA (#2085)
  fix Safari favicons import (#2106)
  Add page attributes to print settings (#2104)
  Bump version to 1.72.0 (111)
  Alex/disable onboarding existing users (#2105)
  Bump version to 1.71.2 (110)
  Fixes a multithreading issue in `NetworkConnectionTester` (BSK) (#2102)
  Avoid sending latency immediately after the monitor starts (#2103)
  ...

# Conflicts:
#	Configuration/BuildNumber.xcconfig
#	DuckDuckGo/VPNFeedbackForm/VPNMetadataCollector.swift
#	UnitTests/VPNFeedbackForm/VPNFeedbackFormViewModelTests.swift
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