Skip to content

Conversation

tonidero
Copy link
Contributor

@tonidero tonidero commented Jun 5, 2025

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.

@@ -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>
Copy link
Contributor Author

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.

@tonidero tonidero marked this pull request as ready for review June 5, 2025 15:53
@tonidero tonidero requested review from a team June 5, 2025 15:53
Copy link
Member

@joshdholtz joshdholtz left a 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!! 🙌

Copy link

emerge-tools bot commented Jun 5, 2025

📸 Snapshot Test

11 modified, 622 unchanged

Name Added Removed Modified Renamed Unchanged Errored Approval
TestPurchasesUIAndroidCompatibility Paparazzi
com.revenuecat.testpurchasesuiandroidcompatibility.paparazzi
0 0 5 0 245 0 ✅ Approved
TestPurchasesUIAndroidCompatibility
com.revenuecat.testpurchasesuiandroidcompatibility
0 0 6 0 377 0 ✅ Approved

🛸 Powered by Emerge Tools

Copy link
Member

@ajpallares ajpallares left a 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! 🚀

Copy link

codecov bot commented Jun 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.63%. Comparing base (7e55c48) to head (a99ad10).
Report is 1 commits behind head on main.

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

@tonidero tonidero added this pull request to the merge queue Jun 5, 2025
Merged via the queue into main with commit e98b552 Jun 5, 2025
14 checks passed
@tonidero tonidero deleted the fix-bold-markdown-text branch June 5, 2025 17:16
tonidero added a commit that referenced this pull request Jun 6, 2025
**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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants