-
-
Notifications
You must be signed in to change notification settings - Fork 45
Updated warning message and color of progress bar for user visit #3275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
📝 WalkthroughWalkthroughThe changes update the string resource Sequence Diagram(s)sequenceDiagram
participant User
participant Adapter
participant ProgressBar
User->>Adapter: Triggers onBindViewHolder
Adapter->>Adapter: Check if paymentUnitAmount >= maxDailyPaymentUnit
alt Condition met
Adapter->>ProgressBar: Set color to green
end
Adapter->>ProgressBar: Set progress percentage
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Suggested labels
Suggested reviewers
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. ✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (5)
app/res/values-pt/strings.xml (1)
343-343: Use “acessar” instead of “aceder” to stay consistent with Brazilian-Portuguese wordingMost strings in this file adopt Brazilian vocabulary (e.g., “aplicativo”, “Gerenciador”).
“aceder” is European; prefer “acessar” for dialect consistency.- <string name="connect_progress_warning_daily_max_reached_single">Atingiu o número máximo de visitas para hoje. Talvez não consiga aceder a mais tarefas.</string> + <string name="connect_progress_warning_daily_max_reached_single">Atingiu o número máximo de visitas para hoje. Talvez não consiga acessar mais tarefas.</string>app/res/values-hi/strings.xml (1)
332-332: Avoid English loan-word “एक्सेस”; use a Hindi equivalent for consistencyThe surrounding strings keep Hindi wording (e.g., “प्रगति”, “कार्य”). Replacing “एक्सेस” with “पहुंच” maintains linguistic coherence.
- <string name="connect_progress_warning_daily_max_reached_single">आप आज के लिए अधिकतम विज़िट संख्या तक पहुँच चुके हैं। हो सकता है कि आप आगे कोई कार्य एक्सेस न कर पाएँ।</string> + <string name="connect_progress_warning_daily_max_reached_single">आप आज के लिए अधिकतम विज़िट संख्या तक पहुँच चुके हैं। हो सकता है कि आप आगे कोई कार्य तक पहुँच न कर पाएँ।</string>app/src/org/commcare/adapters/ConnectProgressJobSummaryAdapter.java (1)
43-45: LGTM! Good visual feedback for completed daily maximums.The conditional logic correctly identifies when users have reached or exceeded their daily maximum visits and provides appropriate visual feedback by changing the progress bar color to green.
Consider using the non-deprecated
ContextCompat.getColor()method for better compatibility:-holder.lpPrimaryVisitProgress.setProgressColor(holder.lpPrimaryVisitProgress.getResources().getColor(R.color.green)); +holder.lpPrimaryVisitProgress.setProgressColor(ContextCompat.getColor(holder.itemView.getContext(), R.color.green));You'll need to add the import:
import androidx.core.content.ContextCompat;app/res/values-sw/strings.xml (1)
336-336: Refine Swahili phrasing for clarity and voice
kutembelewais passive (being visited) while the English intent is active visits performed by the user;ziarais clearer here. Likewise, “majukumu yoyote zaidi” sounds awkward; “kazi zozote zaidi” is the more common phrasing for additional tasks.- <string name="connect_progress_warning_daily_max_reached_single">Umefikia idadi yako ya juu zaidi ya kutembelewa leo. Huenda usiweze kufikia majukumu yoyote zaidi.</string> + <string name="connect_progress_warning_daily_max_reached_single">Umefikia idadi yako ya juu zaidi ya ziara leo. Huenda usiweze kukamilisha kazi zozote zaidi.</string>app/res/values-fr/strings.xml (1)
333-333: Polish French wording for naturalness“Aux tâches suivantes” reads literal; “de tâches supplémentaires” better matches “any more tasks”. Also adjust article for smoother flow.
- <string name="connect_progress_warning_daily_max_reached_single">Vous avez atteint le nombre maximal de visites pour aujourd'hui. Vous ne pourrez peut-être plus accéder aux tâches suivantes.</string> + <string name="connect_progress_warning_daily_max_reached_single">Vous avez atteint votre nombre maximal de visites aujourd'hui. Vous ne pourrez peut-être pas effectuer de tâches supplémentaires.</string>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
app/res/values-es/strings.xml(1 hunks)app/res/values-fr/strings.xml(1 hunks)app/res/values-hi/strings.xml(1 hunks)app/res/values-pt/strings.xml(1 hunks)app/res/values-sw/strings.xml(1 hunks)app/res/values/strings.xml(1 hunks)app/src/org/commcare/adapters/ConnectProgressJobSummaryAdapter.java(1 hunks)
🧰 Additional context used
🧠 Learnings (6)
📓 Common learnings
Learnt from: shubham1g5
PR: dimagi/commcare-android#0
File: :0-0
Timestamp: 2025-05-08T11:08:18.530Z
Learning: PR #3048 "Phase 4 Connect PR" introduces a substantial feature called "Connect" to the CommCare Android app, which includes messaging, job management, delivery tracking, payment processing, authentication flows, and learning modules. It follows a modern architecture using Navigation Components with three navigation graphs, segregated business logic in Manager classes, and proper database persistence.
Learnt from: Jignesh-dimagi
PR: dimagi/commcare-android#0
File: :0-0
Timestamp: 2025-05-08T13:40:19.645Z
Learning: PR #3048 introduces a comprehensive messaging system in the Connect feature, implementing secure encryption using AES-GCM for message content, proper channel management with consent flows, and a well-designed UI separation between sent and received messages with real-time notification integration.
Learnt from: OrangeAndGreen
PR: dimagi/commcare-android#3121
File: app/res/values-ti/strings.xml:350-350
Timestamp: 2025-05-22T14:32:53.133Z
Learning: PersonalID and Connect features haven't been translated to Spanish, Lithuanian, or Norwegian yet, so users with those language settings see the English strings by default.
app/res/values-es/strings.xml (2)
Learnt from: OrangeAndGreen
PR: #3121
File: app/res/values-ti/strings.xml:350-350
Timestamp: 2025-05-22T14:32:53.133Z
Learning: PersonalID and Connect features haven't been translated to Spanish, Lithuanian, or Norwegian yet, so users with those language settings see the English strings by default.
Learnt from: Jignesh-dimagi
PR: #3070
File: app/res/values/strings.xml:73-73
Timestamp: 2025-05-07T06:50:52.518Z
Learning: The empty remote_form_payload_url string resource in strings.xml is intentional legacy code and should be preserved as-is.
app/res/values-sw/strings.xml (1)
Learnt from: Jignesh-dimagi
PR: #3070
File: app/res/values/strings.xml:73-73
Timestamp: 2025-05-07T06:50:52.518Z
Learning: The empty remote_form_payload_url string resource in strings.xml is intentional legacy code and should be preserved as-is.
app/res/values-pt/strings.xml (1)
Learnt from: OrangeAndGreen
PR: #3121
File: app/res/values-ti/strings.xml:350-350
Timestamp: 2025-05-22T14:32:53.133Z
Learning: PersonalID and Connect features haven't been translated to Spanish, Lithuanian, or Norwegian yet, so users with those language settings see the English strings by default.
app/src/org/commcare/adapters/ConnectProgressJobSummaryAdapter.java (2)
Learnt from: shubham1g5
PR: dimagi/commcare-android#0
File: :0-0
Timestamp: 2025-05-08T11:08:18.530Z
Learning: PR #3048 "Phase 4 Connect PR" introduces a substantial feature called "Connect" to the CommCare Android app, which includes messaging, job management, delivery tracking, payment processing, authentication flows, and learning modules. It follows a modern architecture using Navigation Components with three navigation graphs, segregated business logic in Manager classes, and proper database persistence.
Learnt from: OrangeAndGreen
PR: #3108
File: app/src/org/commcare/models/connect/ConnectLoginJobListModel.java:79-92
Timestamp: 2025-06-20T15:51:14.157Z
Learning: The ConnectLoginJobListModel class in app/src/org/commcare/models/connect/ConnectLoginJobListModel.java does not need to implement Parcelable interface as it is not passed between Android activities or fragments.
app/res/values/strings.xml (1)
Learnt from: OrangeAndGreen
PR: #3121
File: app/res/values-ti/strings.xml:350-350
Timestamp: 2025-05-22T14:32:53.133Z
Learning: PersonalID and Connect features haven't been translated to Spanish, Lithuanian, or Norwegian yet, so users with those language settings see the English strings by default.
🔇 Additional comments (2)
app/res/values/strings.xml (1)
442-442: LGTM! Improved user messaging tone.The change from "You will not earn any progress" to "You may not earn any progress" appropriately softens the messaging to be less definitive and more user-friendly when users reach their daily maximum visits.
app/res/values-es/strings.xml (1)
334-334: LGTM! Consistent translation of improved messaging.The Spanish translation appropriately reflects the same softening of language from definitive to tentative messaging, maintaining consistency with the English version change. The translation "Es posible que no obtengas progreso" correctly conveys the uncertainty aspect.
Product Description
Ticket -> https://dimagi.atlassian.net/browse/CCCT-844
Updated msg for all languages and updated color of progressbar to green when daily visits >= max daily limit
Technical Summary
Feature Flag
Safety Assurance
Safety story
Automated test coverage
QA Plan
Labels and Review