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

Upgrade the UX in Daita scenarios #6745

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

rablador
Copy link
Collaborator

@rablador rablador commented Sep 5, 2024

After discussing with the stakeholders, and the design team, we want to ship Daita with an improved UX, which will behave as following:

  • If the single hop selected location already supports Daita, there is no warning shown when Daita is enabled, it just works
  • If the single hop selected location does not support Daita, the "Enable anyway" warning is shown, and if the user accepts, they enter the blocked state.
  • If the multihop entry selected location already supports Daita, there is no warning, it just works
  • If the multihop entry selected location does not support Daita, the "Enable anyway" warning is shown

The copy that is shown for the warning text is aware of multihop, and will have a different text accordingly.


This change is Reviewable

@rablador rablador added the iOS Issues related to iOS label Sep 5, 2024
@rablador rablador self-assigned this Sep 5, 2024
Copy link

linear bot commented Sep 5, 2024

@rablador rablador requested a review from acb-mv September 5, 2024 13:46
@rablador rablador force-pushed the upgrade-the-ux-in-daita-scenarios-ios-804 branch from 869bcd7 to 20f1158 Compare September 5, 2024 13:48
Copy link
Collaborator 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.

To more easily test the singlehop scenario you need to turn off the "smart routing" that's behind the debug flags in single hop picker in RelaySelectorPicker.swift.

Reviewable status: 0 of 8 files reviewed, all discussions resolved

Copy link
Collaborator

@pinkisemils pinkisemils left a comment

Choose a reason for hiding this comment

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

Reviewed 7 of 8 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @rablador)


ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsInteractor.swift line 59 at r2 (raw file):

        var tunnelSettings = tunnelSettings
        tunnelSettings.daita = settings

Is this not mutating the instance variable tunnelSettings?


ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsViewController.swift line 227 at r2 (raw file):

        case .daitaSettingIncompatibleWithMultihop:
            """
            DAITA isn’t available on the current entry server. After enabling, please go to \

Should this not be 2 different NSLocalizedStrings?

Copy link
Collaborator 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: all files reviewed, 2 unresolved discussions (waiting on @pinkisemils)


ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsInteractor.swift line 59 at r2 (raw file):

Previously, pinkisemils (Emīls Piņķis) wrote…

Is this not mutating the instance variable tunnelSettings?

No, self.tunnelSettings is a struct, so it'll be copied on assignment.


ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsViewController.swift line 227 at r2 (raw file):

Previously, pinkisemils (Emīls Piņķis) wrote…

Should this not be 2 different NSLocalizedStrings?

These strings are used in localized strings in AlertPresentation below. I didn't want to make them both NSLocalizedString because it bloats the function body somewhat.

Copy link
Collaborator 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: all files reviewed, 2 unresolved discussions (waiting on @pinkisemils)


ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsInteractor.swift line 59 at r2 (raw file):

Previously, rablador (Jon Petersson) wrote…

No, self.tunnelSettings is a struct, so it'll be copied on assignment.

No, I'm wrong.

Copy link
Collaborator 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: all files reviewed, 2 unresolved discussions (waiting on @pinkisemils)


ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsInteractor.swift line 59 at r2 (raw file):

Previously, rablador (Jon Petersson) wrote…

No, I'm wrong.

No, I'm right. :D

Copy link
Collaborator 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: all files reviewed, 2 unresolved discussions (waiting on @pinkisemils)


ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsInteractor.swift line 59 at r2 (raw file):

Previously, rablador (Jon Petersson) wrote…

No, I'm right. :D

Since .daita prop is a struct too it's assigned as a copy. Had .daita prop been a class it would have been as you say.

Copy link
Contributor

@buggmagnet buggmagnet left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 7 of 8 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @pinkisemils and @rablador)


ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsInteractor.swift line 61 at r2 (raw file):

        tunnelSettings.daita = settings

        let selectedRelays = try? tunnelManager.selectRelays(tunnelSettings: tunnelSettings)

We're starting to add quite some logic in that interactor, I think it would be nice to have some tests for it.

Copy link
Collaborator

@pinkisemils pinkisemils left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @rablador)

Copy link
Collaborator 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: all files reviewed, 1 unresolved discussion (waiting on @buggmagnet)


ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsInteractor.swift line 61 at r2 (raw file):

Previously, buggmagnet wrote…

We're starting to add quite some logic in that interactor, I think it would be nice to have some tests for it.

Do you want it to be done in this PR? (since it has already been approved by two reviewers)

Copy link
Contributor

@buggmagnet buggmagnet 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: all files reviewed, 1 unresolved discussion (waiting on @rablador)


ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsInteractor.swift line 61 at r2 (raw file):

Previously, rablador (Jon Petersson) wrote…

Do you want it to be done in this PR? (since it has already been approved by two reviewers)

We can leave it for another PR since we're bug bashing it tomorrow

Copy link
Collaborator 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: all files reviewed, 1 unresolved discussion (waiting on @buggmagnet)


ios/MullvadVPN/View controllers/VPNSettings/VPNSettingsInteractor.swift line 61 at r2 (raw file):

Previously, buggmagnet wrote…

We can leave it for another PR since we're bug bashing it tomorrow

Done.

@buggmagnet buggmagnet force-pushed the upgrade-the-ux-in-daita-scenarios-ios-804 branch from 20f1158 to 1d42b45 Compare September 9, 2024 12:51
@buggmagnet buggmagnet merged commit 43a1083 into main Sep 9, 2024
8 of 9 checks passed
@buggmagnet buggmagnet deleted the upgrade-the-ux-in-daita-scenarios-ios-804 branch September 9, 2024 12:53
Copy link

github-actions bot commented Sep 9, 2024

🚨 End to end tests failed. Please check the failed workflow run.

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