-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Subscriber plans #21984
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
Subscriber plans #21984
Conversation
Generated by 🚫 Danger |
…-Android into feature/subscriber-plans Conflicts: WordPress/src/main/java/org/wordpress/android/ui/subscribers/SubscriberDetailScreen.kt WordPress/src/main/java/org/wordpress/android/ui/subscribers/SubscribersActivity.kt
|
App Name | ![]() |
|
Flavor | Jalapeno | |
Build Type | Debug | |
Version | pr21984-beb4213 | |
Commit | beb4213 | |
Direct Download | wordpress-prototype-build-pr21984-beb4213.apk |
|
App Name | ![]() |
|
Flavor | Jalapeno | |
Build Type | Debug | |
Version | pr21984-beb4213 | |
Commit | beb4213 | |
Direct Download | jetpack-prototype-build-pr21984-beb4213.apk |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #21984 +/- ##
=======================================
Coverage 39.02% 39.02%
=======================================
Files 2153 2153
Lines 101494 101494
Branches 15585 15585
=======================================
Hits 39613 39613
Misses 58384 58384
Partials 3497 3497 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Pull Request Overview
This PR enables viewing detailed subscriber plan information by extending the navigation flow and introducing a dedicated plan screen.
- Added navigation state and route for a new Plan screen in
SubscribersActivity
- Introduced
SubscriberPlanScreen
composable with associated UI cards and icons - Updated
SubscriberDetailScreen
to display plan items as clickable entries and added new string resources and icons
Comments suppressed due to low confidence (2)
WordPress/src/main/java/org/wordpress/android/ui/subscribers/SubscriberPlanScreen.kt:46
- This new
SubscriberPlanScreen
Composable introduces significant UI logic but lacks associated unit or UI tests; consider adding tests to cover rendering states (active, inactive, gift).
@Composable
WordPress/src/main/java/org/wordpress/android/ui/subscribers/SubscriberDetailScreen.kt:255
- Missing import for
clickable
: please addimport androidx.compose.foundation.clickable
to avoid unresolved reference errors.
modifier = Modifier.clickable {
} | ||
} | ||
|
||
private fun SubscriptionPlan.isActive() = status.lowercase() == "active" |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
titleState.value = subscriber.plans!![planIndex].title | ||
SubscriberPlanScreen( | ||
plan = subscriber.plans!![planIndex], | ||
modifier = Modifier.padding(contentPadding) | ||
) |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
val currency = Currency.getInstance(currencyCode) | ||
val formatter = NumberFormat.getCurrencyInstance(Locale.getDefault()) | ||
formatter.currency = currency | ||
formatter.format(amount) |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
|
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.
LGTM and works as expected!
This PR enables viewing a subscriber's plan details. To test:
plan.mp4