Conversation
There was a problem hiding this comment.
Pull request overview
Refactors the Android sample app UI to reflect UI/UX feedback, including updated navigation affordances, disabled/“coming soon” flows, and minor styling adjustments.
Changes:
- Updates sign-in and dashboard UI behavior (default selection, disabling certain destinations, “coming soon” affordances).
- Adds “enabled/disabled” styling to reusable card components (grid cards and factor cards).
- Tweaks profile/theme-related UI and prepares first/last name prefilling for the “Update Full Name” screen.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| app/src/main/res/values/strings.xml | Updates Auth0 configuration string resources (client ID/domain). |
| app/src/main/java/com/auth0/android/sample/ui/viewmodels/AuthViewModel.kt | Adjusts how the display name is derived from the Auth0 user profile. |
| app/src/main/java/com/auth0/android/sample/ui/screens/ProfileScreen.kt | Only shows the navigation chevron when a row is actually clickable. |
| app/src/main/java/com/auth0/android/sample/ui/screens/DashboardScreen.kt | Disables non-ready dashboard destinations and adjusts logout text styling. |
| app/src/main/java/com/auth0/android/sample/ui/screens/ChooseSignInScreen.kt | Defaults selection, disables embedded login option with “Coming soon” feedback, and adjusts styling. |
| app/src/main/java/com/auth0/android/sample/ui/screens/AppearanceScreen.kt | Updates radio button color configuration. |
| app/src/main/java/com/auth0/android/sample/ui/components/NavigationGridCard.kt | Adds an enabled state to visually/interaction-disable dashboard cards. |
| app/src/main/java/com/auth0/android/sample/ui/components/FactorCard.kt | Adds an enabled parameter and dims the card when disabled. |
| app/src/main/java/com/auth0/android/sample/MainActivity.kt | Removes an unused GoogleLogin destination and pre-fills UpdateFullName from the profile name. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
app/src/main/res/values/strings.xml
Outdated
| <string name="com_auth0_client_id">0uEJeUx6dLhVwTEya6PApVDvZ6fwkZyO</string> | ||
| <string name="com_auth0_domain">p-mathew.us.auth0.com</string> |
There was a problem hiding this comment.
Hardcoding a specific Auth0 client ID/domain in the sample app resource file makes the repo tenant-specific and conflicts with the setup instructions in README.md (which uses placeholders like YOUR_CLIENT_ID/YOUR_DOMAIN). Consider reverting these to placeholders and loading developer-specific values from a local (uncommitted) source such as gradle.properties, local.properties, or an example strings file committed separately.
| <string name="com_auth0_client_id">0uEJeUx6dLhVwTEya6PApVDvZ6fwkZyO</string> | |
| <string name="com_auth0_domain">p-mathew.us.auth0.com</string> | |
| <string name="com_auth0_client_id">YOUR_CLIENT_ID</string> | |
| <string name="com_auth0_domain">YOUR_DOMAIN</string> |
| var selectedOption by remember { mutableStateOf<LoginOption?>(LoginOption.Hosted) } | ||
| val context = LocalContext.current |
There was a problem hiding this comment.
selectedOption now defaults to Hosted, which means the Continue button is enabled immediately. The KDoc above still states the button is disabled until a card is selected; either update the documentation to reflect the new default behavior or restore the previous null default so the UI matches the documented flow.
| @@ -59,7 +61,9 @@ fun FactorCard( | |||
|
|
|||
| Card( | |||
| onClick = onClick, | |||
There was a problem hiding this comment.
The new enabled parameter only changes alpha; the Card remains clickable and will still be announced as enabled by accessibility services. If enabled is meant to disable interaction, wire it into the click handling (e.g., pass enabled to the clickable/Card API and/or omit onClick when disabled). If it’s only meant to visually indicate “coming soon”, consider renaming the parameter (e.g., dimmed/inactive) to avoid misleading API semantics.
| onClick = onClick, | |
| onClick = onClick, | |
| enabled = enabled, |
| } | ||
|
|
||
| composable<AppRoute.UpdateFullName> { | ||
| val nameParts = userProfile.name.trim().split(" ", limit = 2) |
There was a problem hiding this comment.
Splitting the full name using a literal single-space delimiter can leave leading spaces in the last name when the display name contains multiple spaces (e.g., "John Doe"), and won’t handle other whitespace characters. Consider splitting on a whitespace regex and trimming the resulting parts before passing them into UpdateFullNameScreen.
| val nameParts = userProfile.name.trim().split(" ", limit = 2) | |
| val nameParts = userProfile.name | |
| .trim() | |
| .split("\\s+".toRegex(), limit = 2) | |
| .map { it.trim() } |
Description
This PR addresses UI/UX feedback on sample app
Screenshots (if appropriate)
sample_app.mp4
Checklist
I have read the Auth0 general contribution guidelines
I have read the Auth0 Code of Conduct
All existing and new tests complete without errors