SDKS-4937: App parity with iOS#203
Conversation
📝 WalkthroughWalkthroughToken screen UI refactored from dropdown/expanded-state layout to tab-driven card-based rendering. ViewModel's JSON token formatting removed. New composables render token fields with inline clipboard copy, expiry countdown via binary search, error states, and empty states. ChangesToken Screen Redesign
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
samples/pingsampleapp/src/main/java/com/pingidentity/samples/pingsampleapp/token/Token.kt (1)
298-311: 💤 Low valueMinor capitalization inconsistency with "DaVinci" tab.
The tab displays "DaVinci" (Line 137), but
EmptyCardwill show "Davinci" due toreplaceFirstChar { it.uppercase() }on"davinci". Consider using a display name property or mapping for consistency.💡 Suggested approach
`@Composable` private fun EmptyCard(tab: TokenType) { + val tabDisplayName = when (tab) { + TokenType.JOURNEY -> "Journey" + TokenType.DAVINCI -> "DaVinci" + TokenType.OIDC -> "OIDC" + } Card( modifier = Modifier.fillMaxWidth(), elevation = CardDefaults.cardElevation(defaultElevation = 2.dp), ) { Text( - text = "No ${tab.name.lowercase().replaceFirstChar { it.uppercase() }} token available", + text = "No $tabDisplayName token available", style = MaterialTheme.typography.bodyMedium, color = MaterialTheme.colorScheme.onSurfaceVariant, modifier = Modifier.padding(16.dp), ) } }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@samples/pingsampleapp/src/main/java/com/pingidentity/samples/pingsampleapp/token/Token.kt` around lines 298 - 311, EmptyCard currently builds a display string from tab.name using lowercase + replaceFirstChar which yields "Davinci" for the DaVinci tab; instead add/use a canonical display name on the TokenType (e.g., a displayName property or a when-mapping) and use that in EmptyCard (replace uses of tab.name.lowercase().replaceFirstChar { it.uppercase() } with tab.displayName or a small mapping in EmptyCard that returns "DaVinci" for the DaVinci enum value and the usual capitalized form for others) so the casing matches the tab label exactly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@samples/pingsampleapp/src/main/java/com/pingidentity/samples/pingsampleapp/token/Token.kt`:
- Around line 298-311: EmptyCard currently builds a display string from tab.name
using lowercase + replaceFirstChar which yields "Davinci" for the DaVinci tab;
instead add/use a canonical display name on the TokenType (e.g., a displayName
property or a when-mapping) and use that in EmptyCard (replace uses of
tab.name.lowercase().replaceFirstChar { it.uppercase() } with tab.displayName or
a small mapping in EmptyCard that returns "DaVinci" for the DaVinci enum value
and the usual capitalized form for others) so the casing matches the tab label
exactly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: c2dba3de-9f99-4d86-87da-400ae6eca3d8
📒 Files selected for processing (2)
samples/pingsampleapp/src/main/java/com/pingidentity/samples/pingsampleapp/token/Token.ktsamples/pingsampleapp/src/main/java/com/pingidentity/samples/pingsampleapp/token/TokenViewModel.kt
💤 Files with no reviewable changes (1)
- samples/pingsampleapp/src/main/java/com/pingidentity/samples/pingsampleapp/token/TokenViewModel.kt
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #203 +/- ##
==========================================
Coverage 42.64% 42.64%
Complexity 1287 1287
==========================================
Files 312 312
Lines 9447 9447
Branches 1403 1403
==========================================
Hits 4029 4029
Misses 4862 4862
Partials 556 556
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
JIRA Ticket
SDKS-4937
Description
Match Android and iOS Sample Apps
Summary by CodeRabbit