Skip to content

refactor: UI/UX feedback sample app#14

Open
pmathew92 wants to merge 5 commits intomainfrom
sample_app_feedback
Open

refactor: UI/UX feedback sample app#14
pmathew92 wants to merge 5 commits intomainfrom
sample_app_feedback

Conversation

@pmathew92
Copy link
Copy Markdown
Contributor

Description

This PR addresses UI/UX feedback on sample app

Screenshots (if appropriate)

sample_app.mp4

Checklist

@pmathew92 pmathew92 requested a review from a team as a code owner April 2, 2026 11:44
Copilot AI review requested due to automatic review settings April 2, 2026 11:44
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +3 to +4
<string name="com_auth0_client_id">0uEJeUx6dLhVwTEya6PApVDvZ6fwkZyO</string>
<string name="com_auth0_domain">p-mathew.us.auth0.com</string>
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
<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>

Copilot uses AI. Check for mistakes.
Comment on lines +55 to +56
var selectedOption by remember { mutableStateOf<LoginOption?>(LoginOption.Hosted) }
val context = LocalContext.current
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
@@ -59,7 +61,9 @@ fun FactorCard(

Card(
onClick = onClick,
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
onClick = onClick,
onClick = onClick,
enabled = enabled,

Copilot uses AI. Check for mistakes.
}

composable<AppRoute.UpdateFullName> {
val nameParts = userProfile.name.trim().split(" ", limit = 2)
Copy link

Copilot AI Apr 2, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
val nameParts = userProfile.name.trim().split(" ", limit = 2)
val nameParts = userProfile.name
.trim()
.split("\\s+".toRegex(), limit = 2)
.map { it.trim() }

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants