Draft
Conversation
Collaborator
Generated by 🚫 Danger |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for promotional offers (Trial and Winback) on installment subscription plans, specifically for the Plus Yearly Installment plan. Previously, installment plans only supported base plans without offers, but this change enables the system to apply trial periods and winback offers to installment payment plans.
Changes:
- Extended the subscription plan data model to support offers on installment plans by adding
isInstallmentparameter toSubscriptionPlan.WithOfferandfindOfferPlanmethod - Added comprehensive test coverage for installment offer functionality including trial and winback offers
- Updated analytics tracking across multiple features to include installment status
- Enhanced UI components to properly display installment plans with offers, including custom display names and correct price calculations
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| modules/services/payment/src/main/kotlin/au/com/shiftyjelly/pocketcasts/payment/Data.kt | Extended data model to support offers on installment plans by adding isInstallment parameter to SubscriptionPlan.WithOffer, findOfferPlan, and SubscriptionOffer.offerId methods |
| modules/services/payment/src/test/kotlin/au/com/shiftyjelly/pocketcasts/payment/SubscriptionPlansTest.kt | Added test data for installment plans with offers and comprehensive test cases validating offer ID generation, plan finding, and unsupported offer types |
| modules/features/profile/src/main/java/au/com/shiftyjelly/pocketcasts/profile/winback/WinbackViewModel.kt | Updated winback flow to support installment offers by checking both installment and non-installment variants and adding installment tracking to analytics |
| modules/features/profile/src/test/kotlin/au/com/shiftyjelly/pocketcasts/profile/winback/WinbackViewModelTest.kt | Updated test expectations to include isInstallment parameter in winback offer assertions and analytics verification |
| modules/features/profile/src/main/java/au/com/shiftyjelly/pocketcasts/profile/winback/WinbackOfferPage.kt | Updated Compose preview parameters to include isInstallment field for proper preview rendering |
| modules/features/account/src/main/java/au/com/shiftyjelly/pocketcasts/account/viewmodel/OnboardingUpgradeFeaturesViewModel.kt | Modified to support finding offer plans for installment subscriptions when feature flag is enabled and added installment tracking to analytics |
| modules/features/account/src/main/java/au/com/shiftyjelly/pocketcasts/account/onboarding/components/SubscriptionPlanRow.kt | Enhanced UI to handle installment offers including custom display names, correct price-per-period calculations, and savings percentage logic |
| modules/services/localization/src/main/res/values/strings.xml | Added new string resource for Plus yearly trial installments display name |
Collaborator
|
|
Collaborator
|
| App Name | ⌚ Wear | |
| Build Type | DebugProd | |
| Build Number | 9406 | |
| Version | 8.5-rc-2 | |
| Application ID | au.com.shiftyjelly.pocketcasts | |
| Commit | 3e120eb | |
| Direct Download | pocketcasts-wear-prototype-build-pr5000-3e120eb.apk | |
| Installation URL | 7jial4hllipr0 |
📲 You can test the changes from this Pull Request in 🚗 Automotive by scanning the QR code below to install the corresponding build.
| App Name | 🚗 Automotive | |
| Build Type | DebugProd | |
| Build Number | 9406 | |
| Version | 8.5-rc-2 | |
| Application ID | au.com.shiftyjelly.pocketcasts | |
| Commit | 3e120eb | |
| Direct Download | pocketcasts-automotive-prototype-build-pr5000-3e120eb.apk | |
| Installation URL | 7jial4hllipr0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Description
Fixes #
Testing Instructions
Screenshots or Screencast
Checklist
./gradlew spotlessApplyto automatically apply formatting/linting)modules/services/localization/src/main/res/values/strings.xmlI have tested any UI changes...