Skip to content

Conversation

@kidinov
Copy link
Contributor

@kidinov kidinov commented Sep 18, 2025

Description

Remove unused color, drawable, dimension, and string resources identified by Android lint. This cleanup reduces the APK size by removing approximately 700+ unused string resources, 30+ color definitions, 20+ dimension values, and 15+ drawable files that are no longer referenced in the codebase.

Changes include:

  • Removed 704 unused string resources while preserving comment structure
  • Removed 27 unused color definitions from colors_base.xml
  • Removed 18 unused dimension definitions from dimens_base.xml
  • Removed 13 unused alpha values from alphas.xml
  • Deleted 16 unused drawable files across multiple density folders
  • Removed 2 unused color selector XML files

Steps to reproduce

  1. Build the app using ./gradlew assembleVanillaDebug
  2. Verify the app starts and functions normally
  3. Check that no resources are missing or broken

Testing information

  • While green CI should be enough, scan through the changes to make sure that none of the deleted resources were used in runtime

  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

@kidinov kidinov added this to the 23.4 milestone Sep 18, 2025
@kidinov kidinov requested a review from samiuelson September 18, 2025 09:36
@kidinov kidinov changed the title Remove unused resources to reduce APK size [HACK] Remove unused resources Sep 18, 2025
@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Sep 18, 2025

📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
App Name WooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit4db950f
Direct Downloadwoocommerce-wear-prototype-build-pr14632-4db950f.apk

@wpmobilebot
Copy link
Collaborator

wpmobilebot commented Sep 18, 2025

📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App Name WooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit4db950f
Direct Downloadwoocommerce-prototype-build-pr14632-4db950f.apk

@kidinov kidinov requested review from malinajirka and removed request for samiuelson September 18, 2025 12:13
@kidinov kidinov marked this pull request as ready for review September 18, 2025 12:35
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 38.49%. Comparing base (8e165c0) to head (4db950f).
⚠️ Report is 25 commits behind head on trunk.

Additional details and impacted files
@@            Coverage Diff            @@
##              trunk   #14632   +/-   ##
=========================================
  Coverage     38.49%   38.49%           
- Complexity     9767     9768    +1     
=========================================
  Files          2064     2064           
  Lines        115429   115429           
  Branches      15370    15370           
=========================================
+ Hits          44430    44434    +4     
+ Misses        66883    66880    -3     
+ Partials       4116     4115    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@malinajirka malinajirka self-assigned this Oct 2, 2025
Copy link
Contributor

@malinajirka malinajirka left a comment

Choose a reason for hiding this comment

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

LGTM!

@malinajirka malinajirka merged commit 4aa44eb into trunk Oct 2, 2025
16 checks passed
@malinajirka malinajirka deleted the hack-remove-unused-resources branch October 2, 2025 11:54
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.

5 participants