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] Fixes various deserialization issues #2018

Merged
merged 161 commits into from
Jan 3, 2025

Conversation

JayShortway
Copy link
Member

Description

After hooking up the Android SDK to the official V2 templates repo, some deserialization issues were uncovered:

  • semi_bold should be semibold
  • When there's no padding / margin, the backend sends an empty object ({}). To deserialize this properly, we have to make all properties of Padding optional.

Copy link

codecov bot commented Dec 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.89%. Comparing base (af72255) to head (2eadfe5).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2018      +/-   ##
==========================================
- Coverage   81.90%   81.89%   -0.01%     
==========================================
  Files         260      260              
  Lines        8516     8512       -4     
  Branches     1226     1226              
==========================================
- Hits         6975     6971       -4     
  Misses       1042     1042              
  Partials      499      499              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

# Conflicts:
#	ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/components/ComponentView.kt
#	ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/components/image/ImageComponentView.kt
#	ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/components/style/StyleFactory.kt
#	ui/revenuecatui/src/test/kotlin/com/revenuecat/purchases/ui/revenuecatui/components/style/StyleFactoryTests.kt
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.

Just a comment, but not a blocker at all.

# Conflicts:
#	ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/components/ComponentView.kt
#	ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/components/button/ButtonComponentView.kt
#	ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/components/pkg/PackageComponentView.kt
#	ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/components/stack/StackComponentView.kt
#	ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/components/style/PackageComponentStyle.kt
#	ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/components/style/StyleFactory.kt
#	ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/helpers/OfferingToStateMapper.kt
#	ui/revenuecatui/src/test/kotlin/com/revenuecat/purchases/ui/revenuecatui/components/LoadedPaywallComponentsLocaleTests.kt
#	ui/revenuecatui/src/test/kotlin/com/revenuecat/purchases/ui/revenuecatui/components/pkg/PackageComponentViewTests.kt
#	ui/revenuecatui/src/test/kotlin/com/revenuecat/purchases/ui/revenuecatui/components/text/TextComponentViewTests.kt
#	ui/revenuecatui/src/test/kotlin/com/revenuecat/purchases/ui/revenuecatui/components/text/TextComponentViewWindowTests.kt
# Conflicts:
#	ui/revenuecatui/src/main/kotlin/com/revenuecat/purchases/ui/revenuecatui/helpers/OfferingToStateMapper.kt
Base automatically changed from pw2-simplify-validation to main January 2, 2025 15:32
@JayShortway JayShortway merged commit 07b8391 into main Jan 3, 2025
12 checks passed
@JayShortway JayShortway deleted the pw2-fix-deserialization branch January 3, 2025 09:18
tonidero pushed a commit that referenced this pull request Jan 9, 2025
**This is an automatic release.**

## RevenueCat SDK
### 📦 Dependency Updates
* Updates the Play Billing Library to 7.1.1. (#2032) via JayShortway
(@JayShortway)

### 🔄 Other Changes
* [Paywalls V2] Fixes click consumption in text buttons (#2033) via
JayShortway (@JayShortway)
* [Paywalls V2] Handles gradient percentages in the 0..100 range (#2030)
via JayShortway (@JayShortway)
* [Paywalls V2] Add `Badge` property to StackComponent (#2003) via Toni
Rico (@tonidero)
* [Paywalls V2] Improves image previews (#2029) via JayShortway
(@JayShortway)
* Make `PurchasesError` `java.io.Serializable` (#2031) via Toni Rico
(@tonidero)
* [Paywalls V2] Fixes `ImageComponentView` size when axes are Fit and
Fixed (#2024) via JayShortway (@JayShortway)
* [Paywalls V2] Image backgrounds support `fit_mode` and `color_overlay`
(#2021) via JayShortway (@JayShortway)
* [Paywalls V2] Fixes various rendering issues (#2020) via JayShortway
(@JayShortway)
* [Paywalls V2] Fixes various deserialization issues (#2018) via
JayShortway (@JayShortway)
* [Paywalls V2] Simplifies validation of `PaywallComponentsData` (#2017)
via JayShortway (@JayShortway)
* [Paywalls V2] Moves click handling from `ButtonComponentStyle` to
`ButtonComponentView` (#2016) via JayShortway (@JayShortway)
* [Paywalls V2] Adds `PackageComponentView` (#2014) via JayShortway
(@JayShortway)
* [Paywalls V2] Adds `ImageComponentState` and override functionality
(#2012) via JayShortway (@JayShortway)

Co-authored-by: revenuecat-ops <[email protected]>
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.

2 participants