Uh oh!
There was an error while loading. Please reload this page.
fix(auth): validate display name only when required in sign-up form - #2383
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the form validation logic in SignUpUI to ensure the form is considered valid when the display name is not required, even if it is left empty. It also introduces a new unit test class SignUpUITest to verify this behavior. The review feedback suggests improving the robustness of the new test by combining text and click action matchers to locate the sign-up button, preventing potential AmbiguousNodeException errors in certain locales.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
russellwheatley
approved these changes
Jul 10, 2026
Uh oh!
There was an error while loading. Please reload this page.
demolaf added a commit
that referenced
this pull request
Jul 15, 2026
…2383) * fix(auth): validate display name only when required in sign-up form * fix(auth): use locale-safe matcher for sign-up button in test
demolaf added a commit
that referenced
this pull request
Jul 17, 2026
…2383) * fix(auth): validate display name only when required in sign-up form * fix(auth): use locale-safe matcher for sign-up button in test
demolaf added a commit
that referenced
this pull request
Jul 22, 2026
…2383) * fix(auth): validate display name only when required in sign-up form * fix(auth): use locale-safe matcher for sign-up button in test
demolaf added a commit
that referenced
this pull request
Jul 29, 2026
…2404) * fix(auth): validate display name only when required in sign-up form (#2383) * fix(auth): validate display name only when required in sign-up form * fix(auth): use locale-safe matcher for sign-up button in test * fix(internal): append CHAR_LIMIT to translation descriptions in export script (#2417) Fixes#1613 * fix(auth): mitigate tapjacking on the auth activity window (#2416) Fixes#2041 * sample(app): add Firestore, Database & Storage demos to sample app (#2406) * fix(auth): allow customizing top app bar colors via AuthUITheme (#2391) * fix(auth): handle edge-to-edge insets in MFA challenge and auth screens (#2413) * fix(auth): use fixed padding for method picker provider buttons (#2424) (#2426) * fix(firestore): catch InterruptedException in FirestorePagingSource * fix(firestore): drop load error logging and restore rx error handler in test * fix(firestore): return LoadResult.Error for every load failure instead of throwing * fix(firestore): fix PageKey.equals NPE on null snapshots and add hashCode * test(firestore): run paging source test in CI via robolectric and replace sleeps with latches * fix(firestore): log genuine load failures while keeping cancellations silent --------- Co-authored-by: Oluwatobi Shokunbi <ayoshokz@gmail.com>
This file contains hidden or 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
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes#2381
SignUpUI'sisFormValidalways validateddisplayName, even whenAuthProvider.Email.isDisplayNameRequired = falseand the field is hidden. Since the hidden field's value stays "",GeneralFieldValidatoralways treated it as a missing required field, so the sign-up button could never become enabled.Now the display name check is skipped when
isDisplayNameRequiredis false.Added
SignUpUITestcovering this case (name field hidden, other fields valid, sign-up button enabled) — verified it fails on the old code and passes with the fix.