purchases-android icon indicating copy to clipboard operation
purchases-android copied to clipboard

Multi-tier paywall

Open joshdholtz opened this issue 1 year ago • 4 comments

⚠️ #1733 (allows customization of per package name and details) should be merged into this PR before this PR gets merged into main

Motivation

Template 5 but with multiple tiers 😊

Supports...

  • [x] Portrait
  • [x] Landscape
  • [x] Footer
  • [ ] Accessibility

Description

  • Updated PackageConfigurationType for MULTITIER
  • Updated PaywallTemplate for TEMPLATE_7
  • Updated PaywallData with...
    • localizationByTier
  • Updated PaywallData.Configuration with...
    • packages defaults to `emptyList()
    • New imagesByTier: Map<String, ColorInformation>?
    • New colorsByTier: Map<String, Images>?
    • New tiers: List<Tier>?
  • Updated PaywallData.Configuration.ColorInfomation with...
    • tierControlBackground: PaywallColor?
    • tierControlForeground: PaywallColor?
    • tierControlSelectedBackground: PaywallColor?
    • tierControlSelectedForeground: PaywallColor?

Demo

Screenshots

Portrait Landscape Footer Footer Condensed
Screenshot 2024-06-17 at 10 41 36 AM Screenshot 2024-06-17 at 10 36 19 AM Screenshot 2024-06-17 at 10 40 29 AM Screenshot 2024-06-17 at 10 40 33 AM

Video (with animations)

https://github.com/RevenueCat/purchases-android/assets/401294/b06d0dd5-3449-44d9-ad6f-9894bc0edc61

joshdholtz avatar May 30 '24 19:05 joshdholtz

Codecov Report

Attention: Patch coverage is 6.97674% with 40 lines in your changes missing coverage. Please review.

Project coverage is 82.88%. Comparing base (76724cf) to head (95d7a34). Report is 23 commits behind head on main.

Files Patch % Lines
...n/com/revenuecat/purchases/paywalls/PaywallData.kt 6.97% 40 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1720      +/-   ##
==========================================
- Coverage   83.32%   82.88%   -0.45%     
==========================================
  Files         222      222              
  Lines        7550     7589      +39     
  Branches     1060     1066       +6     
==========================================
- Hits         6291     6290       -1     
- Misses        845      885      +40     
  Partials      414      414              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Jun 05 '24 01:06 codecov[bot]

One other thing, should the package selector be anchored to the bottom of the screen, together with the purchase button? Seems to me it would look nicer than tied to the main content.

tonidero avatar Jun 18 '24 10:06 tonidero

I was going to mention the same as @tonidero . I also don't think Google will like that the selected package details is behind the button, like the subscribe button is visible but it's possible the price is covered, like in this screenshot

CleanShot 2024-06-19 at 12 22 17@2x

vegaro avatar Jun 19 '24 10:06 vegaro

I was going to mention the same as @tonidero . I also don't think Google will like that the selected package details is behind the button, like the subscribe button is visible but it's possible the price is covered, like in this screenshot

CleanShot 2024-06-19 at 12 22 17@2x

Yeaaaahhh, this makes sense! I'll talk to the team about this tomorrow to see what we want to do about it 🤔 Thanks for bringing this up!

joshdholtz avatar Jun 20 '24 03:06 joshdholtz

1 Warning
:warning: This PR increases the size of the repo by more than 100.00 KB (increased by 103.03 KB).

Generated by :no_entry_sign: Danger

RevenueCat-Danger-Bot avatar Jul 05 '24 12:07 RevenueCat-Danger-Bot