woocommerce-android icon indicating copy to clipboard operation
woocommerce-android copied to clipboard

Migrate legacy Material Icons to Material Symbols

Open irfano opened this issue 2 weeks ago • 5 comments

Closes WOOMOB-1599

Description

Note: With Material there are two different styles of icons, Material Symbols (New) and Material Icons (material-icons). The Material Icon library includes a set of predefined Icons that can be used in Compose without needing to import an SVG manually. However, this artifact is no longer maintained or recommended for use in your apps, as it contains an older look and feel and can also increase the build time of your apps significantly. Instead, we recommend using Google Font Icons and download the XML file from the Android Tab to create an up-to-date Material Symbols style Icon. - https://developer.android.com/develop/ui/compose/graphics/images/material

Based in this recommendation, this PR removes the material-icons dependency and replaces all usages with their equivalents from Google Font Icons.

The diff is large, but the review should not be too difficult. This PR only updates icon resources. The main things to watch for during review are:

  • incorrect icon substitutions (e.g., accidentally using delete instead of close)
  • inconsistencies in icon size where the replacement may differ slightly

[!NOTE] @malinajirka and @samiuelson, I’m also requesting your review since Hicham and Adam are AFK and this PR is project-wide but a single reviewer should be enough.

Notes

  • Some icon designs will look different, this is expected because the previous library contained outdated versions.
  • All new icons were downloaded from fonts.google.com. Each icon there has a Filled toggle, and I made sure to download the correct variant to preserve the look of the previous icon.
  • Most changes were verified using Compose previews.
  • When a vector asset already existed in our resources, I reused it instead of adding a new one.
  • The differences are generally subtle and hard to notice, except for the updated Delete icon.

Test Steps

  • Since I tested every icon change with a Compose preview or on the app, full regression testing of all icons is unnecessary.
  • A quick pass over core screens and basic navigation icons should be sufficient to confirm no misplaced or incorrect icons.

Images/gif

  • [x] 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.

irfano avatar Dec 10 '25 16:12 irfano

1 Warning
:warning: This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by :no_entry_sign: Danger

dangermattic avatar Dec 10 '25 16:12 dangermattic

Project dependencies changes

list
- Removed Dependencies
androidx.compose.material:material-icons-core:1.7.8
androidx.compose.material:material-icons-core-android:1.7.8
androidx.compose.material:material-icons-extended:1.7.8
androidx.compose.material:material-icons-extended-android:1.7.8
tree
-+--- androidx.compose:compose-bom:2025.11.00
-|    +--- androidx.compose.material:material-icons-extended:1.7.8 (c)
-|    +--- androidx.compose.material:material-icons-extended-android:1.7.8 (c)
-|    +--- androidx.compose.material:material-icons-core:1.7.8 (c)
-|    \--- androidx.compose.material:material-icons-core-android:1.7.8 (c)
-\--- androidx.compose.material:material-icons-extended -> 1.7.8
-     \--- androidx.compose.material:material-icons-extended-android:1.7.8
-          +--- androidx.compose.material:material-icons-core:1.7.8
-          |    \--- androidx.compose.material:material-icons-core-android:1.7.8
-          |         +--- androidx.compose.ui:ui:1.6.0 -> 1.9.4 (*)
-          |         +--- org.jetbrains.kotlin:kotlin-stdlib:1.8.22 -> 2.2.21 (*)
-          |         \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.22 -> 2.2.21 (*)
-          \--- org.jetbrains.kotlin:kotlin-stdlib-common:1.8.22 -> 2.2.21 (*)

wpmobilebot avatar Dec 10 '25 17:12 wpmobilebot

📲 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 NameWooCommerce-Wear Android
Platform⌚️ Wear OS
FlavorJalapeno
Build TypeDebug
Commit412c954d16813260e904dc31f8b0362906234dbe
Direct Downloadwoocommerce-wear-prototype-build-pr15081-412c954.apk

wpmobilebot avatar Dec 10 '25 17:12 wpmobilebot

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

App NameWooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Commit412c954d16813260e904dc31f8b0362906234dbe
Direct Downloadwoocommerce-prototype-build-pr15081-412c954.apk

wpmobilebot avatar Dec 10 '25 17:12 wpmobilebot

Codecov Report

:x: Patch coverage is 2.27273% with 301 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 38.52%. Comparing base (b251959) to head (412c954). :warning: Report is 76 commits behind head on trunk.

Files with missing lines Patch % Lines
.../ai/description/AIProductDescriptionBottomSheet.kt 0.00% 87 Missing :warning:
...i/products/selector/components/SelectorListItem.kt 0.00% 22 Missing :warning:
...rce/android/ui/orders/AIThankYouNoteBottomSheet.kt 0.00% 20 Missing :warning:
...droid/ui/compose/component/DragAndDropItemsList.kt 0.00% 15 Missing :warning:
...e/android/ui/dashboard/DashboardDateRangeHeader.kt 0.00% 15 Missing :warning:
...oocommerce/android/ui/compose/component/Buttons.kt 0.00% 13 Missing :warning:
...oocommerce/android/ui/compose/component/Toolbar.kt 0.00% 13 Missing :warning:
.../ui/orders/creation/views/ExpandableProductCard.kt 0.00% 12 Missing :warning:
...rders/wooshippinglabels/components/NoticeBanner.kt 0.00% 10 Missing :warning:
...merce/android/ui/compose/component/OverflowMenu.kt 0.00% 9 Missing :warning:
... and 34 more
Additional details and impacted files
@@             Coverage Diff              @@
##              trunk   #15081      +/-   ##
============================================
- Coverage     38.53%   38.52%   -0.01%     
- Complexity    10397    10398       +1     
============================================
  Files          2173     2172       -1     
  Lines        123725   123758      +33     
  Branches      17050    17065      +15     
============================================
+ Hits          47676    47679       +3     
- Misses        71238    71269      +31     
+ Partials       4811     4810       -1     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov-commenter avatar Dec 10 '25 17:12 codecov-commenter