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 connection detail toggle to connection view #7388

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

rablador
Copy link
Contributor

@rablador rablador commented Dec 20, 2024

The connection details should be shown/hidden depending on if the view is expanded or collapsed, via the tappable chevron. This PR does this, adds expandable state and implements the feature indicators in a feature complete package.

Note: This PR also includes https://linear.app/mullvad/issue/IOS-932/add-feature-indicator-pills-to-connection-details.

To do before release:

  • ☑️ Update E2E tests.
  • ☑️ Update screenshot tests.
  • ☑️ Remove old connection view code, eg. TunnelViewController, TunnelControllView, TunnelState+UI etc.
  • ☑️ Remove DEBUG flow and make connection view available in production (in TunnelCoordinator).

To do at some point:

  • ✅ Touch target for expandable chevron is off and small.
  • ☑️ Position location marker on the map correctly. Maybe align with the loading spinner?
  • ☑️ We should add a status indicator for when loading the outgoing ips.
  • ☑️ We should add animations for expanding/contracting as well as when state changes.
  • ☑️ We should add country and city to connection header when not connected, preferrably with a matching location marker.
  • 🐞 There's a bug when connecting and disconnecting where the buttom part of the connection view loses corner radius and is moved slightly upward. The behavior is inconsistent and require som bug bashing. Can't seem to trigger it anymore...
  • ✅ 🐞 If connecting/disconnecting repeatedly you will mess up the network and disable the connect button. This is by design, but there's a bug where the button does not get reenabled when network recovers.

Other:

  • ℹ️ Scrollviews cannot be made to not bounce on iOS 15 without hacks, so I left it as it is. This applies to the scrollview wrapping the connection details.

This change is Reviewable

@rablador rablador added the iOS Issues related to iOS label Dec 20, 2024
@rablador rablador requested a review from acb-mv December 20, 2024 09:00
@rablador rablador self-assigned this Dec 20, 2024
Copy link

linear bot commented Dec 20, 2024

@rablador rablador force-pushed the add-connection-detail-toggle-to-connection-view-ios-961 branch from ed4c80d to 5d3630b Compare December 20, 2024 09:02
@rablador rablador marked this pull request as draft December 20, 2024 09:11
@rablador rablador force-pushed the add-connection-detail-toggle-to-connection-view-ios-961 branch 3 times, most recently from f9a3da3 to 3e1c133 Compare December 20, 2024 10:30
Copy link
Contributor Author

@rablador rablador left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 32 files reviewed, 2 unresolved discussions


ios/MullvadRustRuntimeTests/MullvadPostQuantum+Stubs.swift line 15 at r1 (raw file):

@testable import WireGuardKitTypes

// swiftlint:disable function_parameter_count

Everything in this file is to make the unit tests work (currently failing when looking for MullvadTypes.WgFuncPointers).


ios/convert-assets.rb line 35 at r1 (raw file):

  "icon-fail.svg",
  "icon-info.svg",
  "icon-reload.svg",

Added as a pure SVG in project assets instead of being converted here.

Copy link
Contributor

@acb-mv acb-mv left a comment

Choose a reason for hiding this comment

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

Reviewed 31 of 32 files at r1, 1 of 4 files at r2.
Reviewable status: 29 of 32 files reviewed, 5 unresolved discussions (waiting on @rablador)


ios/MullvadVPN/View controllers/Tunnel/FeatureIndicators/ChipView/ChipViewModelProtocol.swift line 25 at r1 (raw file):

        for (index, chip) in chips.enumerated() {
            let textWidth = chip.name.width(using: .preferredFont(forTextStyle: .subheadline))
            let chipWidth = textWidth + 16 /* inside horisontal padding */ + 8 /* outside trailing padding */

typo: should be "horizontal"


ios/MullvadVPN/View controllers/Tunnel/FeatureIndicators/ChipFeature.swift line 24 at r1 (raw file):

    var name: String {
        String("DAITA")

Is the `String("


ios/MullvadVPN/View controllers/Tunnel/FeatureIndicators/ChipView/ChipFeature.swift line 85 at r2 (raw file):

    var name: String {
        String("Server IP override")

Is the String("...") wrapper necessary? IIRC,"Server IP override" would return a String

@rablador rablador force-pushed the add-connection-detail-toggle-to-connection-view-ios-961 branch from 3e1c133 to e14ae14 Compare December 20, 2024 10:55
Copy link
Contributor Author

@rablador rablador left a comment

Choose a reason for hiding this comment

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

Reviewable status: 28 of 32 files reviewed, 4 unresolved discussions (waiting on @acb-mv)


ios/MullvadVPN/View controllers/Tunnel/FeatureIndicators/ChipFeature.swift line 24 at r1 (raw file):

Previously, acb-mv wrote…

Is the `String("

Done.


ios/MullvadVPN/View controllers/Tunnel/FeatureIndicators/ChipView/ChipFeature.swift line 85 at r2 (raw file):

Previously, acb-mv wrote…

Is the String("...") wrapper necessary? IIRC,"Server IP override" would return a String

Done.

@rablador rablador force-pushed the add-connection-detail-toggle-to-connection-view-ios-961 branch 3 times, most recently from 084940c to 750b18f Compare December 20, 2024 12:46
@rablador rablador requested a review from acb-mv December 20, 2024 12:46
@rablador rablador force-pushed the add-connection-detail-toggle-to-connection-view-ios-961 branch from 750b18f to fd11f54 Compare December 20, 2024 14:47
@rablador rablador marked this pull request as ready for review December 20, 2024 14:51
@rablador rablador force-pushed the add-connection-detail-toggle-to-connection-view-ios-961 branch from fd11f54 to 0633867 Compare December 20, 2024 14:52
@rablador rablador force-pushed the add-connection-detail-toggle-to-connection-view-ios-961 branch from 0633867 to 118080b Compare December 20, 2024 14:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iOS Issues related to iOS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants