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

Use a different green spinner during onboarding #5623

Merged
merged 1 commit into from
Feb 18, 2022

Conversation

pixlwave
Copy link
Member

@pixlwave pixlwave commented Feb 17, 2022

This will allow other screens to be presented during onboarding without having the spinner thrown on top of them. Additionally moves key verification out of a bridge presenter in AuthenticationVC and into the AuthenticationCoordinator.

I may end up moving both the spinner and the key verification the OnboardingCoordinator instead of the AuthenticationCoordinator, but this seems like a decent sized PR for now and fixes a couple of potential issues with the spinner presentation that would be great to get into the next release.

Fixes #5621.

…or for new users.

Also moves key verification out of a bridge presenter in AuthenticationVC and into the AuthenticationCoordinator.
Comment on lines +65 to +67
- (void)authenticationViewController:(AuthenticationViewController *)authenticationViewController
didLoginWithSession:(MXSession *)session
andPassword:(NSString *)password;
Copy link
Member Author

Choose a reason for hiding this comment

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

Looks like I should indicate the parameter nullability for Swift.

override func viewWillAppear(_ animated: Bool) {
navigationController?.setNavigationBarHidden(true, animated: false)
}
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Was going to use ElementViewController but that fails to load as it can't find the view controller in the main storyboard.

@github-actions
Copy link

📱 Scan the QR code below to install the build for this PR.
🔒 This build is for internal testing purpose. Only devices listed in the ad-hoc provisioning profile can install Element Alpha.

QR code

If you can't scan the QR code you can install the build via this link: https://i.diawi.com/4CLv5b

@stefanceriu stefanceriu self-assigned this Feb 18, 2022
Copy link
Member

@stefanceriu stefanceriu left a comment

Choose a reason for hiding this comment

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

lgtm 👍

}

private func authenticationDidComplete() {
completion?(.didComplete(authenticationViewController.authType))
Copy link
Member

Choose a reason for hiding this comment

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

I see this is called from a lot of places, even on failures. Is that expected?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes in as much as this is how AuthenticationViewController previously worked (calling dismiss).

The calls from sessionStateDidChange are all once the session is running and the failures are only crypto/cross-signing related so should all be handled from the home tab once the onboarding has completed. There is probably scope for improvement once the auth flow is re-written though.

import UIKit
import Reusable

class LaunchLoadingViewController: UIViewController, Reusable {
Copy link
Member

Choose a reason for hiding this comment

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

I always liked the "SplashScreen" name 😁

Copy link
Member Author

Choose a reason for hiding this comment

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

Too many options! I followed LaunchLoadingView as a convention here, but there are designs to update the loading view at some stage, so maybe at that point we can switch it 💦

@pixlwave pixlwave merged commit c8f60b0 into develop Feb 18, 2022
@pixlwave pixlwave deleted the doug/5621_ftue_spinner branch February 18, 2022 13:46
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.

Don't start the loading spinner from the LegacyAppDelegate during onboarding.
2 participants