-
Notifications
You must be signed in to change notification settings - Fork 1k
MBL-2792 && MBL-2788: Material3 design system - resource shrinking enabled #2422
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
base: master
Are you sure you want to change the base?
Conversation
…le animation effect use now modifier.clickable - Updated gradle version + firebase perf monitor - Added shrinkResources to our release built types
- Removed ScaffoldState as sample for next tickets to come.
@@ -92,7 +92,8 @@ android { | |||
|
|||
buildTypes { | |||
release { | |||
minifyEnabled false | |||
minifyEnabled true | |||
shrinkResources true |
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.
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 :)
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.
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
@@ -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' |
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.
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.2
dependency 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
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.
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.
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.
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) { |
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.
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")
}
@@ -147,9 +145,9 @@ fun ChangePasswordScreen( | |||
}, | |||
snackbarHost = { | |||
SnackbarHost( | |||
hostState = scaffoldState.snackbarHostState, | |||
hostState = snackbarHostState, |
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.
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
📲 What
🤔 Why
🛠 How
background
is nowcontainer
)👀 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
Story 📖
MBL-2788
MBL-2792