-
Notifications
You must be signed in to change notification settings - Fork 662
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
Link Verification Dialog UI #10047
Link Verification Dialog UI #10047
Conversation
Diffuse output:
APK
|
f69d4e4
to
a22f911
Compare
b8f9515
to
89db124
Compare
89db124
to
89303e9
Compare
Fix lint Update paymentsheet.api Rebase Update LinkActivityTest.kt Update LinkActivityTest.kt Update tests Update strings.xml revert string changes Fix tests Clean up VM Fix VM tests
89303e9
to
4b01a2b
Compare
viewModelScope.launch { | ||
linkAccountManager.logOut() | ||
} |
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 was causing an auth session error after dismissing the 2fa dialog
linkAccount = linkAccount, | ||
isDialog = true, | ||
onVerificationSucceeded = onVerificationSucceeded, | ||
onChangeEmailClicked = { }, |
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.
is there a way to avoid having to pass in onChangeEmailClicked
for the verification dialog? Presumably this is {} because we don't display that button on the verification dialog?
If the solution to this isn't super straightforward (which I'm guessing it isn't), no need to block on this.
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 class name looks like it has a typo in it (it currently says Sreen instead of Screen) -- can you rename it?
@@ -151,6 +153,62 @@ internal fun VerificationBody( | |||
} | |||
} | |||
|
|||
@Composable | |||
private fun TopSection( |
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.
could we name this something more idiomatic? e.g. Header?
not blocking
@@ -736,7 +736,7 @@ internal class LinkActivityViewModelTest { | |||
} | |||
} | |||
|
|||
private class FakeNativeLinkComponent( | |||
internal class FakeNativeLinkComponent( |
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 you extract this into its own class rather than making it visible here? If we need to use it in another test, then we should pull it out, rather than creating a dependency from one test class onto another
@@ -180,7 +180,7 @@ internal class VerificationViewModel @Inject constructor( | |||
linkAccount: LinkAccount, | |||
isDialog: Boolean, | |||
onVerificationSucceeded: () -> Unit, | |||
onChangeEmailClicked: () -> Unit, | |||
onChangeEmailClicked: () -> Unit = {}, |
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'm not sure this is the right fix here -- we probably don't want to default this to doing nothing. If we were to introduce a new use of VerificationViewModel that did show the change email button, this would be a foot gun for making that button unresponsive.
I was thinking that there might be a way to not require this parameter when we are not going to show the change email button
I'm ok merging this for now and we can figure out a better solution later
Summary
Render verification dialog in
LinkActivity
whenlinkViewModel.linkScreenState
isVerificationDialog
Motivation
JIRA
Testing
Screenshots
Screen.Recording.2025-01-31.at.12.42.13.AM.mov
Changelog