-
Notifications
You must be signed in to change notification settings - Fork 15
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: create WireAuthentication feature module #2255
base: develop
Are you sure you want to change the base?
Conversation
Test Results0 tests 0 ✅ 0s ⏱️ Results for commit d47cbb5. |
@MainActor | ||
func invoke(emailOrSSOCode: String) async -> AuthenticationMethod |
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 it could be a good practice to always mark the invoke method as @MainActor
because:
- It creates a cleaner call side from the view model which should also be main actor isolated (i.e just create a
Task
and run the use case. - It makes it explicit to the implementation on which thread the use case is being called on and therefore the responsibility of the implantation to manage efficient concurrent execution.
/// To load the contents of the module, create an instance of | ||
/// the assembly, which you can then use to make required views. | ||
@MainActor | ||
public struct WireAuthenticationAssembly { |
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.
Will there be more code than the assembly in the entry point target?
If not, isn't it a bit too much of an overhead to have a separate target?
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 don't think there would be anything other than instantiating components, wiring them together and returning them. Where would be another place to put it if we don't have a separate target? It couldn't exist inside either the UI or Core targets because the assembly needs to combine components from both.
# Conflicts: # WireAPI/Sources/WireAPI/Assembly.swift
# Conflicts: # WireAPI/Sources/WireAPI/Authentication/AuthenticationManager.swift
Issue
Initial ideas for a
WireAuthentication
feature module that would contain the whole login and registration flow.Checklist
[WPB-XXX]
.UI accessibility checklist
If your PR includes UI changes, please utilize this checklist: