Skip to content

Conversation

@Jignesh-dimagi
Copy link
Contributor

@Jignesh-dimagi Jignesh-dimagi commented May 2, 2025

Technical Summary

This will remove all unused resources

cross-request: dimagi/commcare-core#1455

Feature Flag

Its code clean up

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 2, 2025

📝 Walkthrough

Walkthrough

This change removes a large set of Android resource files from the project, including vector drawable icons, shape and selector drawables, menu definitions, and multiple layout XML files for various screens and UI components. Additionally, several style and string resource definitions are deleted from resource value files, such as font family strings and custom themes/styles. The deletions affect both the main application and a support library module, targeting resources like launcher icons, custom buttons, menu bars, and specialized UI layouts for login, recording, and job lists. No Java or Kotlin code changes or modifications to exported/public code entities are present; the scope is limited to the removal of static XML resources and styles.

Sequence Diagram(s)

Skipped as the changes are exclusively deletions of static resource files and do not introduce or modify control flow or feature logic.

Possibly related PRs

  • Deleted extra files  #3051: This PR modifies the same layout files (connectid_common_title_bar.xml, connectid_title_bar.xml) that are deleted in the current PR, replacing custom views with standard components and updating font usage, indicating a direct relationship in UI resource changes.

Suggested reviewers

  • shubham1g5
  • OrangeAndGreen

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

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 9a00165 and a63e4fb.

⛔ Files ignored due to path filters (45)
  • app/res/drawable-hdpi/arrow_right.png is excluded by !**/*.png
  • app/res/drawable-hdpi/book.png is excluded by !**/*.png
  • app/res/drawable-hdpi/calendar_heart.png is excluded by !**/*.png
  • app/res/drawable-hdpi/checklist.png is excluded by !**/*.png
  • app/res/drawable-hdpi/connect_arrow_down.png is excluded by !**/*.png
  • app/res/drawable-hdpi/connect_edittext_cancel.png is excluded by !**/*.png
  • app/res/drawable-hdpi/connect_ic_inventory.png is excluded by !**/*.png
  • app/res/drawable-hdpi/ic_action_overflow.png is excluded by !**/*.png
  • app/res/drawable-hdpi/ic_logout_action_bar.png is excluded by !**/*.png
  • app/res/drawable-hdpi/ic_trashcan.png is excluded by !**/*.png
  • app/res/drawable-hdpi/money.png is excluded by !**/*.png
  • app/res/drawable-hdpi/money2.png is excluded by !**/*.png
  • app/res/drawable-hdpi/report_approved.png is excluded by !**/*.png
  • app/res/drawable-hdpi/time.png is excluded by !**/*.png
  • app/res/drawable-hdpi/watch.png is excluded by !**/*.png
  • app/res/drawable-ldpi/door.png is excluded by !**/*.png
  • app/res/drawable/avatar_person.png is excluded by !**/*.png
  • app/res/drawable/avatar_vellum_android_intent.png is excluded by !**/*.png
  • app/res/drawable/avatar_vellum_group.png is excluded by !**/*.png
  • app/res/drawable/avatar_vellum_hidden_value.png is excluded by !**/*.png
  • app/res/drawable/avatar_vellum_image_capture.png is excluded by !**/*.png
  • app/res/drawable/avatar_vellum_phonenumber.png is excluded by !**/*.png
  • app/res/drawable/avatar_vellum_signature.png is excluded by !**/*.png
  • app/res/drawable/avatar_vellum_time.png is excluded by !**/*.png
  • app/res/drawable/enter_code.png is excluded by !**/*.png
  • app/res/drawable/expander_ic_right.png is excluded by !**/*.png
  • app/res/drawable/fingerprint.png is excluded by !**/*.png
  • app/res/drawable/ic_connect_job_logo.png is excluded by !**/*.png
  • app/res/drawable/ic_connect_message_speak_button.png is excluded by !**/*.png
  • app/res/drawable/ic_maps_indicator_current_position.png is excluded by !**/*.png
  • app/res/drawable/icon_audioplay_lightcool.png is excluded by !**/*.png
  • app/res/drawable/icon_audiostop_darkwarm.png is excluded by !**/*.png
  • app/res/drawable/icon_chevron_left_brand.png is excluded by !**/*.png
  • app/res/drawable/icon_chevron_left_primary.png is excluded by !**/*.png
  • app/res/drawable/icon_chevron_right_primary.png is excluded by !**/*.png
  • app/res/drawable/icon_choice_marked_attnpos.png is excluded by !**/*.png
  • app/res/drawable/icon_choice_outline_neutral.png is excluded by !**/*.png
  • app/res/drawable/logout.png is excluded by !**/*.png
  • app/res/drawable/pattern.png is excluded by !**/*.png
  • app/res/drawable/qrcode_solid.png is excluded by !**/*.png
  • app/res/drawable/record_complete.png is excluded by !**/*.png
  • app/res/drawable/start.png is excluded by !**/*.png
  • app/res/drawable/sync.png is excluded by !**/*.png
  • app/res/drawable/tile_drop_shadow.9.png is excluded by !**/*.png
  • app/res/drawable/tile_drop_shadow_small_margins_depressed.9.png is excluded by !**/*.png
📒 Files selected for processing (33)
  • app/res/drawable/baseline_menu_24.xml (0 hunks)
  • app/res/drawable/baseline_save_24.xml (0 hunks)
  • app/res/drawable/blue_outlined_view.xml (0 hunks)
  • app/res/drawable/bottom_shadow.xml (0 hunks)
  • app/res/drawable/ic_connect_arrow_back.xml (0 hunks)
  • app/res/drawable/ic_connect_menu_3_dot.xml (0 hunks)
  • app/res/drawable/ic_connect_menu_search.xml (0 hunks)
  • app/res/drawable/ic_connect_message_photo_camera.xml (0 hunks)
  • app/res/drawable/ic_list_alt.xml (0 hunks)
  • app/res/drawable/ic_notifications_24.xml (0 hunks)
  • app/res/drawable/radio_button_modern.xml (0 hunks)
  • app/res/drawable/shape_border_1px_light_blue.xml (0 hunks)
  • app/res/drawable/shape_border_8px_white.xml (0 hunks)
  • app/res/drawable/title_case_tab.xml (0 hunks)
  • app/res/drawable/title_neutral_tab.xml (0 hunks)
  • app/res/layout/activity_uitest_info.xml (0 hunks)
  • app/res/layout/connect_results_summary_item.xml (0 hunks)
  • app/res/layout/connectid_common_title_bar.xml (0 hunks)
  • app/res/layout/connectid_title_bar.xml (0 hunks)
  • app/res/layout/fragment_connect_available_jobs_list.xml (0 hunks)
  • app/res/layout/fragment_connect_my_jobs_lists.xml (0 hunks)
  • app/res/layout/recording.xml (0 hunks)
  • app/res/layout/screen_app_select.xml (0 hunks)
  • app/res/layout/screen_connect_login.xml (0 hunks)
  • app/res/layout/screen_connect_pin.xml (0 hunks)
  • app/res/layout/screen_connect_primary_phone.xml (0 hunks)
  • app/res/layout/temp_login.xml (0 hunks)
  • app/res/menu/menu_connect_messaging.xml (0 hunks)
  • app/res/values/fonts.xml (1 hunks)
  • app/res/values/mydialog.xml (0 hunks)
  • app/res/values/themes.xml (0 hunks)
  • commcare-support-library/src/main/res/drawable-v24/ic_launcher_foreground.xml (0 hunks)
  • commcare-support-library/src/main/res/drawable/ic_launcher_background.xml (0 hunks)
💤 Files with no reviewable changes (32)
  • app/res/drawable/blue_outlined_view.xml
  • app/res/drawable/ic_connect_menu_search.xml
  • app/res/drawable/ic_connect_arrow_back.xml
  • app/res/drawable/ic_list_alt.xml
  • app/res/drawable/shape_border_1px_light_blue.xml
  • app/res/drawable/baseline_menu_24.xml
  • app/res/drawable/ic_connect_menu_3_dot.xml
  • app/res/drawable/radio_button_modern.xml
  • app/res/layout/connect_results_summary_item.xml
  • app/res/layout/recording.xml
  • app/res/layout/screen_app_select.xml
  • app/res/drawable/shape_border_8px_white.xml
  • app/res/drawable/ic_notifications_24.xml
  • app/res/layout/screen_connect_login.xml
  • app/res/layout/fragment_connect_my_jobs_lists.xml
  • app/res/values/mydialog.xml
  • app/res/drawable/baseline_save_24.xml
  • app/res/layout/screen_connect_pin.xml
  • app/res/layout/connectid_common_title_bar.xml
  • app/res/drawable/title_case_tab.xml
  • app/res/drawable/bottom_shadow.xml
  • app/res/menu/menu_connect_messaging.xml
  • app/res/layout/connectid_title_bar.xml
  • commcare-support-library/src/main/res/drawable/ic_launcher_background.xml
  • app/res/layout/activity_uitest_info.xml
  • commcare-support-library/src/main/res/drawable-v24/ic_launcher_foreground.xml
  • app/res/layout/fragment_connect_available_jobs_list.xml
  • app/res/layout/temp_login.xml
  • app/res/drawable/ic_connect_message_photo_camera.xml
  • app/res/drawable/title_neutral_tab.xml
  • app/res/layout/screen_connect_primary_phone.xml
  • app/res/values/themes.xml
🔇 Additional comments (1)
app/res/values/fonts.xml (1)

2-2:

Details

✅ Verification successful

Verify no remaining font references
Before deleting, ensure no XML layouts, styles, or code still reference the removed font-family string names to prevent broken resource links at runtime.


🏁 Script executed:

#!/bin/bash
# Search for any references to the old font-family strings across the repo
rg -n "font_family_" .

Length of output: 22


To be thorough, let’s search for any remaining font usages in both XML and code:


🏁 Script executed:

#!/bin/bash
# Search for any @font/ references in XML, layouts, etc.
rg -n "@font/" .

# Search for Compose/Java/Kotlin fontFamily usages
rg -n "fontFamily" -g "*.{kt,java}"

# Search for XML attributes or tags with “font-family”
rg -n "font-family" -g "*.xml"

Length of output: 83


No remaining font references; safe to delete fonts.xml
All automated searches for common font usages returned no matches. There are no lingering references to the removed font resources in layouts, styles, or code.

• Verified patterns across the repo:
– “font_family_”
– “@font/” in XML
– “fontFamily” in Kotlin/Java
– “font-family” in XML attributes

You can now safely remove app/res/values/fonts.xml.

<string name="font_family_black">sans-serif-black</string>
<string name="font_family_thin">sans-serif-thin</string>
</resources> No newline at end of file
<resources></resources> No newline at end of file
Copy link

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Remove empty resource file
The <resources> element is now empty. Delete fonts.xml altogether to avoid having unused, empty resource files in the project.

🤖 Prompt for AI Agents (early access)
In app/res/values/fonts.xml at line 2, the file contains an empty <resources> element with no font definitions. Remove the entire fonts.xml file from the project to eliminate unused and empty resource files.

@shubham1g5 shubham1g5 added the skip-integration-tests Skip android tests. label May 2, 2025
@Jignesh-dimagi
Copy link
Contributor Author

@damagatchi retest this please

@shubham1g5
Copy link
Contributor

@damagatchi retest this please

@Jignesh-dimagi Jignesh-dimagi merged commit ac44bf7 into dv/connect_initial May 2, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants