-
Notifications
You must be signed in to change notification settings - Fork 338
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
: improve conversion from Color
/UIColor
to PaywallColor
#3357
Conversation
green = CGFloat((hexNumber & 0x00ff0000) >> 16) / 256 | ||
blue = CGFloat((hexNumber & 0x0000ff00) >> 8) / 256 | ||
alpha = CGFloat(hexNumber & 0x000000ff) / 256 | ||
red = CGFloat((hexNumber & 0xff000000) >> 24) / 255 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These were wrong
This wasn't fully required, but now we'll correctly encode `stringRepresentation`. Also adds an overload for `UIColor` which allows us to use color literals in Xcode.
9ca1724
to
370ac92
Compare
c6bc117
to
4da2cd8
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3357 +/- ##
==========================================
- Coverage 85.99% 85.96% -0.04%
==========================================
Files 237 237
Lines 17132 17159 +27
==========================================
+ Hits 14733 14751 +18
- Misses 2399 2408 +9 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
**This is an automatic release.** ### New Features * `Offering`: new `getMetadataValue` with `Decodable` type (#3373) via NachoSoto (@NachoSoto) * Add `StoreProduct.pricePerWeek` (#3354) via NachoSoto (@NachoSoto) ### RevenueCatUI * `Paywalls`: `.presentPaywallIfNeeded` allows overriding `Offering` (#3370) via NachoSoto (@NachoSoto) * `Paywalls`: new optional `displayCloseButton` parameter (#3359) via NachoSoto (@NachoSoto) * `Paywalls`: improve period abbreviations in Japanese (#3367) via NachoSoto (@NachoSoto) * `Paywalls`: new `{{ sub_price_per_week }}` variable (#3355) via NachoSoto (@NachoSoto) * `Paywalls`: log warning when attempting to purchase already-subscribed product (#3366) via NachoSoto (@NachoSoto) * `Paywalls`: improve Japanese localization (#3364) via NachoSoto (@NachoSoto) * `Paywalls`: fix template 2 top padding inside navigation view (#3363) via NachoSoto (@NachoSoto) * `Paywalls`: avoid animating `PurchaseButton` labels when text does not change (#3361) via NachoSoto (@NachoSoto) * `Paywalls`: improve `FooterView` accessibility (#3349) via NachoSoto (@NachoSoto) ### Dependency Updates * Bump cocoapods from 1.14.0 to 1.14.2 (#3356) via dependabot[bot] (@dependabot[bot]) * Bump cocoapods from 1.13.0 to 1.14.0 (#3351) via dependabot[bot] (@dependabot[bot]) ### Other Changes * `Paywalls`: simplify `PurchaseButton` (#3362) via NachoSoto (@NachoSoto) * `Paywalls`: refactored `IntroEligibilityStateView` (#3360) via NachoSoto (@NachoSoto) * `Paywall Tester`: improve template 5 dark colors (#3358) via NachoSoto (@NachoSoto) * `Paywalls`: improve conversion from `Color`/`UIColor` to `PaywallColor` (#3357) via NachoSoto (@NachoSoto) * `Paywalls Tester`: improve `.paywallFooter` presentation (#3348) via NachoSoto (@NachoSoto) * `Paywalls`: move size configuration to `TemplateViewType` (#3352) via NachoSoto (@NachoSoto) --------- Co-authored-by: NachoSoto <[email protected]>
This wasn't fully required, but now we'll correctly encode
stringRepresentation
.Also fixed the math (dividing by 255 instead of 256), which was technically producing slightly incorrect colors.
Also adds an overload for

UIColor
which allows us to use color literals in Xcode: