-
Notifications
You must be signed in to change notification settings - Fork 415
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
Hide all connection details when the VPN isn’t connected #3053
Hide all connection details when the VPN isn’t connected #3053
Conversation
if statusModel.isNetPEnabled && statusModel.shouldShowConnectionDetails && statusModel.ipAddress != nil { | ||
connectionDetails() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be changed before merging, the correct fix is to make sure that shouldShowConnectionDetails
is accurate. I'm opening the PR now anyway since I need these changes for another branch, but will aim to update this by EOD.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I posted this in MM but cross-posting here so it's easy to track the conversation. I think the GUI logic is just wrong here, and I wouldn't change BSK.
Showing or hiding UI shouldn't rely directly on notifications, but on local state. In this case it should rely on connection status. This is the way macOS does it.
We don't ever want to show details when disconnected, and we always want to show details when connected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved, great catch - dunno how I missed this.
Still I think the issue is really in the UI code: see my comment.
if statusModel.isNetPEnabled && statusModel.shouldShowConnectionDetails && statusModel.ipAddress != nil { | ||
connectionDetails() | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I posted this in MM but cross-posting here so it's easy to track the conversation. I think the GUI logic is just wrong here, and I wouldn't change BSK.
Showing or hiding UI shouldn't rely directly on notifications, but on local state. In this case it should rely on connection status. This is the way macOS does it.
We don't ever want to show details when disconnected, and we always want to show details when connected.
I'm going ahead to merge so this goes out in the internal. |
# Via GitHub * main: Hide all connection details when the VPN isn’t connected (#3053) # Conflicts: # DuckDuckGo/NetworkProtectionStatusView.swift # DuckDuckGo/NetworkProtectionStatusViewModel.swift
Task/Issue URL: https://app.asana.com/0/1199333091098016/1207750283125995/f
Tech Design URL:
CC:
Description:
This PR fixes an issue with the VPN showing connection details for the last connection, even after disconnecting.
See https://github.com/duckduckgo/BrowserServicesKit/pull/858/files for where the issue was introduced - rather than modify that code, I'm adding checks on the iOS VPN UI side to ensure we only show the status row when appropriate.
Steps to test this PR:
Definition of Done (Internal Only):
Copy Testing:
’
rather than'
Orientation Testing:
Device Testing:
OS Testing:
Theme Testing:
Internal references:
Software Engineering Expectations
Technical Design Template