-
Notifications
You must be signed in to change notification settings - Fork 232
Upgrade compose-material3 to 1.2.0-alpha05
version
#1011
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
Upgrade compose-material3 to 1.2.0-alpha05
version
#1011
Conversation
|
📱 Scan the QR code below to install the build (arm64 only) for this PR. |
c580624
to
21a1617
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #1011 +/- ##
===========================================
+ Coverage 56.89% 56.94% +0.05%
===========================================
Files 1015 990 -25
Lines 25776 25261 -515
Branches 5201 5110 -91
===========================================
- Hits 14666 14386 -280
+ Misses 8819 8613 -206
+ Partials 2291 2262 -29
☔ View full report in Codecov by Sentry. |
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.
Some comments
@@ -60,7 +60,11 @@ fun EmojiPicker( | |||
|
|||
val emojiProvider = remember { GoogleEmojiProvider() } | |||
val categories = remember { emojiProvider.categories } | |||
val pagerState = rememberPagerState() | |||
val pagerState = rememberPagerState( | |||
initialPage = 0, |
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.
Aren't these default params? Can we omit them?
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.
Oh, you're right. We just need to provide the pageCount
.
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.
Fixed in 8601c25
@@ -35,110 +23,142 @@ object TypographyTokens { | |||
lineHeight = 22.sp, | |||
fontSize = 16.sp, | |||
letterSpacing = 0.015629999999999998.em, | |||
platformStyle = PlatformTextStyle(includeFontPadding = false), |
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.
These are also all new defaults, do we actually need to specify them?
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.
I don't think we can avoid doing that, since the default params are all null
. Also, these files are auto-generated by the compound tokens project.
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.
You mean also includeFontPadding = false
is not a default?
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.
It is false by default now, but LineHeightStyle
depends on it being false to work fine, so I think it's better if we're explicit.
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.
BTW forceLineHeight()
seems to be used only once and it's public, is it meant to be public API or can we "privatize" or "inline" it with its only usage?
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.
I left it there because I thought we might need to add it for custom styles, but:
- There should be no custom styles.
- If there are, they should be derived from our Compound ones and they would already have the right line height style.
So there's probably no need for it anymore.
@@ -35,7 +35,7 @@ fun Divider( | |||
thickness: Dp = ElementDividerDefaults.thickness, | |||
color: Color = DividerDefaults.color, | |||
) { | |||
androidx.compose.material3.Divider( | |||
androidx.compose.material3.HorizontalDivider( |
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.
Should we change the outer composable name too?
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.
Done in cbad214
06fdaab
to
e0e3112
Compare
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.
LGTM!
Added a workaround for Showkase using deprecated APIs.
116d891
to
86ac305
Compare
1.2.0-alpha04
version1.2.0-alpha05
version
9c122da
to
0082e5c
Compare
Kudos, SonarCloud Quality Gate passed! |
Changes:
1.2.0-alpha05
.compileSdk
to 34 (needed for upgrading the lib).