Skip to content

Conversation

@Jignesh-dimagi
Copy link
Contributor

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

@Jignesh-dimagi Jignesh-dimagi requested a review from shubham1g5 May 8, 2025 13:12
@coderabbitai
Copy link

coderabbitai bot commented May 8, 2025

📝 Walkthrough

Walkthrough

This set of changes removes several unused or incorrectly named Android drawable XML resources and updates references to drawable resources throughout the app. Multiple layout files are modified to reference new or corrected drawable names, fixing typos and aligning with updated resource files. Drawable resources for backgrounds, icons, and UI elements are updated to use the correct or newly introduced files, ensuring consistent visual styling. No changes are made to the logic, control flow, or public API; all modifications are limited to resource management and layout configuration.

Suggested labels

skip-integration-tests

Suggested reviewers

  • shubham1g5
  • pm-dimagi

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

🧹 Nitpick comments (2)
app/res/layout/fragment_connect_delivery_details.xml (1)

202-202: Use drawableEnd or MaterialButton app:icon for RTL support and tinting
The change to the 20px arrow is correct, but using android:drawableRight can lead to missing RTL support and may not respect app:iconTint. Consider replacing it with:

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

or at a minimum switch to android:drawableEnd instead of drawableRight.

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

110-110: Use drawableEnd or MaterialButton app:icon for consistency and RTL
Similar to the delivery details layout, replace android:drawableRight with android:drawableEnd or better use MaterialButton’s app:icon + app:iconGravity="textEnd" + app:iconTint to ensure proper tinting and RTL support.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 95ef71f and 6b89824.

📒 Files selected for processing (18)
  • app/res/drawable/backup.xml (0 hunks)
  • app/res/drawable/connect_rounded_corner_grey.xml (0 hunks)
  • app/res/drawable/connect_rounded_corner_teslish_blue.xml (0 hunks)
  • app/res/drawable/ic_connect_arrow_forward_24px.xml (0 hunks)
  • app/res/drawable/ic_connect_message_editext_bg_24_border.xml (0 hunks)
  • app/res/drawable/ic_connect_message_receiver_bg.xml (0 hunks)
  • app/res/drawable/ic_connect_message_sender_bg.xml (0 hunks)
  • app/res/drawable/ic_connect_payment_recevied_check.xml (0 hunks)
  • app/res/drawable/shape_border_10px_blue.xml (0 hunks)
  • app/res/layout/connect_payment_item.xml (1 hunks)
  • app/res/layout/fragment_connect_delivery_details.xml (1 hunks)
  • app/res/layout/fragment_connect_job_intro.xml (1 hunks)
  • app/res/layout/fragment_connect_message.xml (1 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/menu/menu_connect.xml (1 hunks)
  • app/src/org/commcare/adapters/JobListConnectHomeAppsAdapter.java (1 hunks)
💤 Files with no reviewable changes (9)
  • app/res/drawable/shape_border_10px_blue.xml
  • app/res/drawable/ic_connect_message_receiver_bg.xml
  • app/res/drawable/ic_connect_arrow_forward_24px.xml
  • app/res/drawable/connect_rounded_corner_grey.xml
  • app/res/drawable/ic_connect_message_editext_bg_24_border.xml
  • app/res/drawable/ic_connect_message_sender_bg.xml
  • app/res/drawable/backup.xml
  • app/res/drawable/ic_connect_payment_recevied_check.xml
  • app/res/drawable/connect_rounded_corner_teslish_blue.xml
🔇 Additional comments (8)
app/res/menu/menu_connect.xml (1)

11-11: Confirm updated drawable resource reference
Ensure that the new drawable file ic_backup.xml exists under app/res/drawable and matches the intended design. Verify that all other references to the old backup.xml resource have been updated accordingly to prevent missing-resource errors at runtime.

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

33-33: Consistent background resource update for sender chat bubble.

The android:background attribute has been correctly updated to @drawable/shape_connect_message_sender_bg, replacing the old ic_connect_message_sender_bg and aligning with the new shape-based drawable resource naming.

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

30-30: Consistent background resource update for receiver chat bubble.

The android:background attribute has been correctly updated to @drawable/shape_connect_message_receiver_bg, replacing the old ic_connect_message_receiver_bg and ensuring consistency with the new shape-based drawable resources.

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

29-29: Fixed typo in drawable resource reference.

The background drawable for cardMessage has been corrected from the misspelled ic_connect_message_editext_bg_24_border to ic_connect_message_edittext_bg_24_border, matching the renamed resource file.

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

51-51: Corrected typo in payment received check icon.

The imgReceived view’s android:src has been updated to @drawable/ic_connect_payment_received_check, fixing the previous misspelling and aligning with the actual drawable resource name.

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

79-86:

Details

✅ Verification successful

Approve: Updated background drawable reference

The tvUnreadCount TextView now correctly uses the renamed @drawable/shape_corner_10dp_blue, aligning the layout with the updated resource files. Please verify that shape_corner_10dp_blue.xml is present under res/drawable and that there are no remaining references to the old shape_border_10px_blue.


🏁 Script executed:

#!/bin/bash
# Verify no remnants of the old drawable reference
rg -n "shape_border_10px_blue" .

# Confirm the new drawable file exists
rg -l "shape_corner_10dp_blue.xml" -n res/drawable

Length of output: 136


🏁 Script executed:

#!/bin/bash
# Locate the new drawable file anywhere in the repository
find . -type f -iname "shape_corner_10dp_blue.xml"

# Search for any references to it in XML/layout files
rg -n "shape_corner_10dp_blue" .

# List all drawable directories to confirm the resource path
find . -type d | grep -E "res.*/drawable"

Length of output: 519


Approve: Updated background drawable reference

  • Confirmed new drawable shape_corner_10dp_blue.xml exists at app/res/drawable/shape_corner_10dp_blue.xml.
  • Layout app/res/layout/item_channel.xml correctly references it on line 79.
  • No remaining usages of the old shape_border_10px_blue.
app/src/org/commcare/adapters/JobListConnectHomeAppsAdapter.java (2)

158-163:

Details

✅ Verification successful

Verify updated learning-app drawable exists and old references removed
The background was updated to connect_rounded_corner_tealish_blue. Please confirm the new asset is present and there are no lingering references to the old connect_rounded_corner_teslish_blue.


🏁 Script executed:

#!/bin/bash
# Ensure no stale learning drawable references remain
rg -n "connect_rounded_corner_teslish_blue"

Length of output: 43


🏁 Script executed:

#!/bin/bash
# Verify the new drawable asset exists and locate any references
rg -n "connect_rounded_corner_tealish_blue"
fd connect_rounded_corner_tealish_blue --type f

Length of output: 299


Drawable Asset Verification Complete
The new connect_rounded_corner_tealish_blue asset is present at app/res/drawable/connect_rounded_corner_tealish_blue.xml, and there are no remaining references to the old connect_rounded_corner_teslish_blue.

• Reference in code: JobListConnectHomeAppsAdapter.java:159
• Asset file: app/res/drawable/connect_rounded_corner_tealish_blue.xml


164-170:

Details

✅ Verification successful

Verify updated delivery-app drawable exists and old references removed
The finished-delivery background was changed to connect_rounded_corner_lighter_grey. Confirm the drawable file is in place and that connect_rounded_corner_grey is no longer referenced anywhere.


🏁 Script executed:

#!/bin/bash
# Ensure no stale delivery drawable references remain
rg -n "connect_rounded_corner_grey"

Length of output: 35


To confirm the new drawable is in place, let’s check for its file in the res/drawable directories:


🏁 Script executed:

#!/bin/bash
# Verify the new lighter grey drawable file exists under res/drawable
find . -type f | rg "res/.*/connect_rounded_corner_lighter_grey"

Length of output: 125


Verified updated delivery-app drawable exists and old references removed

  • Found new drawable at app/res/drawable/connect_rounded_corner_lighter_grey.xml.
  • No occurrences of the old connect_rounded_corner_grey reference remain in the codebase.

@Jignesh-dimagi Jignesh-dimagi merged commit 0ee3886 into dv/connect_initial May 8, 2025
1 of 2 checks passed
@shubham1g5 shubham1g5 deleted the jignesh/fix/resource_file_rename_issue branch May 8, 2025 13:35
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