Skip to content

Paywalls: fix empty description when using custom package type and {{ sub_period }}#3495

Merged
NachoSoto merged 7 commits into
mainfrom
andy/fix/custom_identifier_showing_empty_period
Dec 7, 2023
Merged

Paywalls: fix empty description when using custom package type and {{ sub_period }}#3495
NachoSoto merged 7 commits into
mainfrom
andy/fix/custom_identifier_showing_empty_period

Conversation

@aboedo

@aboedo aboedo commented Dec 6, 2023

Copy link
Copy Markdown
Member

If you select a custom package type and set Offer Period, the paywall would have an empty entry for that package.

image
Before After
IMG_908CED5B663B-1 (1) IMG_B1CED574DF20-1

@aboedo aboedo self-assigned this Dec 6, 2023
@aboedo aboedo requested review from a team and dpannasch December 6, 2023 18:04

@NachoSoto NachoSoto left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Awesome, nice find!

Just one comment about .unknown.

expect(TestData.sixMonthPackage.periodName(Self.english)) == "6 Month"
expect(TestData.annualPackage.periodName(Self.english)) == "Annual"
expect(TestData.lifetimePackage.periodName(Self.english)) == "Lifetime"
expect(TestData.customPackage.periodName(Self.english)) == "Custom"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

<3

Comment thread RevenueCatUI/Helpers/Package+VariableDataProvider.swift Outdated
self.offerText(firstRow: "12",
secondRow: Localization.localized(packageType: .monthly,
locale: self.locale))
locale: self.locale) ?? "Monthly")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh this should be Localization.localizedDuration(for: .monthly, locale: self.locale) instead

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just pushed this 😇

Comment thread RevenueCatUI/Helpers/Package+VariableDataProvider.swift
@NachoSoto NachoSoto changed the title Paywalls: fix empty description when using custom package type and Offer Period Paywalls: fix empty description when using custom package type and Offer Period Dec 7, 2023
@NachoSoto NachoSoto changed the title Paywalls: fix empty description when using custom package type and Offer Period Paywalls: fix empty description when using custom package type and {{ sub_period }} Dec 7, 2023
@NachoSoto NachoSoto enabled auto-merge (squash) December 7, 2023 23:02
@NachoSoto NachoSoto merged commit 56f7178 into main Dec 7, 2023
@NachoSoto NachoSoto deleted the andy/fix/custom_identifier_showing_empty_period branch December 7, 2023 23:17
NachoSoto added a commit that referenced this pull request Dec 7, 2023
This was caused by a conflicting merge between #3495 and #3476.
@NachoSoto NachoSoto mentioned this pull request Dec 7, 2023
NachoSoto added a commit that referenced this pull request Dec 8, 2023
This was caused by a conflicting merge between #3495 and #3476.
NachoSoto pushed a commit that referenced this pull request Dec 12, 2023
**This is an automatic release.**

### RevenueCatUI
* `Paywalls`: improve image caching (#3498) via NachoSoto (@NachoSoto)
* `Paywalls`: change style of CTA button to be consistent with other
platforms (#3507) via NachoSoto (@NachoSoto)
* `Paywalls`: open footer links on Safari on Catalyst (#3508) via
NachoSoto (@NachoSoto)
* `Paywalls`: fix compilation on Xcode < 14.3 (#3513) via NachoSoto
(@NachoSoto)
* Fix typo in zh-Hans localization of RevenueCatUI (#3512) via Francis
Feng (@francisfeng)
* `Paywalls`: fix PaywallViewControllerDelegate access from Objective-C
(#3510) via noncenz (@noncenz)
* `Paywalls`: open Terms and Privacy Policy links in-app (#3475) via
Andy Boedo (@aboedo)
* `Paywalls`: fix empty description when using `custom` package type and
`{{ sub_period }}` (#3495) via Andy Boedo (@aboedo)
* `Paywalls`: use `HEIC` images (#3496) via NachoSoto (@NachoSoto)
* Paywalls: disable the close button when an action is in progress
(#3474) via Andy Boedo (@aboedo)
* `Paywalls`: adjusted German translations (#3476) via Tensei (@tensei)
* Paywalls: Improve Chinese localization (#3489) via Andy Boedo
(@aboedo)
### Other Changes
* `CircleCI`: add git credentials to snapshot generation (#3506) via
NachoSoto (@NachoSoto)
* `StoreProduct`: improve `priceFormatter` documentation (#3500) via
NachoSoto (@NachoSoto)
* `Paywalls`: fix tests (#3499) via NachoSoto (@NachoSoto)
* `Optimization`: changed `first` to `first(where:)` (#3467) via
NachoSoto (@NachoSoto)
aboedo added a commit to RevenueCat/purchases-android that referenced this pull request Dec 20, 2023
…fer Period (#1519)

Android equivalent of
RevenueCat/purchases-ios#3495

If you select a custom package type and set Offer Period, the paywall
would have an empty entry for that package.


![image](https://github.com/RevenueCat/purchases-android/assets/3922667/3c3461b9-6732-4aaf-8497-5915a72f9c5f)

| Before | After |
| :-: | :-: |
|
![Screenshot_20231206-144952](https://github.com/RevenueCat/purchases-android/assets/3922667/8331b6ae-f87b-487a-a20d-0cbca86a937c)
|
![Screenshot_20231206-151434](https://github.com/RevenueCat/purchases-android/assets/3922667/33fc77a8-e5b8-4457-bc20-f2096238f1c7)
|
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