-
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
Refactor Selfie Submission and New Submission UX #241
Closed
Closed
Changes from all commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
4538471
improve code and file structure
tobitech 5f93f25
add the liveness guides
tobitech 7c6b949
add some config values to liveness guides view.
tobitech 4c4bfa0
change lottie animation frame
tobitech 1c51bf0
Merge branch 'main' into new-camera-ui
tobitech 3b71441
run pod install
tobitech b6c4315
Merge branch 'new-smart-selfie-capture' into new-camera-ui
tobitech 2a71246
setup animation progress time for the liiveness guide lottie animation.
tobitech b32cf77
fix homeview fore each warnings.
tobitech 4e0c5e1
connect face bounds detection to the the indicator.
tobitech ddca3b7
add throttling to camera feed.
tobitech 1199bac
use full screen cover to present home screen products.
tobitech 924c09d
control progress arc visibility based on progress.
tobitech 8795bb7
add a dummy submit function.
tobitech 47b3a42
setup timers.
tobitech 176a17d
add animation to the progress fill arcs.
tobitech e5801dd
refactor the components of liveness guides view.
tobitech c1de792
setup delay timer and introduce state for the current animation that …
tobitech b52ec73
Merge branch 'main' into connect-viewmodel-to-new-ui
tobitech d98aa78
Merge branch 'new-smart-selfie-capture' into connect-viewmodel-to-new-ui
tobitech 04b303c
update arc shape init
tobitech ce7626d
add new lottie files. define a guide animation enum to hold the anima…
tobitech 9f8ab57
some refactoring.
tobitech 1437248
create a validator class for the face observation data.
tobitech ebb3052
Merge branch 'new-smart-selfie-capture' into connect-viewmodel-to-new-ui
tobitech 42c3eb8
refactor buffer image processing and communication between face detec…
tobitech 91899a8
remove some debug views. some refactoring and improvements.
tobitech 374d943
make capture instruction strings localizable
tobitech fe5932b
introduce current liveness task into the face validator to set the ri…
tobitech 2a2fa10
fix cropping for selfie quality check.
tobitech cac8f26
show or hide the circular ring and the liveness guides based on wheth…
tobitech 7725bc1
add processing view to view captured images.
tobitech 6fc1153
Merge branch 'main' into connect-viewmodel-to-new-ui
tobitech a75c3eb
Merge branch 'new-smart-selfie-capture' into connect-viewmodel-to-new-ui
tobitech 0830442
reset animation as user is completing liveness checks
tobitech 3e7cedb
inject current liveness task into liveness guide to control which pro…
tobitech 8f63895
processing screen layout. introduce a backport of stateobject.
tobitech e9999de
run pod install to import missing lottie files.
tobitech be0bd37
present selfie capture flow in navigation view, programmatically navi…
tobitech 7c4de65
refactor view appear setup and reset selfie capture state variables
tobitech e1876fc
import submit method from selfie viewmodel.
tobitech cbecb45
extract submit selfie functionality into a new class to manage the su…
tobitech 640d069
some refactoring
tobitech 47fbb2a
move backport and stateobject to helper folder.
tobitech c961ee8
code formatting.
tobitech 900f46e
restore threshold value
tobitech 13eed78
replace ObservedObject with StateObject in HomeView so that it's init…
tobitech 78e02b7
use proxy size instead of frame for window size calculation and face …
tobitech 95886a4
remove stateobject backport
tobitech e7efa55
use a delegate to communicate selfie submission updates to selfie vie…
tobitech f5ec3de
update processing changes on main thread.
tobitech 029418c
inject failure reason into the api call for submitting selfie
tobitech c44b1e5
rename selfie submission manager
tobitech ed02fb3
reset the threshold for timeout for liveness check.
tobitech 57444ca
Merge branch 'new-smart-selfie-capture' into selfie-submission
tobitech 661c43a
remove presentation mode variable.
tobitech 91289f0
introduce an environment key to manage dismissing of the selfie captu…
tobitech 46c6eaf
improve error handling of selfie capture.
tobitech 3cdcc99
localise strings.
tobitech d0e3d91
code formatting.
tobitech 4583c76
Merge branch 'main' into selfie-submission
tobitech 7794c43
pod install
tobitech 04693d5
make loader background color themeable.
tobitech b788dc9
Merge branch 'new-smart-selfie-capture' into selfie-submission
tobitech 745d9bb
Merge branch 'main' into selfie-submission
tobitech 7e6b56c
run pod install.
tobitech 4853187
Merge branch 'new-smart-selfie-capture' into selfie-submission
tobitech 129e2fa
fix missing files and build errors.
tobitech File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,17 +61,25 @@ class LivenessCheckManager: ObservableObject { | |
|
||
/// Resets the task timer to the initial timeout duration. | ||
private func resetTaskTimer() { | ||
stopTaskTimer() | ||
taskTimer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: false) { _ in | ||
self.elapsedTime += 1 | ||
if self.elapsedTime == self.taskTimeoutDuration { | ||
self.handleTaskTimeout() | ||
} | ||
guard taskTimer == nil else { return } | ||
DispatchQueue.main.async { | ||
self.taskTimer = Timer.scheduledTimer( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit on weak self per other PR |
||
timeInterval: 1.0, target: self, selector: #selector(self.taskTimerFired), | ||
userInfo: nil, | ||
repeats: true) | ||
} | ||
} | ||
|
||
@objc private func taskTimerFired() { | ||
self.elapsedTime += 1 | ||
if self.elapsedTime == self.taskTimeoutDuration { | ||
self.handleTaskTimeout() | ||
} | ||
} | ||
|
||
/// Stops the current task timer. | ||
private func stopTaskTimer() { | ||
guard taskTimer != nil else { return } | ||
taskTimer?.invalidate() | ||
taskTimer = nil | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
Sources/SmileID/Classes/Networking/Models/FailureReason.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import Foundation | ||
|
||
public enum FailureReason { | ||
case activeLivenessTimedOut | ||
|
||
var key: String { | ||
switch self { | ||
case .activeLivenessTimedOut: return "mobile_active_liveness_timed_out" | ||
} | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 think this may need review provided screenshot on slack