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

[Do not merge][Paywalls] Add Badge Modifier #4596

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

MarkVillacampa
Copy link
Member

Checklist

  • If applicable, unit tests
  • If applicable, create follow-up issues for purchases-android and hybrids

Motivation

Description

Copy link

emerge-tools bot commented Dec 16, 2024

1 build increased size

Name Version Download Change Install Change Approval
⚠️ Paywalls
com.revenuecat.PaywallsTester
1.0 (1) 11.1 MB ⬆️ 449.7 kB (4.23%) 41.2 MB ⬆️ 1.6 MB (4.16%) N/A

Paywalls 1.0 (1)
com.revenuecat.PaywallsTester

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

Total install size change: ⬆️ 1.6 MB (4.16%)
Total download size change: ⬆️ 449.7 kB (4.23%)

Largest size changes

Item Install Size Change
DYLD.String Table ⬆️ 116.8 kB
RevenueCatUI.StackComponentViewModel.StackComponentViewModel ⬆️ 50.4 kB
Code Signature ⬆️ 41.6 kB
RevenueCat.OfferingsFactory.OfferingsFactory ⬆️ 23.3 kB
RevenueCatUI.StickyFooterComponentViewModel.StickyFooterComponent... ⬆️ 14.8 kB
View Treemap

Image of diff


🛸 Powered by Emerge Tools

Comment trigger: Size diff threshold of 100.00kB exceeded

) throws {
self.component = component
self.viewModels = viewModels

if let badge = component.badge {
badgeTextViewModel = try TextComponentViewModel(
Copy link
Member Author

Choose a reason for hiding this comment

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

Initialising the TextComponentViewModel of the badge in the StackComponentViewModel constructor so we can throw if necessary.

self.bottomLeft = bottomLeft.flatMap { CGFloat($0) }
self.bottomRight = bottomRight.flatMap { CGFloat($0) }
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Apparently this initialiser was not needed because we're not using explicit Doubles anywhere

Base automatically changed from fix-borders to main December 16, 2024 18:49
@@ -128,6 +151,7 @@ struct StackComponentStyle {
self.shape = shape?.shape
self.border = border?.border
self.shadow = shadow?.shadow
self.badge = badge?.badge(stackShape: self.shape)
Copy link
Member Author

Choose a reason for hiding this comment

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

The stack shape is only used to calculate the the corner radius of the edge-to-edge leading/trailing style badge, and make it match the parent stack.

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.

1 participant