Skip to content
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

[Paywalls V2] Support custom fonts with UIConfig #4631

Merged
merged 2 commits into from
Jan 7, 2025

Conversation

joshdholtz
Copy link
Member

@joshdholtz joshdholtz commented Jan 5, 2025

Motivation

Support custom font mapping in UIConfig

Description

  • New UIConfigProvider that gets passed into all of the view models
  • PaywallComponent.FontSize has a makeFont() function that now attempts to find the font family name
    • A warning gets logged if the font is not found
    • A warning gets logged if a googleFont is configured (because its not supported here)
    • Falls back to system font if not found

BONUS: Deleted Spacer and LinkButton finally (it was breaking with this UIConfigProvider and I didn't want to fix it)

Screenshot 2025-01-05 at 9 09 27 AM

Copy link

emerge-tools bot commented Jan 5, 2025

1 build decreased size

Name Version Download Change Install Change Approval
Paywalls
com.revenuecat.PaywallsTester
1.0 (1) 10.8 MB ⬇️ 50.8 kB (-0.47%) 40.2 MB ⬇️ 142.3 kB (-0.36%) N/A

Paywalls 1.0 (1)
com.revenuecat.PaywallsTester

⚖️ Compare build
📦 Install build
⏱️ Analyze build performance

Total install size change: ⬇️ 142.3 kB (-0.36%)
Total download size change: ⬇️ 50.8 kB (-0.47%)

Largest size changes

Item Install Size Change
🗑 RevenueCatUI.LinkButtonComponentViewModel ⬇️ -18.1 kB
RevenueCatUI.TextComponentViewModel.TextComponentViewModel ⬆️ 9.5 kB
DYLD.String Table ⬇️ -3.7 kB
Code Signature ⬇️ -3.5 kB
DYLD.Exports ⬇️ -1.7 kB
View Treemap

Image of diff


🛸 Powered by Emerge Tools

Comment trigger: Size diff threshold of 100.00kB exceeded

@joshdholtz joshdholtz requested review from a team January 6, 2025 17:17
@joshdholtz joshdholtz marked this pull request as ready for review January 6, 2025 17:17
Base automatically changed from paywalls-v2/ui-config-api to main January 6, 2025 20:33
@joshdholtz joshdholtz force-pushed the paywalls-v2/ui-config-fonts branch from 6c590fb to 168ba6f Compare January 6, 2025 20:40
Copy link
Member

@JayShortway JayShortway left a comment

Choose a reason for hiding this comment

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

📦 ➡️ 🚢

Copy link
Member

@MarkVillacampa MarkVillacampa left a comment

Choose a reason for hiding this comment

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

🚀

@joshdholtz joshdholtz merged commit 68bf247 into main Jan 7, 2025
10 checks passed
@joshdholtz joshdholtz deleted the paywalls-v2/ui-config-fonts branch January 7, 2025 12:36
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