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 Ppro Purchasing and Setting items #5385

Conversation

mikescamell
Copy link
Contributor

@mikescamell mikescamell commented Dec 12, 2024

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

Description

Initial changes to start moving Ppro settings to new Settings world. This PR focuses specifically on the Purchasing state as well as the Subscription Setting item state, as these are part of the same plugin.

Designs

Steps to test this PR

Prerequisite: Enable newSettings feature toggle

Prerequisite: Apply the patch in the Asana task

Also remember VPN, PIR, and ITR are not changed in this PR

Not purchased

  • Set ln 99 of ProSettingViewModel to _viewState.emit(viewState.value.copy(status = EXPIRED, region = SubscriptionRegion.US))
  • Open Settings
  • Check against designs
  • Click items
  • Ensure correct screens are open
Before After
not_purchased_original Screenshot_20241212_192120

Purchased

  • Set ln 99 of ProSettingViewModel to _viewState.emit(viewState.value.copy(status = AUTO_RENEWABLE, region = SubscriptionRegion.US))
  • Open Settings
  • Check against designs
  • Click Subscription Settings
  • Ensure Subscription Settings is opened
Before After
purchased_original subscribed

Activating (Waiting)

  • Set ln 99 of ProSettingViewModel to _viewState.emit(viewState.value.copy(status = WAITING, region = SubscriptionRegion.US))
  • Open Settings
  • Check against designs
  • Click Subscription Settings
  • Ensure Subscription Settings is opened
Before After
original_waiting activating

Expired

  • Set ln 99 of ProSettingViewModel to _viewState.emit(viewState.value.copy(status = EXPIRED, region = SubscriptionRegion.US))
  • Open Settings
  • Check against designs
  • Click Subscription Settings
  • Ensure Subscription Settings is opened
Before After
original_expired expired

Copy link
Contributor Author

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

@mikescamell mikescamell marked this pull request as ready for review December 12, 2024 19:00
Removing public properties and defaulting to off if no status provided

I'm also allowing the setting of leading icon as I anticipate needing to change it in future for the VPN settings

we need this to update the icon for the VPN Statues
being consistent with other settings
we'll duplicate and reuse the existing view where appropriate
copy paste, nothing has changed
no need for an alert now
The designs have the trailing icon at 16dpx16dp and we currently only allow the trailing icon to be 24dpx24dp. We can utilise the setup for leadingIconSize and allow setting of the trailing icon size. We'll use this for the expired state in the next commit
We show only the settings item out of all our views here in the new expired state. VPN, PIR and ITR are handled in their own view
we can ditch the old dedicated waiting container, in the new world we show the settings item with "activating"
Ideally I would have not added another view, but I noticed when trying to use a TwoLineListItem with just a title this was not centered, and I was concerned that I may impact the rest of the app if I changed it so the title was centered vertically if the secondary text was gone
@mikescamell mikescamell force-pushed the feature/mike/update-settings/update-ppro-purchasing-and-settings-item branch from 32c2ea7 to d79cc8e Compare December 12, 2024 19:03
@malmstein malmstein self-assigned this Dec 12, 2024
Will need to be translated later
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.

Nice work, works as expected @mikescamell !

@mikescamell mikescamell merged commit cc21a12 into develop Dec 13, 2024
7 checks passed
@mikescamell mikescamell deleted the feature/mike/update-settings/update-ppro-purchasing-and-settings-item branch December 13, 2024 15:16
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