CCCT-2456 Manage Profile Drawer Link And Profile Activity Stub#3761
Conversation
[AI] Added a hidden Manage Profile drawer link that unlocks and launches a new empty PersonalIdProfileActivity, plus the profile/edit/forget/discard/OTP strings. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
[AI] Added translations for the new profile/edit/forget/discard/OTP strings to all supported locales (es, fr, ha, hi, lt, no, pt, sw, ti). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
[AI] Increased the Manage Profile drawer link top margin to 6dp. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-2456-personalid-profile-screen-phase-one
[AI] Routed the Manage Profile drawer link through a new ConnectNavHelper.unlockAndGoToProfile, moved the dark-launch visibility into a helper, declared the profile activity non-exported, removed the unused nav_drawer_manage_profile string from all locales, and lifted the drawer's photo launcher registration to a constructor parameter. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Suggested Review Order
|
📝 WalkthroughWalkthroughThis PR adds a new PersonalID profile management feature to the navigation drawer. The implementation spans localization across 11 locales (English, Spanish, French, Hausa, Hindi, Lithuanian, Norwegian, Portuguese, Swahili, and Tigrinya), a new Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested labels
Suggested reviewers
🚥 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)
app/res/values/strings.xml (1)
632-632: ⚡ Quick winKeep the underline out of the localized string.
Inlining
<u>into a translatable resource is brittle; this repo already has the failure mode inapp/res/values-ha/strings.xmlwhere underline markup was escaped and would render literally. Keeppersonalid_manage_profileplain text in every locale and apply the underline where theTextViewis configured instead.🤖 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 `@app/res/values/strings.xml` at line 632, Remove the inline underline markup from the translatable resource by changing the string resource personalid_manage_profile to plain text ("Manage Profile") in all locales, and instead apply the underline when configuring the TextView that displays this resource (e.g., in the layout or the Activity/Fragment that calls setText for personalid_manage_profile) using a view-side approach such as setting paint flags, android:textStyle/span, or a Spannable with UnderlineSpan so the localization remains markup-free across locales.
🤖 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 `@app/res/values/strings.xml`:
- Line 632: Remove the inline underline markup from the translatable resource by
changing the string resource personalid_manage_profile to plain text ("Manage
Profile") in all locales, and instead apply the underline when configuring the
TextView that displays this resource (e.g., in the layout or the
Activity/Fragment that calls setText for personalid_manage_profile) using a
view-side approach such as setting paint flags, android:textStyle/span, or a
Spannable with UnderlineSpan so the localization remains markup-free across
locales.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 7042fbd7-7871-46ce-8d20-55728c0047a6
📒 Files selected for processing (16)
app/AndroidManifest.xmlapp/res/layout/nav_drawer_header.xmlapp/res/values-es/strings.xmlapp/res/values-fr/strings.xmlapp/res/values-ha/strings.xmlapp/res/values-hi/strings.xmlapp/res/values-lt/strings.xmlapp/res/values-no/strings.xmlapp/res/values-pt/strings.xmlapp/res/values-sw/strings.xmlapp/res/values-ti/strings.xmlapp/res/values/strings.xmlapp/src/org/commcare/activities/connect/PersonalIdProfileActivity.ktapp/src/org/commcare/connect/ConnectNavHelper.ktapp/src/org/commcare/navdrawer/BaseDrawerController.ktapp/src/org/commcare/navdrawer/DrawerViewRefs.kt
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3761 +/- ##
=========================================
Coverage 25.87% 25.88%
- Complexity 4389 4393 +4
=========================================
Files 950 951 +1
Lines 57186 57205 +19
Branches 6810 6812 +2
=========================================
+ Hits 14799 14808 +9
- Misses 40558 40567 +9
- Partials 1829 1830 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
|
||
| private fun shouldShowNotifications(): Boolean = PersonalIdManager.getInstance().isloggedIn() && isFeatureEnabled(NOTIFICATIONS) | ||
|
|
||
| private fun shouldShowManageProfile(): Boolean = false |
There was a problem hiding this comment.
this can be moved to PersonalIdFeatureFlagChecker to keep all local release flags together.
There was a problem hiding this comment.
Good idea!
…-2456-personalid-profile-screen-phase-one
[AI] Moved the manage-profile visibility flag into PersonalIdFeatureFlagChecker and gated it on login state, matching the other nav drawer feature checks. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
7286829
|
The ticket description is slightly inaccurate regarding 'the link is dark-launched: visibility is hard-coded to GONE until the final phase.' It should instead mention that the 'manage profile feature flag will be disabled until the final phase.' Also, could you please add a screenshot to preview the UI? |
|
@Jignesh-dimagi Thanks for the reminder, I added a screenshot of the link in the sidebar. I chose not to provide a screenshot of the Profile screen since it's a blank white screen for now. I'll also update both the JIRA tickets and this PR description to mention the local feature flag - the implementation drifted from the Claude plan during code review. |
CCCT-2456
Technical Summary
Phase 1 of the Manage Profile feature. Adds an underlined "Manage Profile" link to the nav drawer header that unlocks PersonalID and opens a new stub
PersonalIdProfileActivity, which later phases will replace with the Profile / Edit Profile nav graph. The link is dark-launched: visibility is hidden behind a feature flag until the final phase. All strings for the upcoming Profile and Edit Profile screens are front-loaded here so translation happens in one pass.Safety Assurance
Safety story
What gives confidence:
VISIBLE, exercised the drawer link, and verified the unlock prompt appeared and the stub activity opened.ConnectNavHelperand the removal of an unreferenced string resource.Risks to review: