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

Update Settings: Update ITR settings item #5398

Merged
merged 11 commits into from
Dec 19, 2024

Conversation

mikescamell
Copy link
Contributor

@mikescamell mikescamell commented Dec 17, 2024

Task/Issue URL: https://app.asana.com/0/1207908166761516/1208966262488273/f

Description

  • Refactored subscription status management by introducing a generic ProductSubscriptionManager to handle status checks for multiple products
  • Updated ITR settings UI to show different states (active, expired, activating) with appropriate icons and click behaviors
  • Added legacy support for ITR settings view to maintain backward compatibility

Steps to test this PR

Prerequisite: Enable newSettings feature toggle

Prerequisite: Apply the patch in the Asana task

Note: All PPro items should be seen in this PR, that is VPN, PIR, and ITR.

ITR Subscribed

  • In RealSubscriptions change ln 77 to return flowOf(listOf(NetP, PIR, ITR))
  • Open New Settings
  • Verify ITR item is visible with colored icon and status is on
  • Click ITR item
  • ITR screen should open though the webpage will not load properly as a result of the hacked setup for subscriptions. I have confirmed it works with a real subscription

Unsubscribed

  • In SubscriptionManager change ln 442 to return SubscriptionStatus.UNKNOWN
  • Open New Settings
  • Verify ITR item is not visible

ITR Expired

  • In SubscriptionManager change ln 442 to return SubscriptionStatus.EXPIRED
  • Open New Settings
  • Verify ITR item is visible with grey icon and is not clickable, and status is off
  • Click ITR item
  • Nothing should happen

PPro Activating

  • In SubscriptionManager change ln 442 to return SubscriptionStatus.WAITING
  • Open New Settings
  • Verify ITR item is visible with grey icon and status is off
  • Click ITR item
  • Nothing should happen

No Entitlement

  • In SubscriptionManager change ln 442 to return SubscriptionStatus.AUTO_RENEWABLE
  • In RealSubscriptions change ln 77 to return flowOf(listOf())
  • Open New Settings
  • Verify ITR item is not visible

Legacy Support

  • Turn off newSettings
  • Verify old ITR settings works by repeating steps above

UI changes

Before After
old_itr_subscribed new_itr_renewable
old_itr_expired new_itr_expired
old_itr_waiting new_itr_activating
old_itr_ineligible new_itr_ineligible
old_itr_unsubscribed new_itr_unsubscribed

Copy link
Contributor Author

mikescamell commented Dec 17, 2024

@mikescamell mikescamell force-pushed the feature/mike/update-settings/update-pir-item branch from 9b7fcfa to 1cf3f4e Compare December 17, 2024 09:17
@mikescamell mikescamell force-pushed the feature/mike/update-settings/update-itr-item branch from 822cf55 to 7743151 Compare December 17, 2024 09:17
@mikescamell mikescamell force-pushed the feature/mike/update-settings/update-pir-item branch from 1cf3f4e to ad94878 Compare December 17, 2024 09:24
@mikescamell mikescamell force-pushed the feature/mike/update-settings/update-itr-item branch from 7743151 to 46aff6f Compare December 17, 2024 09:25
@mikescamell mikescamell force-pushed the feature/mike/update-settings/update-pir-item branch from ad94878 to 955be80 Compare December 17, 2024 09:30
@mikescamell mikescamell force-pushed the feature/mike/update-settings/update-itr-item branch from 8fb5be4 to 116c982 Compare December 17, 2024 09:30
@malmstein malmstein self-assigned this Dec 17, 2024
@mikescamell mikescamell force-pushed the feature/mike/update-settings/update-pir-item branch from 955be80 to b9ccd81 Compare December 18, 2024 09:50
@mikescamell mikescamell force-pushed the feature/mike/update-settings/update-itr-item branch from 116c982 to 9e7f2b6 Compare December 18, 2024 09:51
@mikescamell mikescamell force-pushed the feature/mike/update-settings/update-pir-item branch from b9ccd81 to 2c2bed6 Compare December 18, 2024 17:31
@mikescamell mikescamell force-pushed the feature/mike/update-settings/update-itr-item branch from 9e7f2b6 to 2098004 Compare December 18, 2024 17:32
@mikescamell mikescamell force-pushed the feature/mike/update-settings/update-pir-item branch from 2c2bed6 to 28c7763 Compare December 18, 2024 18:52
@mikescamell mikescamell force-pushed the feature/mike/update-settings/update-itr-item branch 2 times, most recently from ebbd783 to ce47500 Compare December 18, 2024 19:42
@mikescamell mikescamell marked this pull request as ready for review December 18, 2024 19:43
Copy link
Contributor

@malmstein malmstein left a comment

Choose a reason for hiding this comment

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

:shipit:

Base automatically changed from feature/mike/update-settings/update-pir-item to develop December 19, 2024 16:23
The ITR setting is now displayed based on the current status of the product subscription.
It will be:
- Hidden if the user is ineligible or signed out
- Expired if the subscription is inactive or expired
- Activating if the subscription is waiting for activation
- Subscribed if the subscription is active

ProductSubscriptionManager now takes a vararg of Products as we have US and ROW ITR products
@mikescamell mikescamell force-pushed the feature/mike/update-settings/update-itr-item branch from ce47500 to 35da2fc Compare December 19, 2024 16:28
@mikescamell mikescamell enabled auto-merge (squash) December 19, 2024 16:30
@mikescamell mikescamell merged commit 8095023 into develop Dec 19, 2024
6 checks passed
@mikescamell mikescamell deleted the feature/mike/update-settings/update-itr-item branch December 19, 2024 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants