Skip to content

Conversation

@pm-dimagi
Copy link
Contributor

Product Description

Deleted the files which we have removed in phase 2 pr merge and refactored the files accordingly

Technical Summary

Feature Flag

Safety Assurance

Safety story

Automated test coverage

QA Plan

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

@pm-dimagi pm-dimagi requested a review from shubham1g5 April 24, 2025 10:27
@coderabbitai
Copy link

coderabbitai bot commented Apr 24, 2025

📝 Walkthrough

Walkthrough

This change removes all custom UI components for text views and buttons from the Android application and replaces them with standard Android widgets and Material Components. Specifically, all instances of ConnectBoldTextView, ConnectMediumTextView, ConnectRegularTextView, and ConnectItalicTextView are replaced by standard TextView elements, with explicit android:textStyle attributes added where necessary to preserve styling. The custom RoundedButton component and its associated drawable are removed, and all usages are replaced by MaterialButton or standard Button widgets, with custom styling attributes migrated or dropped in favor of standard styles. Several layout XML files are updated to reflect these substitutions, and corresponding Java code is modified to use standard widget classes instead of the removed custom classes. Additionally, utility classes and methods related to the removed components are deleted. No business logic or control flow is altered; the changes are limited to UI component replacement and associated code clean-up.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant AndroidView
    participant StandardTextView
    participant MaterialButton

    User->>AndroidView: Interacts with UI
    AndroidView->>StandardTextView: Displays text (bold/medium/regular)
    AndroidView->>MaterialButton: Displays button (with/without style)
    Note over StandardTextView,MaterialButton: All custom UI components replaced by standard widgets
Loading

Possibly related PRs

  • -rounded button issue resolved #2932: Focuses on replacing or removing the custom RoundedButton component in layout XML files and Java code, substituting it with standard Material Components or Android widgets.
  • CCCT-625 || Improve cards UI #2925: Introduces and uses the custom RoundedButton and Connect*TextView components in layouts and code, which are removed in this PR.

Suggested labels

skip-integration-tests

Suggested reviewers

  • shubham1g5
  • OrangeAndGreen
✨ 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.

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: 1

🧹 Nitpick comments (18)
app/res/layout/connectid_common_title_bar.xml (1)

27-37: Standard TextView Replacement with Explicit Styling
The custom ConnectMediumTextView has been correctly replaced with a standard <TextView>, and the added android:textSize="18sp" and android:textStyle="bold" preserve the original look. Consider extracting these inline attributes into a shared style (in styles.xml) to avoid duplication across layouts.

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

158-167: Replace custom ConnectRegularTextView with standard TextView
The new <TextView> substitution for connectRegularTextView correctly replaces the custom view. No explicit android:textStyle is needed for regular weight. Ensure the default system font matches the original Roboto Regular; if inconsistencies arise, consider adding android:fontFamily="@font/roboto_regular".

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

51-58: Standard TextView Replacement with Bold Style
The custom ConnectMediumTextView is correctly swapped for a standard <TextView>, and the android:textSize="12sp" plus android:textStyle="bold" preserve the filter label look. To reduce XML repetition, consider centralizing these attributes in a style resource.


84-92: Preserved Bold Styling on Filter Labels
Replacing ConnectMediumTextView with <TextView> and explicitly setting android:textSize="12sp" & android:textStyle="bold" keeps the approved filter label consistent. You may extract these into a shared style to streamline maintenance.


117-124: Consistent Filter TextView Styling
The change maintains the bold appearance and size for the "Rejected" filter by using a standard <TextView>. For DRYness, consider moving these attributes to a reusable style in styles.xml.


150-157: Maintain Bold Style for Pending Filter
The replacement and explicit styling for the "Pending" filter correctly replicate the previous look. To avoid repeating attributes, think about defining a common text style.

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

27-35: Replace Custom View with Standard TextView and Bold Style
The <TextView> for tvTitle correctly replaces the custom component, and the added android:textStyle="bold" retains the intended emphasis. Consider using a style resource for consistent typography across layouts.


39-49: Consistent Bold Styling for Description Text
Substituting the custom view with <TextView> and applying android:textStyle="bold" ensures the description text matches original styling. Extracting text attributes into a shared style could improve maintainability.

app/src/org/commcare/activities/StandardHomeActivityUIController.java (2)

12-17: Remove duplicate imports.
There are duplicate imports of Context, View, ViewTreeObserver, and TextView. Consolidate these to a single import each to improve readability.


89-94: Convert custom views to TextView; enforce naming conventions.
The UI elements in updateJobTileDetails() are correctly converted from custom classes to TextView. However, the variable tv_job_time uses snake_case instead of lowerCamelCase; consider renaming it (e.g., tvJobTime) to align with Java naming standards.

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

27-36: Preserved bold styling on title text.
The <TextView> for tvTitle replaces ConnectMediumTextView and adds android:textStyle="bold" to maintain the original emphasis.

Consider extracting repeated text styles into a shared style resource.

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

76-83: Suggest adding tools:text for preview
The date TextView has no sample or placeholder text, which can make layout previews harder. Consider adding a tools:text attribute to visualize date formatting in the editor.

Example:

<TextView
    android:id="@+id/date"
    ...
    tools:text="01/01/2025"/>

105-120: Remove redundant tools:text attribute
You already set android:text="@string/connect_payment_received". The duplicate tools:text is unnecessary and can be removed to clean up the XML.

Diff:

-               tools:text="@string/connect_payment_received"
app/res/layout/fragment_connect_delivery_progress.xml (1)

73-83: Apply consistent styling to affirmative button
The yes MaterialButton lacks a style while the no button uses @style/NegativeButtonStyle. Consider defining or applying a PositiveButtonStyle (or default Material style) to the yes button to keep button styles uniform.

Example addition:

<com.google.android.material.button.MaterialButton
    ...
    style="@style/PositiveButtonStyle"
    ... />
app/res/layout/fragment_connect_jobs_list.xml (1)

68-76: Suggest adding tools:text for preview
connect_phone_label has no default or sample text, making design-time previews blank. Adding tools:text will aid layout visualization.

Example:

<TextView
    android:id="@+id/connect_phone_label"
    ...
    tools:text="Confirm Phone Number"/>
app/res/layout/fragment_connect_delivery_details.xml (1)

193-205: Use MaterialButton icon API for consistency
Instead of android:drawableRight, consider leveraging MaterialButton’s dedicated icon attributes:

app:icon="@drawable/ic_connect_arrow_forward_24px"
app:iconTint="@color/cc_brand_color"
app:iconGravity="textEnd"

This aligns with Material Components best practices, improves RTL support, and avoids platform drawable deprecation.

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

75-87: Use MaterialButton icon API for arrow drawable
For the accept_button, replace android:drawableEnd with MaterialButton’s icon attributes:

app:icon="@drawable/connect_right_arrow"
app:iconGravity="textEnd"

This ensures consistent theming, proper RTL handling, and better adherence to Material Components guidelines.

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

69-79: Apply a positive button style
The connect_phone_yes_button falls back to the default MaterialButton styling, whereas the decline button uses @style/NegativeButtonStyle. For visual consistency, consider defining and applying a PositiveButtonStyle (e.g., accent color background) rather than relying solely on the default.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 854a995 and c4700e9.

⛔ Files ignored due to path filters (4)
  • app/res/font/roboto_bold.ttf is excluded by !**/*.ttf
  • app/res/font/roboto_italic.ttf is excluded by !**/*.ttf
  • app/res/font/roboto_medium.ttf is excluded by !**/*.ttf
  • app/res/font/roboto_regular.ttf is excluded by !**/*.ttf
📒 Files selected for processing (48)
  • app/res/layout-land/home_screen.xml (5 hunks)
  • app/res/layout/connect_delivery_item.xml (3 hunks)
  • app/res/layout/connect_delivery_progress_item.xml (4 hunks)
  • app/res/layout/connect_payment_item.xml (8 hunks)
  • app/res/layout/connectid_common_title_bar.xml (1 hunks)
  • app/res/layout/connectid_title_bar.xml (0 hunks)
  • app/res/layout/dialog_payment_confirmation.xml (2 hunks)
  • app/res/layout/fragment_channel_consent_bottom_sheet.xml (2 hunks)
  • app/res/layout/fragment_connect_delivery_details.xml (8 hunks)
  • app/res/layout/fragment_connect_delivery_list.xml (4 hunks)
  • app/res/layout/fragment_connect_delivery_progress.xml (2 hunks)
  • app/res/layout/fragment_connect_job_detail_bottom_sheet_dialog.xml (7 hunks)
  • app/res/layout/fragment_connect_jobs_list.xml (4 hunks)
  • app/res/layout/fragment_connect_learning_progress.xml (1 hunks)
  • app/res/layout/fragment_connect_message.xml (0 hunks)
  • app/res/layout/fragment_connect_progress_delivery.xml (6 hunks)
  • app/res/layout/fragment_connect_results_summary_list.xml (6 hunks)
  • app/res/layout/item_channel.xml (4 hunks)
  • app/res/layout/item_chat_left_view.xml (1 hunks)
  • app/res/layout/item_chat_right_view.xml (0 hunks)
  • app/res/layout/item_login_connect_home_apps.xml (4 hunks)
  • app/res/layout/item_login_connect_home_corrupt_apps.xml (2 hunks)
  • app/res/layout/item_progress_job_summary_visit.xml (2 hunks)
  • app/res/layout/screen_connect_phone_verify.xml (0 hunks)
  • app/res/layout/screen_connect_primary_phone.xml (5 hunks)
  • app/res/layout/screen_connect_user_deactivate_otp_verify.xml (2 hunks)
  • app/res/layout/screen_login.xml (0 hunks)
  • app/res/layout/temp_login.xml (6 hunks)
  • app/res/layout/view_job_card.xml (5 hunks)
  • app/res/layout/view_progress_job_card.xml (6 hunks)
  • app/res/values/styles.xml (0 hunks)
  • app/src/org/commcare/activities/StandardHomeActivityUIController.java (2 hunks)
  • app/src/org/commcare/connect/ConnectManager.java (3 hunks)
  • app/src/org/commcare/fragments/connect/ConnectDeliveryDetailsFragment.java (3 hunks)
  • app/src/org/commcare/fragments/connect/ConnectDeliveryListFragment.java (2 hunks)
  • app/src/org/commcare/fragments/connect/ConnectDeliveryProgressDeliveryFragment.java (3 hunks)
  • app/src/org/commcare/fragments/connect/ConnectDeliveryProgressFragment.java (4 hunks)
  • app/src/org/commcare/fragments/connect/ConnectJobIntroFragment.java (1 hunks)
  • app/src/org/commcare/fragments/connect/ConnectLearningProgressFragment.java (2 hunks)
  • app/src/org/commcare/fragments/connect/ConnectResultsSummaryListFragment.java (2 hunks)
  • app/src/org/commcare/utils/ConnectIdAppBarUtils.java (0 hunks)
  • app/src/org/commcare/views/connect/ConnectEditText.java (0 hunks)
  • app/src/org/commcare/views/connect/RoundedButton.java (0 hunks)
  • app/src/org/commcare/views/connect/RoundedButtonDrawable.java (0 hunks)
  • app/src/org/commcare/views/connect/connecttextview/ConnectBoldTextView.java (0 hunks)
  • app/src/org/commcare/views/connect/connecttextview/ConnectItalicTextView.java (0 hunks)
  • app/src/org/commcare/views/connect/connecttextview/ConnectMediumTextView.java (0 hunks)
  • app/src/org/commcare/views/connect/connecttextview/ConnectRegularTextView.java (0 hunks)
💤 Files with no reviewable changes (14)
  • app/res/layout/fragment_connect_message.xml
  • app/res/layout/item_chat_right_view.xml
  • app/res/layout/screen_login.xml
  • app/res/layout/screen_connect_phone_verify.xml
  • app/res/layout/connectid_title_bar.xml
  • app/src/org/commcare/views/connect/ConnectEditText.java
  • app/src/org/commcare/views/connect/connecttextview/ConnectMediumTextView.java
  • app/src/org/commcare/views/connect/connecttextview/ConnectRegularTextView.java
  • app/src/org/commcare/views/connect/connecttextview/ConnectItalicTextView.java
  • app/res/values/styles.xml
  • app/src/org/commcare/views/connect/connecttextview/ConnectBoldTextView.java
  • app/src/org/commcare/utils/ConnectIdAppBarUtils.java
  • app/src/org/commcare/views/connect/RoundedButton.java
  • app/src/org/commcare/views/connect/RoundedButtonDrawable.java
🧰 Additional context used
🧬 Code Graph Analysis (1)
app/src/org/commcare/fragments/connect/ConnectDeliveryProgressFragment.java (1)
app/src/org/commcare/google/services/analytics/FirebaseAnalyticsUtil.java (1)
  • FirebaseAnalyticsUtil (38-517)
🔇 Additional comments (89)
app/src/org/commcare/fragments/connect/ConnectDeliveryDetailsFragment.java (2)

8-8: Import change aligns with UI component standardization

The change to import standard TextView instead of the custom text view class is consistent with the PR's objective of removing custom UI components.


63-63: Type declaration updated correctly

The variable declaration has been properly updated to use the standard Android TextView class instead of the custom text view component.

app/src/org/commcare/fragments/connect/ConnectJobIntroFragment.java (1)

146-151: Type declarations consistently updated

All text view variable declarations have been correctly updated to use the standard Android TextView class instead of custom text view components, maintaining consistency across the codebase.

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

34-34: TextView element properly standardized

The custom ConnectRegularTextView has been correctly replaced with a standard Android TextView, maintaining all original attributes and styling.


42-42: TextView element properly standardized

The second custom text view component has been correctly replaced with a standard Android TextView, consistent with the overall UI component standardization in this PR.

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

9-9: TextView element properly standardized

The custom ConnectRegularTextView has been correctly replaced with a standard Android TextView, maintaining all original attributes and styling.


20-20: TextView element properly standardized

The custom ConnectMediumTextView has been correctly replaced with a standard Android TextView, maintaining all original attributes and styling.

app/src/org/commcare/fragments/connect/ConnectDeliveryProgressDeliveryFragment.java (2)

8-8: Use Standard TextView Import
The import for android.widget.TextView replaces the custom ConnectMediumTextView, aligning with the UI component refactor. This change is straightforward and correct.


87-88: Replace custom view binding with TextView
Updating the view lookup to TextView matches the layout change. The progress percentage formatting remains unaffected. Confirm that the associated XML now uses a <TextView> for connect_progress_progress_text.

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

27-37: Standard TextView replacement with preserved styling

The custom TextView has been correctly replaced with a standard Android TextView, with the android:textStyle="bold" attribute added to maintain the original bold styling.


40-52: Appropriate TextView replacement with preserved styling

Good replacement of custom TextView with standard one, properly preserving bold styling through the explicit android:textStyle="bold" attribute.


55-61: Proper TextView standardization

The custom TextView was correctly replaced with the standard Android TextView component without adding bold styling, which is appropriate if the original didn't use bold styling.


63-69: Correct TextView standardization

Proper replacement with the standard TextView component. This change helps simplify the codebase by using standard Android components.

app/src/org/commcare/fragments/connect/ConnectLearningProgressFragment.java (2)

22-23: Removed unused imports for custom TextView classes

The imports for custom TextView classes have been properly removed as they're no longer needed after the refactoring to standard components.


299-307: TextView type replacement in jobCardDataHandle

Custom TextView types have been successfully replaced with standard Android TextView types. This change is consistent with the larger refactoring effort and maintains the same functionality while simplifying the codebase.

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

24-32: Standard TextView replacement with preserved styling

The custom TextView has been correctly replaced with a standard Android TextView, maintaining original styling through the android:textStyle="bold" attribute.


70-76: Proper TextView standardization with preserved styling

Good replacement of custom TextView with a standard one, properly preserving bold styling.


78-86: Correct TextView replacement with consistent styling

The custom TextView was properly replaced with a standard Android TextView while maintaining the bold styling. This is in line with the overall refactoring strategy.


88-96: Standard TextView replacement with preserved styling

Appropriate replacement of custom component with a standard one, maintaining the original styling through explicit attribute declaration.


126-132: Proper TextView standardization with bold styling

The custom TextView has been correctly replaced with a standard component, retaining the original bold styling.


134-144: Standard TextView replacement with consistent styling

Good replacement of the custom TextView component with a standard Android TextView while maintaining the bold styling through explicit attribute.

app/src/org/commcare/connect/ConnectManager.java (2)

7-9: Updated imports for standard widgets

The imports have been properly updated to include standard Android widgets that replace the custom components. This change supports the larger refactoring effort.


170-177: Standard component types in updateSecondaryPhoneConfirmationTile

Custom TextView and Button types have been successfully replaced with standard Android components. The functionality remains unchanged, and this change simplifies the codebase.

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

55-65: Replaced custom text view with standard TextView for earned label.
The payment_earned_label is now a plain <TextView> that preserves all layout constraints and styling.


67-78: Preserved bold styling on earned amount.
Adding android:textStyle="bold" maintains the original emphasis previously provided by the custom view.


109-119: Replaced custom text view with standard TextView for transferred label.
The payment_transferred_label now uses <TextView>, consistent with the refactor.


121-132: Preserved bold styling on transferred amount.
The android:textStyle="bold" attribute correctly replicates the original custom view’s emphasis.

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

64-73: Preserved bold styling on job type.
The tvJobType now uses <TextView> with android:textStyle="bold", matching the refactor pattern.


96-104: Replaced custom text view for date display.
The tvDate view is now a standard <TextView>, complying with the updated UI conventions.

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

29-38: Ensured bold styling for headings.
The main title (connect_job_info_delivery_detail) and review labels now use standard <TextView> with android:textStyle="bold" to preserve emphasis after removing custom views.

Also applies to: 64-73, 75-84


96-107: Replaced custom detail text with standard TextView.
All delivery detail fields (total visits, days, max daily, budget) are correctly converted to <TextView>, and layout constraints remain intact.

Also applies to: 118-129, 140-150, 162-172

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

102-111: Preserved bold styling for error message.
The connect_phone_verify_error <TextView> explicitly applies android:textStyle="bold", maintaining the original emphasis after removing custom font attributes.


113-123: Preserved bold styling for resend prompt.
The connect_phone_verify_resend <TextView> uses android:textStyle="bold", ensuring consistent styling with the previous custom view.

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

23-34: TextView migration looks good

The custom ConnectBoldTextView has been properly replaced with a standard TextView with explicit textStyle="bold" attribute to maintain the visual styling.


36-45: TextView migration looks good

Another custom TextView replacement is correctly implemented with the textStyle="bold" attribute to preserve the original styling.


47-55: TextView migration looks good

The ConnectRegularTextView has been properly replaced with a standard TextView. Since this was likely a regular (non-bold) text view, no textStyle attribute was needed.

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

42-53: TextView migration looks good

The custom TextView has been correctly replaced with a standard TextView, including the textStyle="bold" attribute to maintain the original styling.


55-66: TextView migration looks good

The TextView replacement is properly implemented with textStyle="bold" to preserve the original styling from the custom view.


135-144: TextView migration looks good

The error text view has been correctly migrated to a standard TextView with appropriate textStyle attribute.


150-160: TextView migration looks good

The availability TextView has been properly migrated with the textStyle attribute preserved.

app/src/org/commcare/fragments/connect/ConnectDeliveryProgressFragment.java (5)

11-11: Button import added correctly

The import for the standard Android Button widget has been added to replace the custom button component.


36-37: Custom view imports removed

The custom view imports have been correctly removed as part of the migration to standard Android components.


94-94: Button reference updated correctly

Reference to the custom button has been properly updated to use the standard Android Button class.


100-100: Button reference updated correctly

Another button reference has been properly migrated to the standard Button class, maintaining the existing functionality.


199-204: TextView references updated correctly

All the references to custom TextView components have been properly updated to use the standard TextView class.

app/res/layout/fragment_connect_progress_delivery.xml (5)

40-51: TextView migration looks good

The custom TextView has been properly replaced with a standard TextView, with textStyle="bold" added to maintain the original styling.


71-83: TextView migration looks good

The status text view has been correctly migrated with the textStyle attribute to preserve the original styling.


107-114: TextView migration looks good

The progress text view has been properly migrated to use the standard TextView with appropriate styling.


116-122: TextView migration looks good

Another TextView migration is correctly implemented with the appropriate textStyle attribute.


146-155: TextView migration looks good

The regular text view has been properly replaced with a standard TextView. The migration preserves the original functionality.

app/src/org/commcare/fragments/connect/ConnectResultsSummaryListFragment.java (1)

189-193: Custom text view classes replaced with standard TextView.

Good refactoring choice to replace the custom text view classes with standard Android TextView components. This simplifies the codebase by removing unnecessary custom implementations while maintaining the same functionality.

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

16-26: Good migration to standard TextView with preserved styling.

The custom ConnectBoldTextView has been properly replaced with a standard TextView while preserving the bold styling through the explicit android:textStyle="bold" attribute.


28-38: Good migration to standard TextView with preserved styling.

The custom ConnectBoldTextView has been properly replaced with a standard TextView while preserving the bold styling through the explicit android:textStyle="bold" attribute.


40-50: Good migration to standard TextView with preserved styling.

The custom ConnectBoldTextView has been properly replaced with a standard TextView while preserving the bold styling through the explicit android:textStyle="bold" attribute.


53-64: Good migration to standard TextView with preserved styling.

The custom ConnectBoldTextView has been properly replaced with a standard TextView while preserving the bold styling through the explicit android:textStyle="bold" attribute.


66-75: Good migration to standard TextView with preserved styling.

The custom ConnectBoldTextView has been properly replaced with a standard TextView while preserving the bold styling through the explicit android:textStyle="bold" attribute.


78-89: No styling change needed for this TextView.

Correctly maintaining this TextView without adding the bold style, as it was already a standard TextView in the original implementation.

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

16-26: Good migration to standard TextView with preserved styling.

The custom ConnectBoldTextView has been properly replaced with a standard TextView while preserving the bold styling through the explicit android:textStyle="bold" attribute.


28-38: Good migration to standard TextView with preserved styling.

The custom ConnectBoldTextView has been properly replaced with a standard TextView while preserving the bold styling through the explicit android:textStyle="bold" attribute.


40-51: Good migration to standard TextView with preserved styling.

The custom ConnectBoldTextView has been properly replaced with a standard TextView while preserving the bold styling through the explicit android:textStyle="bold" attribute.


53-64: Good migration to standard TextView with preserved styling.

The custom ConnectBoldTextView has been properly replaced with a standard TextView while preserving the bold styling through the explicit android:textStyle="bold" attribute.


88-100: No styling change needed for this TextView.

Correctly maintaining this TextView (connect_job_end_date) without adding the bold style, which is consistent with the same element in view_job_card.xml.


66-74:

Details

❌ Incorrect review comment

Check for styling consistency with view_job_card.xml.

This TextView (tv_job_time) has been migrated from a custom view to a standard TextView, but unlike its counterpart in view_job_card.xml, it's missing the android:textStyle="bold" attribute. Verify if this is intentional or if the styling should be consistent across both layouts.


🏁 Script executed:

#!/bin/bash
# Check if the original custom view in view_progress_job_card.xml was a ConnectBoldTextView
grep -A 5 "id=\"tv_job_time\"" $(fd "view_progress_job_card.xml" --type f --changed-within 1month) || echo "File not found in recent changes"

Length of output: 213


🏁 Script executed:

#!/bin/bash
# Inspect tv_job_time in both layouts for textStyle attribute
echo "=== view_job_card.xml ==="
grep -n 'id="@+id/tv_job_time"' -A5 app/res/layout/view_job_card.xml

echo ""
echo "=== view_progress_job_card.xml ==="
grep -n 'id="@+id/tv_job_time"' -A5 app/res/layout/view_progress_job_card.xml

Length of output: 885


Styling Consistency Verified – No Action Needed

Both view_job_card.xml and view_progress_job_card.xml define tv_job_time without an android:textStyle attribute:

• In app/res/layout/view_job_card.xml (lines 67–72)
• In app/res/layout/view_progress_job_card.xml (lines 67–72)

Since neither layout applies bold styling, there is no inconsistency to address.

Likely an incorrect or invalid review comment.

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

40-51: Good migration with preserved styling.

The custom ConnectMediumTextView has been properly replaced with a standard TextView while preserving the bold styling. This simplifies the component hierarchy while maintaining visual consistency.


53-64: Font family removal is intentional.

The custom ConnectRegularTextView has been replaced with a standard TextView, and the android:fontFamily attribute has been removed. This is consistent with the goal of simplifying the component styling and using the system's default font.


66-76: Standard TextView replacement is consistent.

The use of a standard TextView here is consistent with the overall refactoring pattern of removing custom text view components throughout the codebase.


78-92: Standard TextView replacement is consistent.

The use of a standard TextView here is consistent with the overall refactoring pattern of removing custom text view components throughout the codebase.

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

10-21: Preserved bold styling for name TextView
Explicitly adding android:textStyle="bold" correctly replaces the previous ConnectBoldTextView. This maintains the intended emphasis on the name.


56-63: Verified tv_payment_status replacement
Replacing the custom text view with a standard TextView and using tools:text for preview is appropriate here. The styling remains consistent with the design.


147-157: Preserved bold styling for revert label
Explicit android:textStyle="bold" on the revert payment label correctly mirrors the previous custom view styling. The added tools:text aids preview without affecting runtime.

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

84-95: Affirmed negative button replacement
Replacing the custom RoundedButton with MaterialButton and using @style/NegativeButtonStyle accurately preserves the original negative-action look.

app/src/org/commcare/fragments/connect/ConnectDeliveryListFragment.java (1)

169-172: Standardized view holder types
Switching from custom Connect*TextView classes to standard TextView is correct. The existing imports and binding logic support the new types without further changes.

app/res/layout/temp_login.xml (6)

29-34: Replaced version text view correctly
Using a standard TextView with @style/VersionIdText maintains existing styling for the version string. No further attributes are needed here.


87-96: Welcome message bold styling restored
Adding android:textStyle="bold" ensures the welcome text matches the previous custom font weight.


98-105: “Apps” label bold styling restored
Applying android:textStyle="bold" to tvLoginIntoApp correctly replicates the medium text emphasis of the original.


119-127: New-app notice bold styling applied
The tvNewAppAvailable TextView now has android:textStyle="bold", preserving its emphasis.


139-149: “Or” separator bold styling applied
Ensuring the “or” text is bold aligns with its role as a section separator.


168-176: Apps title bold styling applied
Adding android:textStyle="bold" to tvAppsTitle preserves the header emphasis.

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

22-30: Last-update TextView replacement approved
Replacing the custom view with a standard TextView and setting a textSize preserves the layout. No additional attributes are required.


78-86: Verify affirmative button styling
The connect_phone_yes_button has no explicit style or textColor. Please confirm that the default MaterialButton style matches design requirements or apply a PositiveButtonStyle.


101-112: No-jobs message bold styling restored
Adding android:textStyle="bold" ensures the “No jobs” message retains its emphasis.

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

30-40: Correct substitution of custom medium text views
The TextView instances for connect_delivery_title, connect_review, and connect_delivery_action_title properly replace the former custom components and explicitly add android:textStyle="bold" to preserve the original typography.

Also applies to: 42-52, 170-180


63-73: Verification of regular text style replacements
The default TextView declarations for connect_delivery_total_visits_text, connect_delivery_days_text, connect_delivery_max_daily_text, connect_delivery_budget_text, and connect_delivery_action_details correctly mirror the regular styling of the removed ConnectRegularTextView. No explicit textStyle is needed since the default is normal.

Also applies to: 86-97, 108-118, 130-140, 181-190

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

29-36: Preserve bold styling for consent title
The custom view has been replaced with a TextView and correctly includes android:textStyle="bold" alongside the original textSize.


39-47: Maintain emphasis for channel name
The channel_name TextView now uses android:textSize="20sp" and android:textStyle="bold" to match the previous medium-weight component’s emphasis.


62-73: Negative button style applied correctly
The decline_button utilizes @style/NegativeButtonStyle and wrap_content sizing, effectively replicating the removed custom button without hardcoding dimensions.

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

59-67: Verify text weight for phone label
The TextView for connect_phone_label is now plain, but the removed ConnectMediumTextView likely provided a medium-weight font. Please confirm whether a heavier weight (android:textStyle="bold") or a specific textAppearance is still required.


80-90: Negative button style correctly applied
The connect_phone_no_button appropriately uses @style/NegativeButtonStyle to replicate the semantics of the original custom rounded button for cancellation.


124-134: Ensure bold emphasis on connect message
The tvConnectMessage TextView now includes android:textStyle="bold", preserving the emphasis of the former custom component.

Comment on lines +87 to 97
<com.google.android.material.button.MaterialButton
android:id="@+id/connect_phone_no_button"
android:layout_width="wrap_content"
android:layout_height="35dp"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginEnd="10dp"
android:text="@string/connect_payment_confirm_no"
android:textColor="@color/blue"
android:textSize="18sp"
app:layout_constraintEnd_toStartOf="@id/connect_phone_yes_button"
app:layout_constraintTop_toBottomOf="@id/connect_phone_label"
app:roundButtonBorderColor="@color/connect_blue_color"
app:roundButtonBorderVisible="true"
app:roundButtonBorderWidth="0.5dp"
app:roundButtonIconTintColor="@color/white"
app:roundButtonTextColor="@color/connect_blue_color"
app:roundButtonTextSize="5.0sp" />
/>
</androidx.constraintlayout.widget.ConstraintLayout>
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Add style for negative-action button
The connect_phone_no_button is missing @style/NegativeButtonStyle, unlike its counterparts in related layouts. Without it, the styling may differ.

Apply this diff to restore consistency:

<com.google.android.material.button.MaterialButton
    android:id="@+id/connect_phone_no_button"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginTop="10dp"
+   style="@style/NegativeButtonStyle"
    android:text="@string/connect_payment_confirm_no"
    app:layout_constraintEnd_toStartOf="@id/connect_phone_yes_button"
    app:layout_constraintTop_toBottomOf="@id/connect_phone_label"/>

@pm-dimagi pm-dimagi merged commit 9944bab into dv/connect_initial Apr 24, 2025
1 of 2 checks passed
@coderabbitai coderabbitai bot mentioned this pull request May 9, 2025
4 tasks
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