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] Parses UiConfig #2068

Merged
merged 17 commits into from
Jan 22, 2025
Merged

[Paywalls V2] Parses UiConfig #2068

merged 17 commits into from
Jan 22, 2025

Conversation

JayShortway
Copy link
Member

Description

Adds UiConfig to Offering. This is the Android equivalent of RevenueCat/purchases-ios#4628. The UiConfig is not actually used yet. That will come in follow-up PRs.

Lots of file and line changes, but not terribly complex.

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.

LGTM!

},
"localizations": {
"en_US": {
"monthly": "monthly"
Copy link
Contributor

Choose a reason for hiding this comment

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

I believe it should work... But if we receive unknown localization keys here, it should continue parsing only the known ones correct?

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually this didn't work, good call! I have "handling unknown enums" on my list, but decided to do this one now as it is slightly different because it's "handling unknown enums in a map (of maps)". e802ad6

"type": "name",
"value": "SF Pro"
},
"android": {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we have a "secondary" font that uses google_fonts for android? (I see we have one for web, but that would be ignored by the deserializer)

Copy link
Member Author

Choose a reason for hiding this comment

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

Good idea! eed558c

.circleci/config.yml Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 85.14851% with 15 lines in your changes missing coverage. Please review.

Project coverage is 81.38%. Comparing base (d4678e9) to head (170ba1e).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
...c/main/kotlin/com/revenuecat/purchases/UiConfig.kt 59.09% 3 Missing and 6 partials ⚠️
.../com/revenuecat/purchases/common/OfferingParser.kt 66.66% 3 Missing and 1 partial ⚠️
...rchases/paywalls/components/common/Localization.kt 96.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2068      +/-   ##
==========================================
+ Coverage   81.35%   81.38%   +0.02%     
==========================================
  Files         265      266       +1     
  Lines        8690     8793     +103     
  Branches     1235     1247      +12     
==========================================
+ Hits         7070     7156      +86     
- Misses       1116     1126      +10     
- Partials      504      511       +7     

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

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.

Ahmm makes sense and looks good!

@JayShortway JayShortway merged commit 208bcd8 into main Jan 22, 2025
12 checks passed
@JayShortway JayShortway deleted the pw2-uiconfig branch January 22, 2025 10:53
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