Skip to content

Conversation

Arkariang
Copy link
Contributor

@Arkariang Arkariang commented Sep 17, 2025

📲 What

🤔 Why

  • To achieve the look and feel desired for visioning, with a floating navigation bar, we need to migrate to Material3.

🛠 How

👀 See

| Before 🐛 |
This video has been recorded before the M3 migration (Master)

BeforeM3.mp4

| After 🦋 |
| --- | --- |
This video has been recorded with this branch code, M3 in place

M3.mp4

| | |

📋 QA

  • Browse around the app, and around the Design system, there should not be any noticiable user facing changes :)

Story 📖

MBL-2788
MBL-2792

…le animation effect use now modifier.clickable

- Updated gradle version + firebase perf monitor
- Added shrinkResources to our release built types
- progress indicators
- Text inputs
- Removed ScaffoldState as sample for next tickets to come.
@Arkariang Arkariang changed the title Imartin/mbl 2788 m3 design system MBL-2792 && MBL-2788: Material3 design system - resource shrinking enabled Sep 17, 2025
@@ -92,7 +92,8 @@ android {

buildTypes {
release {
minifyEnabled false
minifyEnabled true
shrinkResources true
Copy link
Contributor Author

@Arkariang Arkariang Sep 17, 2025

Choose a reason for hiding this comment

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

minifyEnabled true

  • Runs R8/ProGuard to strip unused classes/methods and obfuscate names. As result smaller APK (and a bit harder to reverse-engineer). With minifyEnabled true, the Android AGP will run R8 and generate a mapping.txt automatically. We will need to upload it to Play Console (potentially will automate via CI later on) to deobfuscate crash logs.

shrinkResources true

  • removes unused resources (images, layouts, strings) from the final build, as output even smaller APK.

These two points address the main concerns explained on bottomNav spike -> https://kickstarter.atlassian.net/wiki/spaces/NT/pages/3903717377/Bottom+Navigation+Spike#App-size-impact

ℹ️ Will run additional QA for these specific changes next sprint once Android 3.35.0 is out.
ℹ️ Will also give a larger explanation if needed on Monday's android sync :)

Copy link
Contributor Author

@Arkariang Arkariang Sep 17, 2025

Choose a reason for hiding this comment

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

@codecov-commenter
Copy link

codecov-commenter commented Sep 17, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 40.49587% with 72 lines in your changes missing coverage. Please review.
✅ Project coverage is 64.65%. Comparing base (711bf50) to head (c227825).

Files with missing lines Patch % Lines
...ckstarter/ui/activities/compose/FormularyScreen.kt 0.00% 44 Missing ⚠️
...rter/ui/views/compose/checkout/ShippingSelector.kt 40.00% 18 Missing and 6 partials ⚠️
...rter/ui/activities/compose/ChangePasswordScreen.kt 25.00% 2 Missing and 1 partial ⚠️
...arter/ui/activities/compose/search/SearchScreen.kt 75.00% 0 Missing and 1 partial ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2422      +/-   ##
============================================
+ Coverage     64.62%   64.65%   +0.03%     
- Complexity     2389     2390       +1     
============================================
  Files           376      376              
  Lines         28431    28434       +3     
  Branches       4122     4115       -7     
============================================
+ Hits          18373    18385      +12     
+ Misses         7802     7790      -12     
- Partials       2256     2259       +3     

☔ 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.

@@ -309,6 +310,11 @@ dependencies {
implementation 'com.airbnb.android:lottie:6.6.7'
implementation "com.airbnb.android:lottie-compose:6.6.7"

// Material
implementation 'com.google.android.material:material:1.6.1'
Copy link
Contributor Author

Choose a reason for hiding this comment

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

com.google.android.material:material:1.6.1 is the dependency used for legacy Views/XML stuff, we are stuck with this one until mobile-visioning is wrapped up.

androidx.compose.material:material:1.6.2 is the dependency for compose UI, this is the ongoing migration surfaced on bottom Nav-spike -> https://kickstarter.atlassian.net/wiki/spaces/NT/pages/3903717377/Bottom+Navigation+Spike#Bring-M3-to-KSApp end goal is to remove androidx.compose.material:material:1.6.2dependency for good 😈

More tickets to follow up, for now handling it alongside Bottom Nav epic -as it is a requirement-, but follow along the migration progress with targeted M3 migration tickets using tag material3-adoption

Copy link
Contributor Author

Choose a reason for hiding this comment

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

specially for @leighdouglas, here sample of how to Migrate the Paging3 UI items.

basically the list is wrapped now within PullToRefreshBox and PullRefreshIndicator is gone.

Copy link
Contributor Author

@Arkariang Arkariang Sep 17, 2025

Choose a reason for hiding this comment

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

Small sample of a container migration, more like this one will come on follow up tickets -> https://kickstarter.atlassian.net/browse/MBL-2789

@@ -266,18 +263,16 @@ fun KSPrimaryGreenButton(
textStyle: TextStyle = typographyV2.body,
isEnabled: Boolean
) {
CompositionLocalProvider(LocalRippleTheme provides KSRippleThemeWhite) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

KSRippleTheme* were used only for the Design System activity to provide the ripple animation. Providing the ripple animation was the only real conflict unable to co-exist M1.6 and M3 versions.

With M3 ripple can be done in any composable via Modifier.clickable :


Box(
    Modifier
        .clickable(
            interactionSource = remember { MutableInteractionSource() },
            indication = rememberRipple(bounded = true, radius = 24.dp)
        )
) {
    Text("Custom clickable with ripple")
}


@Arkariang Arkariang added the material3-adoption https://kickstarter.atlassian.net/issues/?jql=labels%20%3D%20%22material3-adoption%22 label Sep 17, 2025
@Arkariang Arkariang self-assigned this Sep 17, 2025
@Arkariang Arkariang marked this pull request as ready for review September 17, 2025 22:49
@Arkariang Arkariang requested review from leighdouglas and removed request for mtgriego September 18, 2025 17:53
@@ -147,9 +145,9 @@ fun ChangePasswordScreen(
},
snackbarHost = {
SnackbarHost(
hostState = scaffoldState.snackbarHostState,
hostState = snackbarHostState,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Example for snackbar states, more like this will come on follow up tickets.
scafoldState is gone, now we should hold SnackbarHostState(), and pass it to the snackbarhost

To show the message instead of message, visuals.message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
material3-adoption https://kickstarter.atlassian.net/issues/?jql=labels%20%3D%20%22material3-adoption%22
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants