-
-
Notifications
You must be signed in to change notification settings - Fork 45
Removed unused resources #3067
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removed unused resources #3067
Conversation
📝 WalkthroughWalkthroughThis 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
Suggested reviewers
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (45)
app/res/drawable-hdpi/arrow_right.pngis excluded by!**/*.pngapp/res/drawable-hdpi/book.pngis excluded by!**/*.pngapp/res/drawable-hdpi/calendar_heart.pngis excluded by!**/*.pngapp/res/drawable-hdpi/checklist.pngis excluded by!**/*.pngapp/res/drawable-hdpi/connect_arrow_down.pngis excluded by!**/*.pngapp/res/drawable-hdpi/connect_edittext_cancel.pngis excluded by!**/*.pngapp/res/drawable-hdpi/connect_ic_inventory.pngis excluded by!**/*.pngapp/res/drawable-hdpi/ic_action_overflow.pngis excluded by!**/*.pngapp/res/drawable-hdpi/ic_logout_action_bar.pngis excluded by!**/*.pngapp/res/drawable-hdpi/ic_trashcan.pngis excluded by!**/*.pngapp/res/drawable-hdpi/money.pngis excluded by!**/*.pngapp/res/drawable-hdpi/money2.pngis excluded by!**/*.pngapp/res/drawable-hdpi/report_approved.pngis excluded by!**/*.pngapp/res/drawable-hdpi/time.pngis excluded by!**/*.pngapp/res/drawable-hdpi/watch.pngis excluded by!**/*.pngapp/res/drawable-ldpi/door.pngis excluded by!**/*.pngapp/res/drawable/avatar_person.pngis excluded by!**/*.pngapp/res/drawable/avatar_vellum_android_intent.pngis excluded by!**/*.pngapp/res/drawable/avatar_vellum_group.pngis excluded by!**/*.pngapp/res/drawable/avatar_vellum_hidden_value.pngis excluded by!**/*.pngapp/res/drawable/avatar_vellum_image_capture.pngis excluded by!**/*.pngapp/res/drawable/avatar_vellum_phonenumber.pngis excluded by!**/*.pngapp/res/drawable/avatar_vellum_signature.pngis excluded by!**/*.pngapp/res/drawable/avatar_vellum_time.pngis excluded by!**/*.pngapp/res/drawable/enter_code.pngis excluded by!**/*.pngapp/res/drawable/expander_ic_right.pngis excluded by!**/*.pngapp/res/drawable/fingerprint.pngis excluded by!**/*.pngapp/res/drawable/ic_connect_job_logo.pngis excluded by!**/*.pngapp/res/drawable/ic_connect_message_speak_button.pngis excluded by!**/*.pngapp/res/drawable/ic_maps_indicator_current_position.pngis excluded by!**/*.pngapp/res/drawable/icon_audioplay_lightcool.pngis excluded by!**/*.pngapp/res/drawable/icon_audiostop_darkwarm.pngis excluded by!**/*.pngapp/res/drawable/icon_chevron_left_brand.pngis excluded by!**/*.pngapp/res/drawable/icon_chevron_left_primary.pngis excluded by!**/*.pngapp/res/drawable/icon_chevron_right_primary.pngis excluded by!**/*.pngapp/res/drawable/icon_choice_marked_attnpos.pngis excluded by!**/*.pngapp/res/drawable/icon_choice_outline_neutral.pngis excluded by!**/*.pngapp/res/drawable/logout.pngis excluded by!**/*.pngapp/res/drawable/pattern.pngis excluded by!**/*.pngapp/res/drawable/qrcode_solid.pngis excluded by!**/*.pngapp/res/drawable/record_complete.pngis excluded by!**/*.pngapp/res/drawable/start.pngis excluded by!**/*.pngapp/res/drawable/sync.pngis excluded by!**/*.pngapp/res/drawable/tile_drop_shadow.9.pngis excluded by!**/*.pngapp/res/drawable/tile_drop_shadow_small_margins_depressed.9.pngis 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 attributesYou can now safely remove
app/res/values/fonts.xml.
app/res/values/fonts.xml
Outdated
| <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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ 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.
|
@damagatchi retest this please |
|
@damagatchi retest this please |
Technical Summary
This will remove all unused resources
cross-request: dimagi/commcare-core#1455
Feature Flag
Its code clean up
Labels and Review