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

[Customer Center] Initial implementation #3967

Merged
merged 37 commits into from
Aug 9, 2024

Conversation

vegaro
Copy link
Contributor

@vegaro vegaro commented Jun 17, 2024

Alpha of the Customer Center. In this branch, it's been disabled behind a compilation flag.

@vegaro
Copy link
Contributor Author

vegaro commented Jun 17, 2024

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @vegaro and the rest of your teammates on Graphite Graphite

@vegaro vegaro changed the title Create file [Customer Support Workflow] Integration branch Jun 17, 2024
@vegaro vegaro changed the title [Customer Support Workflow] Integration branch [Customer Center] Integration branch Jun 17, 2024
@vegaro vegaro marked this pull request as ready for review June 17, 2024 12:45
@vegaro vegaro force-pushed the integration/customer_support_workflow branch 4 times, most recently from 5fcbe86 to 205ef77 Compare July 3, 2024 06:31
@vegaro vegaro force-pushed the integration/customer_support_workflow branch from 205ef77 to 202b5c6 Compare July 5, 2024 13:12
@vegaro vegaro force-pushed the integration/customer_support_workflow branch from 202b5c6 to 3467940 Compare July 8, 2024 19:52
@RevenueCat-Danger-Bot
Copy link

RevenueCat-Danger-Bot commented Jul 9, 2024

2 Warnings
⚠️ Size check is being bypassed due to the presence of the label "danger-bypass-size-limit"
⚠️ Size increase: 291.19 KB

Generated by 🚫 Danger

@vegaro vegaro force-pushed the integration/customer_support_workflow branch 2 times, most recently from 4028258 to f9f4736 Compare July 15, 2024 17:18
vegaro and others added 6 commits July 17, 2024 11:21
Base branch is `integration/customer_support_workflow` so we don't merge
into `main` yet

Borrows a lot from #3865

Creates a new `CustomerCenterView` that can be used as a customer
support workflow starting point.

All details can be found in
https://linear.app/revenuecat/project/sdk-support-workflow-cf7f6a1d5340/overview

---------

Co-authored-by: Will Taylor <wtaylor151@gmail.com>
Co-authored-by: James Borthwick <109382862+jamesrb1@users.noreply.github.com>
Adds `Purchases.shared.loadCustomerCenter()` that calls a new backend
endpoint that returns the customer center configuration

This API call doesn't exist yet and it will change. This PR is the
ground work so that we don't have to wait for the backend to add this
API and we can already pretend the API is there.

---------

Co-authored-by: RevenueCat Git Bot <72824662+RCGitBot@users.noreply.github.com>
Based off #3933 



https://github.com/RevenueCat/purchases-ios/assets/664544/11eae984-294a-4e14-8c40-7c2d50994c09

Can probably use some animations, but tuning that up will come up later

It will open a feedback survey for an option if there's one
### Description
This adds a modifier, `presentCustomerCenter` that can be used to more
simply display the customer center. The API looks like:
```
.presentCustomerCenter(isPresented: self.$presentingCustomerCenter) {
    self.presentingCustomerCenter = false
}
```
@vegaro vegaro force-pushed the integration/customer_support_workflow branch from a910b59 to 6cd489f Compare July 17, 2024 09:24
vegaro and others added 6 commits August 2, 2024 15:22
I noticed the purchase button for the promo offers is always disabled.
Changing the order of the modifiers fixes it
The subscription details view could take advantage of more available
space

- expands details view
- increases font sizes
- wraps in a scrollview for smaller screen sizes
- softens shadow
- have buttons fill available space, limit width via container views

| New           | Old           |
|:-------------:|:-------------:|
| ![New
Version](https://github.com/user-attachments/assets/27c4a7fd-60be-4536-b88c-b2c9c6141c8f)
| ![Old
Version](https://github.com/user-attachments/assets/9bd80877-4fa6-4c7e-a813-5e7a3c1bbcc2)
|
We have a long-running integration branch for Customer Center, long
running integration branches usually get very tricky to merge as time
passes on.

This PR attempts to solve it by creating a single custom compiler flag
that enables the Customer Center feature.

Here is what the compilation flag looks like: 
<img width="1107" alt="image"
src="https://github.com/user-attachments/assets/67df3bde-4c99-44b7-b33a-5847863a028c">


Then all we need to do to integrate into main is to delete that flag.
And re-add it for development. Easy peasy.

And when we want to ship Customer Center for real, we just delete all
usages of that flag.

If the flag isn't defined, then the code evaluates to false and is
simply skipped by the compiler. If it evaluates to true, then the code
runs.

---------

Co-authored-by: Toni Rico <antonio.rico.diez@revenuecat.com>
@tonidero tonidero added the danger-bypass-size-limit Apply this label to bypass Dangerbot's size limit. label Aug 8, 2024
codykerns and others added 4 commits August 8, 2024 12:01
Attempting some UI polish

- Implements `ContentUnavailableView` for the views that have 'empty'
content (with a visually similar backwards compatible version)
- Improves instructions for each platform for wrong-platform
subscription management

| New           | Old           |
|:-------------:|:-------------:|
| ![New
Version](https://github.com/user-attachments/assets/866266ae-4996-4480-b990-17bc143641fa)
| ![Old
Version](https://github.com/user-attachments/assets/936e7892-2d60-4b86-889b-7b1b543d729c)
|
### Description
This disables CustomerCenter components from the integration branch so
it can be merged into `main`. Then, we can revert this into a new
branch, which would be used to test CustomerCenter
@tonidero
Copy link
Contributor

tonidero commented Aug 9, 2024

@RCGitBot please test

@tonidero tonidero changed the title [Customer Center] Integration branch [Customer Center] Initial implementation Aug 9, 2024
@tonidero tonidero enabled auto-merge (squash) August 9, 2024 12:59
@tonidero tonidero disabled auto-merge August 9, 2024 13:01
@tonidero tonidero merged commit dd0ee26 into main Aug 9, 2024
5 checks passed
@tonidero tonidero deleted the integration/customer_support_workflow branch August 9, 2024 13:26
@tonidero tonidero added refactor and removed pr:feat A new feature labels Aug 19, 2024
joshdholtz added a commit that referenced this pull request Aug 22, 2024
**This is an automatic release.**

### New Features
* Price rounding logic (#4132) via James Borthwick (@jamesrb1)
### Bugfixes
* [Customer Center] Migrate to List style (#4190) via Cody Kerns
(@codykerns)
* [Paywalls] Improve locale consistency (#4158) via Josh Holtz
(@joshdholtz)
* Set Paywalls Tester deployment target to iOS 15 (#4196) via James
Borthwick (@jamesrb1)
* [Customer Center] Hide Contact Support button if URL can't be created
(#4192) via Cesar de la Vega (@vegaro)
* Fix the setting for SKIP_INSTALL in Xcode project (#4195) via Andy
Boedo (@aboedo)
* [Customer Center] Improving customer center buttons (#4165) via Cody
Kerns (@codykerns)
* Revert workaround for iOS 18 beta 5 SwiftUI crash (#4173) via Mark
Villacampa (@MarkVillacampa)
* [Paywalls] Make iOS version calculation lazy (#4163) via Mark
Villacampa (@MarkVillacampa)
* [Paywalls] Observe `PurchaseHandler` when owned externally (#4097) via
James Borthwick (@jamesrb1)
### Other Changes
* [Customer Center] Clean up colors in WrongPlatformView and
NoSubscriptionsView (#4204) via Cesar de la Vega (@vegaro)
* Fix failing `all-tests` and retry more flaky tests (#4188) via Josh
Holtz (@joshdholtz)
* Compatibility content unavailable improvements (#4197) via James
Borthwick (@jamesrb1)
* Create lane to enable customer center (#4191) via Cesar de la Vega
(@vegaro)
* XCFramework artifacts in CircleCI (#4189) via Andy Boedo (@aboedo)
* [Customer Center] CustomerCenterViewModel checks whether the app is
the latest version (#4169) via JayShortway (@JayShortway)
* export RevenueCatUI xcframework (#4172) via Andy Boedo (@aboedo)
* Corrects references from ManageSubscriptionsButtonStyle to
ButtonsStyle. (#4186) via JayShortway (@JayShortway)
* Speed up carthage installation tests (#4184) via Andy Boedo (@aboedo)
* Customer center improvements (#4166) via James Borthwick (@jamesrb1)
* replace `color(from colorInformation:)` global with extension (#4183)
via Andy Boedo (@aboedo)
* Fix tests in main (#4174) via Andy Boedo (@aboedo)
* Enable customer center tests (#4171) via James Borthwick (@jamesrb1)
* [Customer Center] Initial implementation (#3967) via Cesar de la Vega
(@vegaro)

---------

Co-authored-by: Josh Holtz <me@joshholtz.com>
nyeu pushed a commit that referenced this pull request Oct 2, 2024
Alpha of the Customer Center. In this branch, it's been disabled behind
a compilation flag.

---------

Co-authored-by: Will Taylor <wtaylor151@gmail.com>
Co-authored-by: James Borthwick <109382862+jamesrb1@users.noreply.github.com>
Co-authored-by: RevenueCat Git Bot <72824662+RCGitBot@users.noreply.github.com>
Co-authored-by: JayShortway <29483617+JayShortway@users.noreply.github.com>
Co-authored-by: Toni Rico <toni.rico.diez@revenuecat.com>
Co-authored-by: Toni Rico <antonio.rico.diez@revenuecat.com>
Co-authored-by: Cody Kerns <44073103+codykerns@users.noreply.github.com>
Co-authored-by: Andy Boedo <andresboedo@gmail.com>
nyeu pushed a commit that referenced this pull request Oct 2, 2024
**This is an automatic release.**

### New Features
* Price rounding logic (#4132) via James Borthwick (@jamesrb1)
### Bugfixes
* [Customer Center] Migrate to List style (#4190) via Cody Kerns
(@codykerns)
* [Paywalls] Improve locale consistency (#4158) via Josh Holtz
(@joshdholtz)
* Set Paywalls Tester deployment target to iOS 15 (#4196) via James
Borthwick (@jamesrb1)
* [Customer Center] Hide Contact Support button if URL can't be created
(#4192) via Cesar de la Vega (@vegaro)
* Fix the setting for SKIP_INSTALL in Xcode project (#4195) via Andy
Boedo (@aboedo)
* [Customer Center] Improving customer center buttons (#4165) via Cody
Kerns (@codykerns)
* Revert workaround for iOS 18 beta 5 SwiftUI crash (#4173) via Mark
Villacampa (@MarkVillacampa)
* [Paywalls] Make iOS version calculation lazy (#4163) via Mark
Villacampa (@MarkVillacampa)
* [Paywalls] Observe `PurchaseHandler` when owned externally (#4097) via
James Borthwick (@jamesrb1)
### Other Changes
* [Customer Center] Clean up colors in WrongPlatformView and
NoSubscriptionsView (#4204) via Cesar de la Vega (@vegaro)
* Fix failing `all-tests` and retry more flaky tests (#4188) via Josh
Holtz (@joshdholtz)
* Compatibility content unavailable improvements (#4197) via James
Borthwick (@jamesrb1)
* Create lane to enable customer center (#4191) via Cesar de la Vega
(@vegaro)
* XCFramework artifacts in CircleCI (#4189) via Andy Boedo (@aboedo)
* [Customer Center] CustomerCenterViewModel checks whether the app is
the latest version (#4169) via JayShortway (@JayShortway)
* export RevenueCatUI xcframework (#4172) via Andy Boedo (@aboedo)
* Corrects references from ManageSubscriptionsButtonStyle to
ButtonsStyle. (#4186) via JayShortway (@JayShortway)
* Speed up carthage installation tests (#4184) via Andy Boedo (@aboedo)
* Customer center improvements (#4166) via James Borthwick (@jamesrb1)
* replace `color(from colorInformation:)` global with extension (#4183)
via Andy Boedo (@aboedo)
* Fix tests in main (#4174) via Andy Boedo (@aboedo)
* Enable customer center tests (#4171) via James Borthwick (@jamesrb1)
* [Customer Center] Initial implementation (#3967) via Cesar de la Vega
(@vegaro)

---------

Co-authored-by: Josh Holtz <me@joshholtz.com>
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.

6 participants