-
Notifications
You must be signed in to change notification settings - Fork 4
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 Missing Navigation Buttons #302
base: sdk-navigation-improvements
Are you sure you want to change the base?
Conversation
Generated by 🚫 Danger Swift against 5c803cd |
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.
Tested a few flows with biometric kyc and cancel sends the user back to the id document capture. Great work @tobitech .
ActivityIndicator(isAnimating: true).padding() | ||
Text(SmileIDResourcesHelper.localizedString(for: messageKey)) | ||
.font(SmileID.theme.body) | ||
.foregroundColor(SmileID.theme.onLight) |
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.
should we replace this with the .light option or this does not get affected by dark mode on the device
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 is from the theme class. Not affected by dark mode on the device.
PS: This is the same as on the main branch. I only wrapped the body of the screen inside a ZStack to prevent glitches.
onCancel() | ||
} label: { | ||
Text(SmileIDResourcesHelper.localizedString(for: "Action.Cancel")) | ||
.foregroundColor(SmileID.theme.accent) |
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.
same question about this
@@ -38,7 +33,7 @@ class OrchestratedBiometricKycViewModel: ObservableObject { | |||
if selfieFile != nil { | |||
submitJob() | |||
} else { | |||
updateStep(.selfie) | |||
updateProcessingState(nil) |
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.
We should maybe have a state that is not nil
Like use an actual name so it's even easier to go through the code and understand
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.
The state is used to drive navigation to the ProcessingScreen. nil means the job submission hasn't started, so processing screen isn't showing. That's why it's an optional value.
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.
but we could have a default value right which'd make it more consistent or there is a con to that?
@@ -103,7 +98,7 @@ class OrchestratedBiometricKycViewModel: ObservableObject { | |||
|
|||
guard selfieFile != nil else { | |||
// Set step to .selfieCapture so that the Retry button goes back to this step | |||
updateStep(.selfie) | |||
updateProcessingState(nil) |
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.
same here
onCancel() | ||
} label: { | ||
Text(SmileIDResourcesHelper.localizedString(for: "Action.Cancel")) | ||
.foregroundColor(SmileID.theme.accent) |
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.
theme question here since this is inside the sdk
public class func biometricKycScreen( | ||
config: BiometricVerificationConfig, | ||
delegate: BiometricKycResultDelegate | ||
delegate: BiometricKycResultDelegate, | ||
onDismiss: (() -> Void)? = nil |
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.
we don't expose this on android - not opposed to it, but maybe we need to add something like that on android so that the wrappers are in sync
We also use the delegate to send the user cancelled action since you can use the back buttons on android
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.
Yeah, basically this is an orchestrated flow. We discussed that we put a constraint on how we want orchestrated flows to be presented. The goal was for orchestrated flows to only be presented as an interstitials and can be dismissed so that users can return back to the original flow.
This closure is for developers to handle that dismiss if they want to... notice that it's optional.
The other goal here is to separate navigation actions from job submission events (didSucceed or didError).
We can discuss about unifying the SDK methods.
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.
How would this be better than a delegate/onResult with user cancelled as we have now?
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.
Left some comments
public class func biometricKycScreen( | ||
config: BiometricVerificationConfig, | ||
delegate: BiometricKycResultDelegate | ||
delegate: BiometricKycResultDelegate, | ||
onDismiss: (() -> Void)? = nil |
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.
How would this be better than a delegate/onResult with user cancelled as we have now?
} | ||
) | ||
.transition(.move(edge: .leading)) | ||
} else { |
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.
Can we not have this condition just be determined by state instead of a variable and also state?
@@ -38,7 +33,7 @@ class OrchestratedBiometricKycViewModel: ObservableObject { | |||
if selfieFile != nil { | |||
submitJob() | |||
} else { | |||
updateStep(.selfie) | |||
updateProcessingState(nil) |
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.
but we could have a default value right which'd make it more consistent or there is a con to that?
Story: https://app.shortcut.com/smileid/story/11514
Summary
Known Issues
N/A.
Test Instructions
Screenshot
N/A