sample(app): add Firestore, Database & Storage demos to sample app - #2406
Conversation
There was a problem hiding this comment.
Code Review
This pull request restructures the demo application by modularizing the Auth demos and introducing new demonstration activities for Firebase Realtime Database, Firestore, and Storage (using Glide). It also updates FirestorePagingSource to properly handle InterruptedException and avoid undeliverable RxJava exceptions. Feedback focuses on several key improvements: configuring and initializing the Realtime Database emulator, exposing and passing the emulator mode to the Auth chooser screen, resolving a bug in the Storage demo where Glide loads are triggered on every keystroke, programmatically converting dp to pixels for view holder padding to avoid raw pixel anti-patterns, and optimizing Firestore data seeding using a WriteBatch.
d382bd5 to
1ecd498
Compare
russellwheatley
left a comment
There was a problem hiding this comment.
A few suggestions and nits on the demo additions below.
This branch also carries an unrelated commit (d382bd5, the sign-up display name validation fix) that doesn't belong here, likely from being stacked on another branch. Worth rebasing it out before merge, same ask as on the edge-to-edge insets PR.
0cdfacd to
1778d6c
Compare
…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>
Adds demo activities for Realtime Database, Firestore, and Storage to the sample app.
auth/subpackage; adddatabase/,firestore/,storage/subpackagesDatabaseDemoActivity— paginated list viaFirebaseRecyclerPagingAdapter+orderByChildFirestoreDemoActivity— paginated list viaFirestorePagingAdapter+orderBy, seeded with aWriteBatchStorageDemoActivity— loadsgs://URLs via Glide, both as a raw string (StringLoader) and viaStorageReferenceMainActivityPreview
sample-demo.webm