Skip to content

Conversation

ajpallares
Copy link
Member

@ajpallares ajpallares commented Sep 3, 2025

Motivation

Markdown bold text in paywalls was only being applied when the text had a regular font weight. For example, setting the font weight of a text to Extra light would not apply markdown bold. This is a bug

Description

This PR fixes the behavior for markdown bold text in paywalls so that it works as intended:

  • If the font weight of the text is <= Bold, markdown bold should be Bold
  • If the font weight of the text is > Bold, markdown bold should be the same as the whole text (no difference)

Related fix on Android: RevenueCat/purchases-android#2421

Also added a Preview (also for snapshot tests) using bold markdown in a text with extra light font weight:

Before After
image image

Copy link

emerge-tools bot commented Sep 3, 2025

📸 Snapshot Test

69 modified, 6 added, 624 unchanged

Name Added Removed Modified Renamed Unchanged Errored Approval
RevenueCat
com.revenuecat.PaywallsTester.mac-catalyst-optimized-for-mac
2 0 0 0 231 0 ✅ Approved
RevenueCat
com.revenuecat.PaywallsTester.mac-catalyst-scaled-to-match-ipad
2 0 68 0 163 0 ✅ Approved
RevenueCat
com.revenuecat.PaywallsTester
2 0 1 0 230 0 ✅ Approved

🛸 Powered by Emerge Tools

@ajpallares ajpallares requested review from a team and joshdholtz September 3, 2025 09:46
Copy link
Contributor

@tonidero tonidero left a comment

Choose a reason for hiding this comment

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

I'm not superfamiliar with this TBH, but code seems correct to me!

Copy link
Contributor

@JZDesign JZDesign left a comment

Choose a reason for hiding this comment

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

Very interesting

@ajpallares ajpallares merged commit 4bec385 into main Sep 3, 2025
12 checks passed
@ajpallares ajpallares deleted the fix-bold-markdown-in-paywalls branch September 3, 2025 15:21
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