-
Notifications
You must be signed in to change notification settings - Fork 85
[Paywalls] Fix Bold text in Markdown on higher Weights Text composables #2421
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
Conversation
@@ -97,7 +90,7 @@ | |||
<ID>ModifierNotUsedAtRoot:UserScreen.kt$modifier = modifier .fillMaxWidth() .weight(1f, true) .padding(horizontal = 32.dp)</ID> | |||
<ID>ModifierNotUsedAtRoot:UserScreen.kt$modifier = modifier.padding(16.dp)</ID> | |||
<ID>ModifierNotUsedAtRoot:UserScreen.kt$modifier = modifier.padding(8.dp)</ID> | |||
<ID>ModifierReused:Markdown.kt$Box( modifier = modifier .drawBehind { drawLine( color = color, strokeWidth = 2f, start = Offset(12.dp.value, 0f), end = Offset(12.dp.value, size.height), ) } .padding(start = 16.dp, top = 4.dp, bottom = 4.dp), ) { val text = buildAnnotatedString { pushStyle( MaterialTheme.typography.bodyLarge.toSpanStyle() .plus(SpanStyle(fontStyle = FontStyle.Italic)), ) appendMarkdownChildren(blockQuote, color, allowLinks) pop() } Text(text, modifier) }</ID> | |||
<ID>ModifierReused:Markdown.kt$Box( modifier = modifier .drawBehind { drawLine( color = color, strokeWidth = 2f, start = Offset(12.dp.value, 0f), end = Offset(12.dp.value, size.height), ) } .padding(start = 16.dp, top = 4.dp, bottom = 4.dp), ) { val text = buildAnnotatedString { pushStyle( MaterialTheme.typography.bodyLarge.toSpanStyle() .plus(SpanStyle(fontStyle = FontStyle.Italic)), ) appendMarkdownChildren(blockQuote, color, allowLinks, baseFontWeight) pop() } Text(text, modifier) }</ID> |
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.
TBH, I think ideally we would fix that... But I didn't want to change anything for this PR, so just updated the baseline for now.
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.
Looks good to me!! 🙌
📸 Snapshot Test11 modified, 622 unchanged
🛸 Powered by Emerge Tools |
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.
Much better now, yes! 🚀
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2421 +/- ##
=======================================
Coverage 79.63% 79.63%
=======================================
Files 289 289
Lines 10506 10506
Branches 1493 1493
=======================================
Hits 8366 8366
Misses 1492 1492
Partials 648 648 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
**This is an automatic release.** ## RevenueCatUI SDK ### Paywallv2 #### 🐞 Bugfixes * [Paywalls] Fix Bold text in Markdown on higher Weights Text composables (#2421) via Toni Rico (@tonidero) ### 🔄 Other Changes * Add coroutines dependency to core SDK (#2423) via Toni Rico (@tonidero) * [Paywalls] Add `font_weight_int` to `TextComponent` (#2419) via Toni Rico (@tonidero) * [Paywalls V2] Downloadable fonts (#2414) via Toni Rico (@tonidero) * [AUTOMATIC][Paywalls V2] Updates paywall-preview-resources submodule (#2412) via RevenueCat Git Bot (@RCGitBot) * Use new resource format for cross validation screenshots and fix lint (#2413) via Josh Holtz (@joshdholtz) --------- Co-authored-by: revenuecat-ops <ops@revenuecat.com> Co-authored-by: Toni Rico <antonio.rico.diez@revenuecat.com>
Description
Before this, if using markdown to make text Bold on a Text composable that had a FontWeight > Bold, that text would actually lower weight to Bold. This makes it so we use the Text composable weight in case FontWeight > Bold.