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: new optional displayCloseButton parameter #3359

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

NachoSoto
Copy link
Contributor

The documentation points out that this is only automatic when using presentPaywallIfNeeded, but it can also be useful to have RevenueCatUI do this automatically.

@NachoSoto NachoSoto added feat A new feature RevenueCatUI labels Oct 27, 2023
@NachoSoto NachoSoto requested a review from a team October 27, 2023 21:49
RevenueCatUI/PaywallView.swift Show resolved Hide resolved
RevenueCatUI/PaywallView.swift Show resolved Hide resolved
Button {
self.dismiss()
} label: {
Image(systemName: "xmark")
Copy link
Contributor

Choose a reason for hiding this comment

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

In Android I used our own close button vector image for this, but I think it should be ok (probably preferrable) to use the system one.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah this uses SFSymbols which is definitely preferred.

NachoSoto added a commit to RevenueCat/revenuecat-docs that referenced this pull request Oct 30, 2023
@codecov
Copy link

codecov bot commented Oct 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (c4566c0) 85.96% compared to head (d2b36d6) 85.99%.
Report is 2 commits behind head on main.

❗ Current head d2b36d6 differs from pull request most recent head f94d530. Consider uploading reports for the commit f94d530 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3359      +/-   ##
==========================================
+ Coverage   85.96%   85.99%   +0.02%     
==========================================
  Files         237      237              
  Lines       17132    17132              
==========================================
+ Hits        14728    14733       +5     
+ Misses       2404     2399       -5     

see 2 files with indirect coverage changes

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

@NachoSoto NachoSoto force-pushed the paywalls-close-button branch 2 times, most recently from 12bca43 to d664465 Compare October 30, 2023 22:04
@NachoSoto NachoSoto enabled auto-merge (squash) October 30, 2023 22:36
@NachoSoto NachoSoto merged commit 9472ed7 into main Oct 30, 2023
21 of 22 checks passed
@NachoSoto NachoSoto deleted the paywalls-close-button branch October 30, 2023 22:46
NachoSoto added a commit that referenced this pull request Oct 31, 2023
When presenting `PaywallView` inside of a `NavigationView` (which was
automatic, and more common with #3359) the icon had too much padding at
the top:
![Screenshot 2023-10-30 at 15 46
24](https://github.com/RevenueCat/purchases-ios/assets/685609/d625a58c-5487-4df8-8f62-fae740a18386)
e

With this fix (note there is no actual navigation title):
![Screenshot 2023-10-30 at 15 46
10](https://github.com/RevenueCat/purchases-ios/assets/685609/3881ec8e-56a1-4f8f-96dc-e734890ac19a)
NachoSoto added a commit to RevenueCat/revenuecat-docs that referenced this pull request Nov 1, 2023
NachoSoto added a commit that referenced this pull request Nov 2, 2023
**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 <ignaciosoto90@gmail.com>
NachoSoto added a commit that referenced this pull request Nov 7, 2023
See #3359.
This brings support for that parameter to the `UIKit` type.
NachoSoto added a commit that referenced this pull request Nov 7, 2023
See #3359.
This brings support for that parameter to the `UIKit` type.
NachoSoto added a commit that referenced this pull request Nov 8, 2023
See #3359.
This brings support for that parameter to the `UIKit` type.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants