fix(auth): handle edge-to-edge insets in MFA challenge and auth screens - #2413
Conversation
There was a problem hiding this comment.
Code Review
This pull request refactors the custom method picker layout to render edge-to-edge across the entire screen, bypassing the default Scaffold and terms configuration when a custom layout is provided. It also cleans up safeDrawingPadding across several email and phone auth screens and wraps the MFA challenge content in a Scaffold. The review feedback suggests optimizing the MFA challenge layout by applying padding directly to the root Column instead of using a Scaffold, updating an outdated KDoc comment in the preview, and reverting several helper functions and composables in the demo activity back to private visibility to maintain proper encapsulation.
d382bd5 to
1ecd498
Compare
russellwheatley
left a comment
There was a problem hiding this comment.
A couple of suggestions on the customMethodPickerLayout changes below.
Also, this branch looks like it's stacked on top of the unmerged display-name-validation fix (d382bd5) rather than rebased onto version-10.0.0-beta04, so the diff here currently pulls in an unrelated SignUpUI/SignUpUITest.kt change. Can you rebase onto the base branch before merge so the diff only has your two commits?
747dddc to
345f70c
Compare
…PickerLayout's full-screen behavior
…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>
Fixes #2403.
The MFA challenge screen had no inset handling, so its title collided with the status bar/camera cutout on edge-to-edge devices. Also found a related, opposite bug in six other auth screens combining Scaffold's innerPadding with a redundant, double-counted safeDrawingPadding() call.
MfaChallengeDefaults.kt: wrappedDefaultMfaChallengeContentin aScaffoldSignInUI,SignUpUI,SignInEmailLinkUI,ResetPasswordUI,EnterPhoneNumberUI,EnterVerificationCodeUI: removed the redundant.safeDrawingPadding(), added a uniform16.dpmarginFirebaseAuthScreen.customMethodPickerLayoutnow renders full-screen (was Scaffold-confined) so fully custom layouts can go edge-to-edge; direct behavior change since library is pre-1.0Preview