[Paywalls V2] Implement V2 variables and functions#4633
Conversation
1 build increased size
Paywalls 1.0 (1)
|
| Item | Install Size Change |
|---|---|
| DYLD.String Table | ⬆️ 45.8 kB |
| RevenueCatUI.TextComponentViewModel.TextComponentViewModel | ⬆️ 9.0 kB |
| RCStoreProductDiscount.Objc Metadata | ⬆️ 6.1 kB |
| DYLD.Exports | ⬆️ 4.8 kB |
| Code Signature | ⬆️ 4.0 kB |
🛸 Powered by Emerge Tools
Comment trigger: Size diff threshold of 100.00kB exceeded
f7b6a15 to
f3be655
Compare
caac5b3 to
61cba31
Compare
f3be655 to
0278854
Compare
6d0827d to
58b3fdd
Compare
58b3fdd to
2a88bef
Compare
JayShortway
left a comment
There was a problem hiding this comment.
Very cool stuff! Approved with some minor suggestions and questions.
| // Note: This is temporary while in closed beta and shortly after | ||
| let processedWithV2AndV1 = Self.processTextV1( | ||
| processedWithV2, | ||
| packageContext: packageContext, | ||
| locale: locale | ||
| ) |
There was a problem hiding this comment.
Just curious why this is needed?
There was a problem hiding this comment.
@JayShortway I have a paywall in the wild that has V1 variables 🙃 And a few of our other beta users might since the dashboard originally was reusing V1 variables
| func getLocalizations(for locale: Locale) -> [String: String] { | ||
| guard let localizations = self.uiConfig.localizations[locale.identifier] else { | ||
| Logger.error("Could not find localizations for '\(locale.identifier)'") | ||
| return [:] | ||
| } |
There was a problem hiding this comment.
Should this throw? Or is it not part of the validation step?
|
|
||
| } | ||
|
|
||
| struct Whisker { |
There was a problem hiding this comment.
Love the name! What's the inspiration?
There was a problem hiding this comment.
A dumb idea about improving our Handlebars like templating and Handlebars logo is a mustache and cat's whiskers are similar-ish to mustaches 😅
There was a problem hiding this comment.
Lore is lore, I'll take it! 😄

Motivation
Implements the new Paywalls V2 variables (ex:
product.currency_code,product.price,product.periodly)Description
UIConfig(from offering response)Back supporting variables
If a variable is not found, it will attempt to find a mapping from
UIConfigto use insteadThere will also be some functions that will help format data (