Skip to content

Conversation

@shubham1g5
Copy link
Contributor

Copy of #3092 to try and trigger Code Rabbit again.

Labels and Review

  • Do we need to enhance the manual QA test coverage ? If yes, the "QA Note" label is set correctly
  • Does the PR introduce any major changes worth communicating ? If yes, the "Release Note" label is set and a "Release Note" is specified in PR description.
  • Risk label is set correctly
  • The set of people pinged as reviewers is appropriate for the level of risk of the change

@coderabbitai
Copy link

coderabbitai bot commented May 8, 2025

📝 Walkthrough

Walkthrough

This update introduces a large set of new and modified Android UI layout XML files and custom view classes, primarily for a "Connect" feature suite. It adds new layouts for messaging, delivery, job progress, payments, learning modules, and various dialogs and fragments, as well as navigation graph XMLs for structured navigation within these features. Several custom UI components are implemented in Java, including ConnectPhoneInputView, ConnectEditText, CircleProgressBar, and LinearProgressBar, supporting advanced styling and interactivity. Additionally, the update expands and corrects localization string resources across multiple languages, including new full translations and corrections. Some existing layouts are reorganized for improved structure and additional UI elements.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant MainActivity
    participant NavHostFragment
    participant ConnectJobsListsFragment
    participant ConnectJobIntroFragment
    participant ConnectLearningProgressFragment
    participant ConnectDeliveryDetailsFragment
    participant ConnectDeliveryProgressFragment
    participant ConnectResultsListFragment
    participant ConnectDeliveryListFragment

    User->>MainActivity: Launch app
    MainActivity->>NavHostFragment: Display Connect feature (nav_graph_connect)
    NavHostFragment->>ConnectJobsListsFragment: Show job list
    User->>ConnectJobsListsFragment: Select job
    ConnectJobsListsFragment->>ConnectJobIntroFragment: Navigate to job intro
    User->>ConnectJobIntroFragment: Start learning
    ConnectJobIntroFragment->>ConnectLearningProgressFragment: Show learning progress
    User->>ConnectLearningProgressFragment: Complete learning
    ConnectLearningProgressFragment->>ConnectDeliveryDetailsFragment: Show delivery details
    User->>ConnectDeliveryDetailsFragment: Start delivery
    ConnectDeliveryDetailsFragment->>ConnectDeliveryProgressFragment: Show delivery progress
    User->>ConnectDeliveryProgressFragment: View results
    ConnectDeliveryProgressFragment->>ConnectResultsListFragment: Show results
    User->>ConnectResultsListFragment: View delivery list
    ConnectResultsListFragment->>ConnectDeliveryListFragment: Show delivery list
Loading
sequenceDiagram
    participant User
    participant MessagingActivity
    participant NavHostFragment
    participant ChannelListFragment
    participant ChannelConsentDialog
    participant ConnectMessageFragment

    User->>MessagingActivity: Open Connect Messaging
    MessagingActivity->>NavHostFragment: Load nav_graph_connect_messaging
    NavHostFragment->>ChannelListFragment: Show channel list
    User->>ChannelListFragment: Select channel
    ChannelListFragment->>ChannelConsentDialog: Show consent dialog
    User->>ChannelConsentDialog: Accept consent
    ChannelConsentDialog->>ConnectMessageFragment: Navigate to message fragment
    User->>ConnectMessageFragment: Send/Receive messages
Loading

Possibly related PRs

  • dimagi/commcare-android#2870: Implements the Connect Messaging feature, including new activities, fragments, adapters, models, and navigation for messaging; directly related to the messaging UI and infrastructure added in this PR.
  • dimagi/commcare-android#3034: Modifies home_screen.xml by adding new UI elements and restructuring the layout, overlapping with changes in this PR to the same file and elements.
  • dimagi/commcare-android#3009: Modifies fragment_connect_delivery_progress.xml, restructuring the layout hierarchy and scrolling behavior, directly connected to the same file and UI logic in this PR.

Suggested labels

QA Note

Suggested reviewers

  • OrangeAndGreen

Tip

⚡️ Faster reviews with caching
  • CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.

Enjoy the performance boost—your workflow just got faster.

✨ Finishing Touches
  • 📝 Generate Docstrings

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 57

🔭 Outside diff range comments (2)
app/res/values-es/strings.xml (1)

1-1: ⚠️ Potential issue

Remove BOM character from XML declaration.

The file begins with a Byte Order Mark (BOM) before the <?xml…?> declaration, which can cause parsing issues on some Android build tools. Please remove the BOM to ensure consistent file encoding.

app/res/layout/home_screen.xml (1)

11-30: ⚠️ Potential issue

Incorrect ConstraintLayout attributes in LinearLayout
connect_alert_tile is inside a LinearLayout, so app:layout_constraintStart_toStartOf="parent" is ignored. Remove any constraint attributes or move this CardView into a ConstraintLayout if you need constraints.

♻️ Duplicate comments (1)
app/src/org/commcare/views/connect/ConnectEditText.java (1)

225-233: Mixed doubleint conversion in dpToPx jeopardises small dimensions

Math.round() or returning float (as suggested for the other class) preserves sub-pixel accuracy until assignment.

🧹 Nitpick comments (86)
app/res/values-ti/strings.xml (1)

1-577: New Tigrinya localization added: review completeness and encoding
The comprehensive Tigrinya translations cover all UI strings, including the new Connect feature. Please verify that every new key—and especially those with placeholders or quotes—is correctly translated and escaped. Optionally, add tools:locale="ti" on the <resources> tag to enable Android Studio previews for this locale.

app/res/layout/fragment_connect_unlock.xml (1)

1-6: Empty layout resource for Connect Unlock fragment
This new ConstraintLayout serves as a container for the Connect Unlock UI. For better tooling support, consider adding a tools:context="org.commcare.ConnectUnlockFragment" attribute (or appropriate Fragment class) to aid layout previews in Android Studio.

app/res/layout/fragment_connect_results_list.xml (2)

2-5: Consider simplifying layout hierarchy.

Using a ConstraintLayout with a single full-screen RecyclerView adds unnecessary nesting and overhead. You can replace the root ConstraintLayout with the RecyclerView directly, or use a simpler container (e.g., FrameLayout) if you plan to add other views later.


7-13: Use match-constraint for better compatibility.

When using ConstraintLayout, prefer 0dp for layout_width and layout_height (match-constraint) and constrain all sides (start, end, top, bottom) instead of match_parent. This avoids layout warnings and ensures proper behavior if you add new constraints later.

app/res/layout/fragment_channel_list.xml (2)

1-7: Simplify single-child ConstraintLayout.

As with other fragment layouts, this ConstraintLayout only hosts a full-screen RecyclerView. Consider using the RecyclerView as the root element or a simpler container (e.g., FrameLayout) to reduce nesting and improve rendering performance.


9-14: Enforce resource ID naming conventions.

Resource IDs should use lowercase snake_case. Rename @+id/rvChannel (camelCase) to something like @+id/rv_channel_list for consistency across the codebase.

app/res/layout/view_country_code_edittext.xml (1)

24-32: Externalize hardcoded hint and standardize IDs.

Move the hardcoded hint "00000000" into strings.xml (e.g., @string/country_code_hint). Also, resource IDs should follow lowercase snake_case, e.g., rename etPhoneNumber to @+id/edit_text_phone_number.

app/res/layout/activity_connect_messaging.xml (1)

5-8: Avoid overly generic IDs.

The root layout uses android:id="@+id/main", which is too generic and may collide with other IDs. Consider a more descriptive name like @+id/activity_connect_messaging_root or remove the ID if it’s unused.

app/res/layout/screen_connect.xml (1)

1-6: Add preview metadata and enforce RTL-friendly constraints

  • Consider adding tools:context="…Activity" (or your hosting Activity) at the root to enable full-screen previews in Android Studio.
  • Replace layout_constraintLeft_toLeftOf/Right_toRightOf with layout_constraintStart_toStartOf/End_toEndOf for proper RTL support.

Also applies to: 13-14

app/res/layout/fragment_connect_downloading.xml (3)

8-16: Flatten layout and externalize dimensions
Nesting a LinearLayout inside a ConstraintLayout increases view-hierarchy depth. You can center children directly using ConstraintLayout constraints. Also, extract hard-coded values like 100dp, 20dp, and 200dp into res/values/dimens.xml to maintain consistency.


25-31: Improve layout preview with tools:text
The title TextView currently has no text set at design time. Adding a tools:text="Downloading…" (or similar) will make it easier to preview the UI in Android Studio without affecting runtime.


41-48: Prefer gone over invisible when hiding views
android:visibility="invisible" reserves the view’s space even when hidden. If you intend to collapse it completely until it’s ready, use android:visibility="gone".

app/res/layout/item_login_connect_home_corrupt_apps.xml (2)

8-10: Extract margin values to dimen resources
Hard-coded margins (16dp, 8dp) should live in res/values/dimens.xml to ensure design consistency and ease future updates.


27-35: Add tools:text for dynamic title preview
The tvTitle TextView has no default text; adding a tools:text="Corrupt App Detected" (or similar) will make the layout easier to inspect in the IDE without affecting runtime behavior.

app/res/layout/connect_delivery_item.xml (4)

9-16: Simplify the status icon container
You can reduce the view hierarchy by applying the background shape directly to the ImageView (or wrapping it in a MaterialCardView) instead of using a separate LinearLayout.


27-37: Add preview text via tools:text
There’s no android:text set here (it’s probably populated at runtime). For better layout previews, add e.g.

tools:text="@string/sample_delivery_item_name"

40-53: Add preview text and ensure dynamic binding
Similarly, delivery_item_reason has no android:text. Use tools:text for previews to catch layout issues early.


55-62: Add preview text for date field
delivery_item_date is empty at design time; include tools:text="@string/sample_date" for accurate preview.

app/res/layout/fragment_channel_consent_bottom_sheet.xml (4)

39-47: Use tools:text instead of hard-coded placeholder
channel_name currently uses android:text="(channel name)". Replace with tools:text="Sample Channel" to avoid shipping placeholder text to end users.


57-64: Replace RelativeLayout with ConstraintLayout
You don’t need a RelativeLayout; a ConstraintLayout can simplify alignment (and remove deprecated fill_parent). Migrating will make constraints explicit and reduce nested layouts.


62-74: Use start/end instead of left/right
Replace layout_alignParentLeft with layout_alignParentStart on the decline button for proper RTL support.


75-87: Use start/end instead of right/left
Similarly, change layout_alignParentRight on the accept button to layout_alignParentEnd.

app/res/layout/view_job_card.xml (3)

20-26: Use tools:text, not android:text, for dynamic content
tv_job_title has hard-coded text. If this is set at runtime, switch to tools:text="Job Title Here" so you don’t ship placeholder strings.


28-38: Use tools:text for description as well
tv_job_description is also dynamic. Replace android:text="Check vaccine status" with a tools:text attribute.


54-65: Inconsistent ID naming and redundant visibility attributes
tvDailyVisitTitle breaks snake_case convention and redundantly sets both android:visibility and tools:visibility. Rename to tv_daily_visit_title and remove the extra visibility attribute.

app/res/layout/home_screen.xml (2)

84-88: Use match_parent and fillViewPort for scrollable content
A NestedScrollView with wrap_content height can cause measurement issues. Consider using match_parent and android:fillViewport="true" to ensure proper scrolling behavior.


88-92: Remove unsupported orientation on RelativeLayout
android:orientation has no effect on RelativeLayout. Either switch to LinearLayout (if you need orientation) or remove this attribute.

app/res/layout/item_progress_job_summary_visit.xml (2)

9-18: Add preview text for primary visit title
Include tools:text="Primary Visit" so you can visualize this item in the layout editor.


20-29: Add preview text for visit count
Use tools:text="2/2" on tv_primary_visit_count for accurate previewing during design.

app/res/layout/connect_verification_item.xml (3)

3-7: Avoid hard-coded padding without namespace grouping
All xmlns: declarations should appear together for readability. Consider moving xmlns:app alongside xmlns:android at the top of the root tag.


9-17: Use wrap_content or match_constraints instead of fixed dp width
Setting android:layout_width="120dp" on delivery_item_name may truncate long names on small devices. Consider using wrap_content or 0dp with constraintEnd_toStartOf plus app:layout_constraintWidth_percent for responsive layouts.


19-27: Missing end constraint on delivery_item_date
The delivery_item_date view has only a start constraint. While wrap_content width handles horizontal size, you may want to explicitly constrain its end (e.g., app:layout_constraintEnd_toEndOf="parent") to prevent unpredictable placement in RTL layouts.

app/res/layout/view_progress_job_card.xml (1)

102-107: Unused guideline and non-descriptive ID
The Guideline with id guideline3 isn’t referenced by any view. Remove it or rename to a descriptive name and apply it, or drop it if not needed.

app/res/layout/item_channel.xml (1)

2-9: Remove irrelevant orientation and margin defaults
ConstraintLayout ignores android:orientation. Also android:layout_margin="0dp" is redundant when 0. Remove these for clarity.

app/res/layout/fragment_connect_message.xml (1)

14-21: Remove invalid orientation attribute
android:orientation="vertical" on RecyclerView has no effect and can be removed.

app/res/layout/fragment_connect_job_intro.xml (3)

2-7: Consider adding fillViewport for ScrollView
To ensure the content expands to fill the screen viewport even when the child content is smaller, add:

android:fillViewport="true"

to the <ScrollView> element for consistent scrolling behavior.


21-28: Use start/end and CardView background attribute
For proper RTL support and to leverage CardView styling, replace:

- android:layout_marginLeft="16dp"
- android:layout_marginRight="16dp"
- android:backgroundTint="@color/connect_blue_color"
+ android:layout_marginStart="16dp"
+ android:layout_marginEnd="16dp"
+ app:cardBackgroundColor="@color/connect_blue_color"

102-112: Migrate to MaterialButton icon API
android:drawableRight and android:backgroundTint are deprecated on MaterialButton. Use the icon API instead:

-    android:drawableRight="@drawable/ic_connect_arrow_forward_20px"
-    android:backgroundTint="@color/white"
+    app:icon="@drawable/ic_connect_arrow_forward_20px"
+    app:iconGravity="textEnd"
+    app:backgroundTint="@color/white"

This change simplifies styling and ensures theming consistency.

app/res/navigation/nav_graph_connect_messaging.xml (1)

9-11: Use string resources for labels
Hard-coded labels hinder localization. Replace:

android:label="fragment_connect_messaging_consent_fragment"

with a reference to a string resource, e.g.:

android:label="@string/connect_messaging_consent_title"
app/res/layout/fragment_connect_results_summary_list.xml (1)

10-14: Remove redundant orientation on RelativeLayout
android:orientation has no effect on a RelativeLayout. Please remove:

android:orientation="vertical"

to clean up unused attributes.

app/res/layout-land/home_screen.xml (3)

94-96: Consider changing NestedScrollView height to match_parent
Using wrap_content may not allow the scroll container to fill available space in landscape. For consistent scrolling, consider:

-    android:layout_height="wrap_content"
+    android:layout_height="match_parent"

101-101: Remove redundant orientation on RelativeLayout
android:orientation is not applicable to RelativeLayout. Please remove this attribute:

android:orientation="vertical"

107-110: Avoid negative margins for positioning
Using android:layout_marginTop="-35dp" is fragile. Consider restructuring the layout—e.g., with a ConstraintLayout—so that you can position views without negative margins.

app/res/layout/fragment_connect_delivery_list.xml (2)

17-24: Consistent ID naming for filter bar CardView
IDs like llFilterByStatus imply a LinearLayout (ll) but are CardView elements. Rename to a more descriptive prefix, e.g., cvFilterByStatus, to match the view type and improve readability. Also make it interactive by adding clickable/focusable for accessibility.

Example:

- <androidx.cardview.widget.CardView
-     android:id="@+id/llFilterByStatus"
+ <androidx.cardview.widget.CardView
+     android:id="@+id/cvFilterByStatus"
+     android:clickable="true"
+     android:focusable="true"

26-29: Avoid unsupported layout_marginVertical attribute
android:layout_marginVertical="15dp" (Line 28) may not be honored on all API levels. Replace with explicit top and bottom margins for consistency:

- android:layout_marginVertical="15dp"
+ android:layout_marginTop="15dp"
+ android:layout_marginBottom="15dp"
app/res/layout/fragment_connect_learning_progress.xml (5)

55-60: Remove ignored ConstraintLayout attributes in LinearLayout
Attributes like app:layout_constraintStart_toStartOf and app:layout_constraintTop_toTopOf (Lines 58–59) apply only to children of ConstraintLayout. They have no effect inside this LinearLayout—remove them to avoid confusion.


63-67: Replace deprecated fill_parent with match_parent
android:layout_width="fill_parent" (Line 65) is deprecated. Use match_parent instead:

- android:layout_width="fill_parent"
+ android:layout_width="match_parent"

142-150: Use app:cardBackgroundColor for CardView background
The CardView (Line 148) sets android:background, which bypasses CardView’s corner radius and elevation. Replace with app:cardBackgroundColor:

- android:background="@color/connect_blue_color_10"
+ app:cardBackgroundColor="@color/connect_blue_color_10"

197-202: Remove invalid ConstraintLayout constraints on CardView
The CardView with id connect_learning_certificate_container is inside a LinearLayout yet has app:layout_constraint* attributes (Lines 199–201) that will be ignored. Delete them to keep the layout clean:

- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"

100-108: Opt to use custom CircleProgressBar for consistency
The <ProgressBar> (Lines 100–108) does not leverage the custom CircleProgressBar used elsewhere in the Connect feature. Consider replacing it to maintain a unified look:

- <ProgressBar
+ <org.commcare.views.connect.CircleProgressBar
    android:id="@+id/connect_learning_progress_bar"
    android:layout_width="200dp"
    android:layout_height="200dp"
    ...
app/res/layout/item_login_connect_home_apps.xml (3)

14-20: Remove unsupported shadow attributes on CardView
Attributes android:shadowColor, android:shadowDx, android:shadowDy, and android:shadowRadius (Lines 14–17) are not supported by CardView and will be ignored. Rely on app:cardElevation or a custom drawable for shadows instead.


33-36: Use tools:text for preview instead of empty android:text
android:text="" yields no preview in the layout editor. Replace with a tools:text sample:

<TextView
    ...
    android:text=""
    tools:text="@string/sample_job_title" />

96-102: Provide design-time date placeholder with tools:text
The TextView with id @id/tvDate has no text, making it blank in previews. Add:

<TextView
    ...
    android:text=""
    tools:text="May 15, 2025" />
app/res/layout/item_chat_left_view.xml (3)

2-6: Remove ineffective layout_gravity on root ConstraintLayout
android:layout_gravity="start" (Line 6) has no effect on the root view. Remove it for clarity.


34-41: Use tools:text for placeholder chat message
The TextView tvChatMessage (Line 38) ships with dummy text. Replace with tools:text and clear android:text:

- android:text="Some dummy text message from user A"
+ android:text=""
+ tools:text="Hi there! Are you free tomorrow?"

42-51: Use tools:text for placeholder timestamp and rename for clarity
The timestamp TextView (Line 48) uses android:text="11:00 AM". Change to:

- android:text="11:00 AM"
+ android:text=""
+ tools:text="11:00 AM"

Optionally rename @+id/tvUserName to @+id/tvTimestamp to reflect its purpose.

app/res/layout/connect_delivery_progress_item.xml (2)

11-17: Remove unsupported shadow attributes on CardView
Lines 11–17 (android:shadowColor, android:shadowDx, android:shadowDy, android:shadowRadius) are ignored by CardView. Use app:cardElevation="10dp" for shadow.


34-47: Consider flattening nested LinearLayouts with ConstraintLayout
Multiple nested LinearLayouts inflate the view hierarchy. You can simplify and improve performance using a single ConstraintLayout:

<androidx.constraintlayout.widget.ConstraintLayout ...>
    <!-- Icon and approved count aligned within one layout -->
</androidx.constraintlayout.widget.ConstraintLayout>
app/res/layout/fragment_connect_progress_delivery.xml (3)

40-51: Remove constraint layout attributes from TextView in LinearLayout.

The TextView has app:layout_constraintStart_toStartOf and app:layout_constraintTop_toTopOf attributes which are only applicable in ConstraintLayout but are being used within a LinearLayout where they have no effect.

<TextView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:layout_marginStart="16dp"
    android:text="@string/connect_progress_title"
    android:textColor="@color/black"
    android:textSize="16sp"
    android:textStyle="bold"
-   app:layout_constraintStart_toStartOf="parent"
-   app:layout_constraintTop_toTopOf="parent"
    />

116-122: Add ID attribute to TextView for easier reference in code.

This TextView for the "complete" status doesn't have an ID attribute, which will make it difficult to access and modify programmatically.

<TextView
+   android:id="@+id/connect_progress_complete_text"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="@string/connect_learn_complete"
    android:textColor="@color/white"
    android:visibility="gone"
    android:textStyle="bold"/>

165-166: Replace drawableRight with drawableEnd for RTL support.

Using drawableRight is deprecated as it doesn't properly support right-to-left (RTL) layouts. Replace it with drawableEnd for better internationalization support.

-   android:drawableRight= "@drawable/ic_connect_directory_sync"
+   android:drawableEnd="@drawable/ic_connect_directory_sync"
    android:drawablePadding="5dp" />
app/res/layout/fragment_connect_job_detail_bottom_sheet_dialog.xml (2)

49-55: Move paddingBottom from CardView to inner layout.

CardView doesn't directly apply padding to its content. The padding should be moved to the inner ConstraintLayout for proper effect.

<androidx.cardview.widget.CardView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginTop="16dp"
-   android:paddingBottom="20dp"
    app:cardCornerRadius="10dp"
    app:cardElevation="5dp">

66-69: Redundant title text.

The same string resource @string/connect_job_info_delivery_detail is used for both the main title (line 33) and this inner title. Consider using different, more specific string resources to differentiate these elements.

<TextView
    android:id="@+id/connect_delivery_title"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
-   android:text="@string/connect_job_info_delivery_detail"
+   android:text="@string/connect_delivery_details_title"
    android:textColor="@color/white"
    android:textSize="16sp"
    android:textStyle="bold"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent" />
app/src/org/commcare/views/connect/LinearProgressBar.java (2)

21-21: Unused stroke width property.

There's a field and setter for stroke width, but it's not used in the drawing logic as noted in the comment. Remove unused code to avoid confusion.

- private float strokeWidth = 10f;

- public void setStrokeWidth(float width) {
-   this.strokeWidth = width;
-   // Not applicable for a linear bar, but can be implemented if necessary
-   invalidate();
- }

Also applies to: 84-88


90-96: Remove debug logging from production code.

The Log.e statement in setProgressColor uses the error log level for what appears to be debug information. Error logs should be reserved for actual errors.

public void setProgressColor(int color) {
-   Log.e("LinearProgressBar", "Setting progress color to: " + color);
    this.progressColor = color;
    this.isGradient = false;
    progressPaint.setColor(color);
    invalidate();
}
app/res/layout/connect_payment_item.xml (4)

46-54: Remove constraint attributes from ImageView in LinearLayout.

This ImageView has app:layout_constraint* attributes but is inside a LinearLayout where they have no effect. Remove these to improve clarity and performance.

<ImageView
    android:id="@+id/imgReceived"
    android:layout_width="15dp"
    android:layout_height="15dp"
    android:layout_marginEnd="10dp"
    android:contentDescription="@null"
    android:src="@drawable/ic_connect_payment_received_check"
-   app:layout_constraintBottom_toBottomOf="@+id/name"
-   app:layout_constraintStart_toEndOf="@+id/name"
-   app:layout_constraintTop_toTopOf="@+id/name" 
/>

65-74: Remove constraint attributes from ImageView in LinearLayout.

Similar to the previous issue, this ImageView also has constraint attributes within a LinearLayout where they don't apply.

<ImageView
    android:id="@+id/imgYellowDot"
    android:layout_width="7dp"
    android:layout_height="7dp"
    android:layout_marginStart="6dp"
    android:layout_marginEnd="6dp"
    android:contentDescription="@null"
    android:src="@drawable/ic_connect_yellow_dot"
-   app:layout_constraintBottom_toBottomOf="@+id/name"
-   app:layout_constraintStart_toEndOf="@+id/name"
-   app:layout_constraintTop_toTopOf="@+id/name" 
/>

92-92: Remove ineffective layout_weight attribute from CardView.

The CardView has android:layout_weight="1" but it's not inside a weighted container like LinearLayout with horizontal/vertical orientation, so this property has no effect.

<androidx.cardview.widget.CardView
    android:id="@+id/confirm"
    android:layout_width="wrap_content"
    android:layout_height="30dp"
    android:layout_marginTop="10dp"
    android:layout_marginEnd="20dp"
-   android:layout_weight="1"
    app:cardCornerRadius="20dp"
    app:cardElevation="0dp"
    app:layout_constraintBottom_toBottomOf="@+id/name"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintTop_toTopOf="@+id/name">

147-157: Add ID to TextView in revert payment section.

This TextView doesn't have an ID attribute, which will make it difficult to access and modify programmatically.

<TextView
+   android:id="@+id/tv_revert_payment"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="@string/connect_payment_revert"
    android:textColor="@color/connect_red"
    android:textSize="14sp"
    android:textStyle="bold"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toBottomOf="@id/name"
    tools:text="@string/connect_payment_revert"
    />
app/res/layout/screen_login.xml (2)

134-143: Improve accessibility by using dimension resources.

The input field now has hardcoded values for padding (15dp), height (50dp), and text size (18sp). Consider using dimension resources for these values to improve maintainability and support for different screen sizes and accessibility requirements.

-                android:paddingLeft="15dp"
-                android:layout_height="50dp"
-                android:textSize="18sp"
+                android:paddingLeft="@dimen/edit_text_padding"
+                android:layout_height="@dimen/input_field_height"
+                android:textSize="@dimen/input_text_size"

152-155: Enhance accessibility for password field wrapper.

Similar to the username field, consider using dimension resources for the password field wrapper's height and margins.

-                android:layout_height="50dp"
-                android:padding="0dp"
-                android:layout_marginTop="15dp"
+                android:layout_height="@dimen/input_field_height"
+                android:padding="0dp"
+                android:layout_marginTop="@dimen/field_vertical_spacing"
app/res/layout/fragment_connect_delivery_progress.xml (2)

6-6: Replace hardcoded color with resource.

The background color is hardcoded as "#e1e0e0". Consider using a color resource for better maintainability.

-    android:background="#e1e0e0"
+    android:background="@color/connect_light_gray_background"

17-18: Replace hardcoded color with resource.

The background color is hardcoded as "#fff". Consider using the standard color resource.

-            android:background="#fff"
+            android:background="@color/white"
app/src/org/commcare/views/connect/CircleProgressBar.java (2)

1-110: Consider adding XML attributes support.

The custom view would benefit from supporting custom XML attributes so it can be fully configured in layout files.

Consider adding:

  1. Custom attributes in attrs.xml:
<declare-styleable name="CircleProgressBar">
    <attr name="progressColor" format="color" />
    <attr name="progressBackgroundColor" format="color" />
    <attr name="progressStrokeWidth" format="dimension" />
    <attr name="initialProgress" format="float" />
</declare-styleable>
  1. Reading these attributes in your constructor:
public CircleProgressBar(Context context, AttributeSet attrs) {
    super(context, attrs);
    
    TypedArray a = context.getTheme().obtainStyledAttributes(
            attrs, R.styleable.CircleProgressBar, 0, 0);
    
    try {
        progressColor = a.getColor(R.styleable.CircleProgressBar_progressColor, Color.BLUE);
        backgroundColor = a.getColor(R.styleable.CircleProgressBar_progressBackgroundColor, Color.LTGRAY);
        strokeWidth = a.getDimension(R.styleable.CircleProgressBar_progressStrokeWidth, 10f);
        progress = a.getFloat(R.styleable.CircleProgressBar_initialProgress, 0f);
    } finally {
        a.recycle();
    }
    
    init();
}

79-82: Consider adding animation support.

The progress updates would be more visually appealing with smooth animations.

You could implement this by:

  1. Adding a ValueAnimator to animate between the current and target progress values
  2. Using ObjectAnimator.ofFloat(this, "progress", currentProgress, targetProgress)

This would make progress changes more user-friendly and visually appealing.

app/res/layout/item_chat_right_view.xml (3)

37-43: Hard-coded placeholder message should be removed before shipping

The layout still contains "Some dummy text message from user A". Leaving literal text violates localisation and QA checklists and can accidentally ship to production.


52-58: Timestamp placeholder must be externalised to a string resource or set programmatically

"12:00 AM" is likewise a hard-coded demo value. Externalise or bind the real timestamp via adapter to avoid stale UI.


28-35: Inefficient nested layout

You are nesting LinearLayout inside a RelativeLayout inside a ConstraintLayout. Since ConstraintLayout can express the required constraints itself, consider flattening one level (e.g. make LinearLayout the direct child of ConstraintLayout). This reduces measure-layout passes and improves scroll performance in chat lists.

app/src/org/commcare/views/ConnectPhoneInputView.java (3)

108-110: dpToPx loses precision; return float or apply rounding later

Casting to int here truncates fractions, so thin borders (e.g. 0.5 dp hairlines) collapse to 0 px on mdpi devices. Recommend returning float and casting only when setting dimensions.

-    private int dpToPx(int dp) {
-        return (int) (dp * getResources().getDisplayMetrics().density);
+    private int dpToPx(int dp) {
+        return Math.round(dp * getResources().getDisplayMetrics().density);
     }

116-124: Expose a way to remove the attached TextWatcher

setOnEditTextChangedListener only adds watchers; callers cannot later detach them, which can leak activities/fragments. Provide a corresponding removeOnEditTextChangedListener or return the created watcher instance.


89-99: Repeated calls to setLayoutParams inside init() may cause unnecessary layout passes

Setting width and margins separately followed by setLayoutParams() twice costs extra. Build the LayoutParams, set fields, then assign once.

app/res/navigation/nav_graph_connect.xml (1)

161-165: Inconsistent label for bottom sheet dialog.
All fragments use fragment_* prefix in their labels. The dialog currently uses the class name:

android:label="ConnectJobDetailBottomSheetDialogFragment"

For consistency, consider:

- android:label="ConnectJobDetailBottomSheetDialogFragment"
+ android:label="fragment_connect_job_detail_bottom_sheet_dialog"
app/res/values-fr/strings.xml (2)

79-79: Inconsistent ellipsis spacing.
This string uses a space before the ellipsis (" …"), while others do not. For consistency, tighten the punctuation:

- <string name="loading_form">Chargement du formulaire …</string>
+ <string name="loading_form">Chargement du formulaire…</string>

120-120: Inconsistent capitalization.
“Formulaire” is capitalized here but lowercase elsewhere. Align with other entries:

- <string name="saving_form">Sauvegarde du Formulaire …</string>
+ <string name="saving_form">Sauvegarde du formulaire…</string>
app/res/values-pt/strings.xml (2)

14-27: Empty support email placeholder.
<string name="support_email_address_default"></string> is empty. If intentional, consider documenting why—or provide a sensible default or comment.


246-246: Use single-character ellipsis.
Portuguese strings generally use the three-dot sequence; consider switching to the single-character ellipsis () for consistency:

- <string name="finding_location">Encontrando localização...</string>
+ <string name="finding_location">Encontrando localização…</string>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 781a3b6 and d882931.

📒 Files selected for processing (55)
  • app/res/layout-land/home_screen.xml (3 hunks)
  • app/res/layout/activity_connect_messaging.xml (1 hunks)
  • app/res/layout/connect_delivery_item.xml (1 hunks)
  • app/res/layout/connect_delivery_progress_item.xml (1 hunks)
  • app/res/layout/connect_payment_item.xml (1 hunks)
  • app/res/layout/connect_verification_item.xml (1 hunks)
  • app/res/layout/dialog_payment_confirmation.xml (1 hunks)
  • app/res/layout/fragment_channel_consent_bottom_sheet.xml (1 hunks)
  • app/res/layout/fragment_channel_list.xml (1 hunks)
  • app/res/layout/fragment_connect_delivery_details.xml (1 hunks)
  • app/res/layout/fragment_connect_delivery_list.xml (1 hunks)
  • app/res/layout/fragment_connect_delivery_progress.xml (1 hunks)
  • app/res/layout/fragment_connect_downloading.xml (1 hunks)
  • app/res/layout/fragment_connect_job_detail_bottom_sheet_dialog.xml (1 hunks)
  • app/res/layout/fragment_connect_job_intro.xml (1 hunks)
  • app/res/layout/fragment_connect_jobs_list.xml (1 hunks)
  • app/res/layout/fragment_connect_learning_progress.xml (1 hunks)
  • app/res/layout/fragment_connect_message.xml (1 hunks)
  • app/res/layout/fragment_connect_progress_delivery.xml (1 hunks)
  • app/res/layout/fragment_connect_results_list.xml (1 hunks)
  • app/res/layout/fragment_connect_results_summary_list.xml (1 hunks)
  • app/res/layout/fragment_connect_unlock.xml (1 hunks)
  • app/res/layout/fragment_recovery_code.xml (2 hunks)
  • app/res/layout/grid_header_top_banner.xml (0 hunks)
  • app/res/layout/home_screen.xml (2 hunks)
  • app/res/layout/item_channel.xml (1 hunks)
  • app/res/layout/item_chat_left_view.xml (1 hunks)
  • app/res/layout/item_chat_right_view.xml (1 hunks)
  • app/res/layout/item_login_connect_home_apps.xml (1 hunks)
  • app/res/layout/item_login_connect_home_corrupt_apps.xml (1 hunks)
  • app/res/layout/item_progress_job_summary_visit.xml (1 hunks)
  • app/res/layout/screen_connect.xml (1 hunks)
  • app/res/layout/screen_connect_phone_verify.xml (2 hunks)
  • app/res/layout/screen_connect_user_deactivate_otp_verify.xml (2 hunks)
  • app/res/layout/screen_login.xml (5 hunks)
  • app/res/layout/select_install_mode_fragment.xml (2 hunks)
  • app/res/layout/square_card.xml (1 hunks)
  • app/res/layout/view_country_code_edittext.xml (1 hunks)
  • app/res/layout/view_job_card.xml (1 hunks)
  • app/res/layout/view_progress_job_card.xml (1 hunks)
  • app/res/navigation/nav_graph_connect.xml (1 hunks)
  • app/res/navigation/nav_graph_connect_messaging.xml (1 hunks)
  • app/res/navigation/nav_graph_connectid.xml (2 hunks)
  • app/res/values-es/strings.xml (2 hunks)
  • app/res/values-fr/strings.xml (8 hunks)
  • app/res/values-lt/strings.xml (1 hunks)
  • app/res/values-no/strings.xml (1 hunks)
  • app/res/values-pt/strings.xml (7 hunks)
  • app/res/values-sw/strings.xml (1 hunks)
  • app/res/values-ti/strings.xml (1 hunks)
  • app/src/org/commcare/views/ConnectPhoneInputView.java (1 hunks)
  • app/src/org/commcare/views/CustomButtonWithText.java (1 hunks)
  • app/src/org/commcare/views/connect/CircleProgressBar.java (1 hunks)
  • app/src/org/commcare/views/connect/ConnectEditText.java (1 hunks)
  • app/src/org/commcare/views/connect/LinearProgressBar.java (1 hunks)
💤 Files with no reviewable changes (1)
  • app/res/layout/grid_header_top_banner.xml
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: shubham1g5
PR: dimagi/commcare-android#0
File: :0-0
Timestamp: 2025-05-08T11:08:18.504Z
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.
app/res/navigation/nav_graph_connect.xml (1)
Learnt from: shubham1g5
PR: dimagi/commcare-android#0
File: :0-0
Timestamp: 2025-05-08T11:08:18.504Z
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.
🔇 Additional comments (33)
app/src/org/commcare/views/CustomButtonWithText.java (1)

3-10: Remove unused imports: looks good.
The cleanup removing android.annotation.TargetApi and android.os.Build imports is safe and improves readability without any functional impact.

app/res/values-lt/strings.xml (1)

152-152: Correct XML escaping
The updated root_element_error string now properly escapes the <manifest> tag as &lt;manifest&gt;, ensuring valid XML parsing. This change mirrors fixes in other locale files.

app/res/layout/square_card.xml (1)

18-20: Consistent indentation applied
The adjusted indentation of the xmlns:app and layout attributes improves readability and aligns with the project's XML style guidelines. No functional changes introduced.

app/res/layout/fragment_recovery_code.xml (2)

43-43: Approve formatting consistency for bold style.
Whitespace adjustment around android:textStyle="bold" in @+id/phone_title improves readability without affecting UI.


149-149: Approve formatting consistency for bold style.
Consistent indentation around android:textStyle="bold" in @+id/connect_pin_error_message aids maintainability.

app/res/layout/screen_connect_user_deactivate_otp_verify.xml (2)

103-103: Approve styling adjustment for error message.
The whitespace change around android:textStyle="bold" on @+id/connect_phone_verify_error is purely cosmetic and maintains consistency with other Connect screens.


114-114: Approve styling adjustment for resend label.
Refining whitespace for android:textStyle="bold" on @+id/connect_phone_verify_resend preserves functionality and matches the style across verification layouts.

app/res/values-no/strings.xml (1)

152-152: Fix XML entity escaping.
Corrected the root_element_error string to use &lt;manifest&gt; instead of an improperly escaped sequence, ensuring the literal tag displays correctly. This aligns with updates in other locales.

app/res/layout/screen_connect_phone_verify.xml (2)

103-103: Approve styling adjustment for error TextView.
Whitespace refinement around android:textStyle="bold" on @+id/connect_phone_verify_error is cosmetic and improves attribute consistency.


115-115: Approve styling adjustment for resend TextView.
The indentation tweak for android:textStyle="bold" on @+id/connect_phone_verify_resend maintains uniform styling across Connect verification screens.

app/res/layout/select_install_mode_fragment.xml (2)

2-5: Approve namespace and attribute reordering.
Moving xmlns:android to the first line of the root <RelativeLayout> and repositioning android:id enhances readability without altering behavior.


121-121: This blank line addition is purely cosmetic spacing and has no impact on layout or functionality.

app/res/values-es/strings.xml (2)

113-113: Approve Spanish translation adjustment.

The corrected review string "Continuar" aligns with the intended action and improves user experience.


151-151: Approve proper XML escaping.

The root_element_error string now correctly escapes <manifest> as &lt;manifest&gt;, fixing the previous rendering issue.

app/res/navigation/nav_graph_connectid.xml (2)

129-131: Ensure back stack clearance aligns with flow expectations
Changing app:popUpTo to @id/connectid_signup_fragment with popUpToInclusive="true" will clear the signup fragment (and everything above it) from the back stack. Please verify that this does not inadvertently remove intermediate fragments required later in the ConnectID flow.


141-143: Confirm popUpTo change for secondary phone action
Similarly, this action now pops up to and includes connectid_signup_fragment. Ensure that all prerequisite arguments and UI state for the secondary-phone fragment remain intact and that no unintended fragments are dropped.

app/res/layout/connect_verification_item.xml (1)

30-35: Consider contentDescription for accessibility
Although TextViews typically don’t need contentDescription, ensure that any non-textual view in this file (e.g., icons in sibling layouts) includes proper accessibility labels.

app/res/values-sw/strings.xml (1)

1-15: ```shell
#!/bin/bash

Verify XML well-formedness using Python (since xmllint is not available)

python3 - << 'EOF'
import xml.etree.ElementTree as ET
try:
ET.parse('app/res/values-sw/strings.xml')
print("XML is well-formed")
except Exception as e:
print("XML parsing error:", e)
EOF


Please share the output of this check. Once XML well-formedness is confirmed, ensure Android Lint runs in an environment with a valid JAVA_HOME (e.g., install/configure Java and rerun `./gradlew lint`).

</details>
<details>
<summary>app/res/layout/screen_login.xml (3)</summary>

`8-8`: **Good change to use a color resource.**

The change from a custom resource to the standard `@color/white` improves clarity and consistency.

---

`137-138`: **Good RTL support improvement.**

Changing from `drawableLeft` to `drawableStart` improves support for right-to-left languages.

---

`161-166`: **Good use of RTL support in password field.**

The consistent styling with `drawableStart` and match_parent height is appropriate here.

</details>
<details>
<summary>app/res/layout/fragment_connect_delivery_details.xml (1)</summary>

`1-11`: **Well-structured ScrollView root element.**

The ScrollView setup with a matching background color to the Connect feature is appropriate.

</details>
<details>
<summary>app/res/layout/fragment_connect_delivery_progress.xml (2)</summary>

`92-95`: **Button style application is good.**

Good use of a predefined style for the negative button.

---

`150-170`: **Well-designed TabLayout configuration.**

The TabLayout is properly configured with custom indicator, colors, and text appearance.

</details>
<details>
<summary>app/src/org/commcare/views/connect/CircleProgressBar.java (2)</summary>

`14-40`: **Well-implemented custom View constructors.**

The CircleProgressBar correctly implements all three required constructors with proper delegation to the init method.

---

`56-77`: **Efficient onDraw implementation.**

The drawing logic is implemented efficiently, calculating dimensions based on the view size and using appropriate Canvas methods.

</details>
<details>
<summary>app/res/navigation/nav_graph_connect.xml (2)</summary>

`5-6`: **Verify startDestination aligns with unlock flow.**
The graph starts at `connect_jobs_list_fragment`, skipping the `connect_unlock_fragment`. If the unlock screen must be shown first when a user needs to authenticate or unlock, consider changing the `app:startDestination` to `@id/connect_unlock_fragment` or adding conditional navigation logic to route there initially.

---

`15-19`: **Inconsistent ID vs. class name in jobs list fragment.**
The fragment is declared as  
```xml
android:id="@+id/connect_jobs_list_fragment"
android:name="org.commcare.fragments.connect.ConnectJobsListsFragment"

Note the extra 's' in ConnectJobsListsFragment. Please confirm the actual class name and ensure the ID, Java/Kotlin class, and layout all match (e.g. ConnectJobsListFragment vs ConnectJobsListsFragment).

app/res/values-fr/strings.xml (2)

13-13: Verify the tools namespace usage.
You've added xmlns:tools to <resources> for lint directives. Ensure that no unintended tools:ignore or other directives are affecting string resources.


176-192: Connect feature strings look comprehensive.
The newly added French localization for the Connect flows appears complete and well-structured, aside from the issues noted above.

app/res/values-pt/strings.xml (3)

86-86: Check translation consistency.
<string name="proceed">AVANCE</string> looks like French (“avance”). Confirm the intended Portuguese term (e.g., “Prosseguir” or “Avançar”).


13-593: Bulk Portuguese Connect & recovery strings are comprehensive.
The expanded Portuguese localization covers the Connect feature and recovery flows thoroughly and follows the structure of the navigation graph.


102-102: ⚠️ Potential issue

Incorrect escape and English text.
This line is still in English and uses faulty escaping:

- <string name="clearanswer_confirm">Remove the response to \%s\"?"</string>
+ <string name="clearanswer_confirm">Remover a resposta a "%s"?</string>

Translate and fix the escape sequence.

Likely an incorrect or invalid review comment.

<string name="download">Obtenez celle sélectionnée</string>
<string name="download_forms_result">Resultat du téléchargement</string>
<string name="downloading_data">Connection au serveur...</string>
<string name="downloading_data">Connection au serveur</string>
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Spelling error in translation.
The French term for connection is “connexion” with an ‘x’:

- <string name="downloading_data">Connection au serveur…</string>
+ <string name="downloading_data">Connexion au serveur…</string>

Please correct.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<string name="downloading_data">Connection au serveur…</string>
<string name="downloading_data">Connexion au serveur…</string>
🤖 Prompt for AI Agents (early access)
In app/res/values-fr/strings.xml at line 44, the French translation for
"downloading_data" uses the incorrect spelling "Connection". Replace
"Connection" with the correct French spelling "Connexion" to fix the spelling
error.

<string name="connect_learn_status">Vous avez terminé %d de %d cours.\nTerminez votre apprentissage pour obtenir votre certificat.</string>
<string name="connect_learn_finished">Vous avez obtenu un certificat pour cet emploi et êtes éligible pour réclamer l\'emploi et commencer à prodiguer des soins..\nTon score: %d\nNote de passage: %d</string>
<string name="connect_learn_need_assessment">Complétez l’évaluation pour terminer la formation.</string>
<string name="connect_learn_failed">Désolé, vous n\'avez pas obtenu la note de passage à votre évaluation. Veuillez réessayer.\nTon score: %d\nNote de passage: %d</string>
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Informal pronoun in failure message.
Standardize to formal register:

- <string name="connect_learn_failed">…\nTon score: %d\nNote de passage: %d</string>
+ <string name="connect_learn_failed">…\nVotre score : %d\nNote de passage : %d</string>
🤖 Prompt for AI Agents (early access)
In app/res/values-fr/strings.xml at line 205, the failure message uses the
informal pronoun "tu" in "Ton score". Change this to the formal pronoun "votre"
to maintain a consistent formal tone throughout the message. Update the string
to replace "Ton score" with "Votre score" accordingly.

<string name="connect_learn_need_assessment_title">Formation en attente</string>
<string name="connect_learn_failed_title">Échec de la formation</string>
<string name="connect_learn_status">Vous avez terminé %d de %d cours.\nTerminez votre apprentissage pour obtenir votre certificat.</string>
<string name="connect_learn_finished">Vous avez obtenu un certificat pour cet emploi et êtes éligible pour réclamer l\'emploi et commencer à prodiguer des soins..\nTon score: %d\nNote de passage: %d</string>
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Informal pronoun and punctuation.
Change “Ton score:” to the formal “Votre score :” and remove the double period:

- <string name="connect_learn_finished">… prodiguer des soins..\nTon score: %d\nNote de passage: %d</string>
+ <string name="connect_learn_finished">… prodiguer des soins.\nVotre score : %d\nNote de passage : %d</string>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<string name="connect_learn_finished">Vous avez obtenu un certificat pour cet emploi et êtes éligible pour réclamer l\'emploi et commencer à prodiguer des soins..\nTon score: %d\nNote de passage: %d</string>
<string name="connect_learn_finished">Vous avez obtenu un certificat pour cet emploi et êtes éligible pour réclamer l\'emploi et commencer à prodiguer des soins.\nVotre score : %d\nNote de passage : %d</string>
🤖 Prompt for AI Agents (early access)
In app/res/values-fr/strings.xml at line 203, replace the informal "Ton score:"
with the formal "Votre score :" and remove the double period at the end of the
sentence to correct punctuation.

<string name="migration_possible_failure">A CommCare não conseguiu migrar todos os seus dados durante uma atualização do aplicativo. Reinicie o CommCare para tentar corrigir isso. Se esta mensagem persistir, pode ser necessário \'Limpar dados\' do CommCare no menu Configurações do seu dispositivo.</string>
<string name="migration_failure_title">Erro de migração</string>
<string name="multiple_apps_limit_message">Você atingiu seu limite de aplicativos instalados; você só pode ter até %s aplicativos instalados por vez.\n\nSe quiser instalar um novo aplicativo, você pode primeiro desinstalar um aplicativo existente, o que pode ser feito no gerenciador de aplicativos.</string>
<string name="back_to_manager">Voltar ao Gerenciador de aplicativos""</string>
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Syntax error: extra quotation mark.
This entry has an unintended extra ":

- <string name="back_to_manager">Voltar ao Gerenciador de aplicativos""</string>
+ <string name="back_to_manager">Voltar ao Gerenciador de aplicativos</string>

Please remove the stray quote.

🤖 Prompt for AI Agents (early access)
In app/res/values-pt/strings.xml at line 42, there is an extra quotation mark at
the end of the string value for "back_to_manager". Remove the stray double quote
so the string ends correctly with a single closing quotation mark.

<string name="save_all_answers">Salvar Formulário</string>
<string name="save_data_message">Por favor, salvar Formulário para manter as respostas.</string>
<string name="save_enter_data_description">Você está no fim de \"%s\".</string>
<string name="save_enter_data_description">Você está no fim de \%s\"."</string>
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Faulty escape sequence.
Correct the quotes and percent placeholder:

- <string name="save_enter_data_description">Você está no fim de \%s\"."</string>
+ <string name="save_enter_data_description">Você está no fim de "%s".</string>
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<string name="save_enter_data_description">Você está no fim de \%s\"."</string>
<string name="save_enter_data_description">Você está no fim de "%s".</string>
🤖 Prompt for AI Agents (early access)
In app/res/values-pt/strings.xml at line 191, the string contains an incorrect
escape sequence with a backslash before the percent sign and mismatched quotes.
Remove the backslash before the percent sign and ensure the string is properly
enclosed in double quotes without extra or misplaced characters.

@shubham1g5
Copy link
Contributor Author

@Jignesh-dimagi Approved on my side, but I can't mark it so since I created it myself. So feel free to self approve and merg this.

@Jignesh-dimagi Jignesh-dimagi self-requested a review May 12, 2025 06:22
@Jignesh-dimagi Jignesh-dimagi marked this pull request as ready for review May 12, 2025 06:24
Jignesh-dimagi
Jignesh-dimagi previously approved these changes May 12, 2025
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/viewJobCard"
android:visibility="gone"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

do we need to do the same in the landscape version of the file ?

@shubham1g5
Copy link
Contributor Author

@damagatchi retest this please

gotoHome()
onView(withId(R.id.nsv_home_screen))
.perform(swipeUp())
onView(withId(R.id.nsv_home_screen)) // This is because landscape view needs more scroll up to view more than 90% of the log out button
Copy link
Contributor Author

@shubham1g5 shubham1g5 May 13, 2025

Choose a reason for hiding this comment

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

you can do this instead -

onView(withId(R.id. nsv_home_screen)).perform(repeatedlyUntil(swipeUp(),
                   hasDescendant(withText("Log out of CommCare")),
                   3))`

@Jignesh-dimagi
Copy link
Contributor

@damagatchi retest this please

@Jignesh-dimagi
Copy link
Contributor

@damagatchi please retest this

@Jignesh-dimagi
Copy link
Contributor

@damagatchi retest this please

@Jignesh-dimagi
Copy link
Contributor

@damagatchi retest this please

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.

3 participants