feat: Subscription settings UI#42990
Conversation
src/pages/settings/Subscription/SubscriptionSettingsSection.tsx
Outdated
Show resolved
Hide resolved
src/pages/settings/Subscription/SubscriptionSettingsSection.tsx
Outdated
Show resolved
Hide resolved
src/pages/settings/Subscription/SubscriptionSettingsSection.tsx
Outdated
Show resolved
Hide resolved
src/pages/settings/Subscription/SubscriptionSettingsSection.tsx
Outdated
Show resolved
Hide resolved
src/pages/settings/Subscription/SubscriptionSettingsSection.tsx
Outdated
Show resolved
Hide resolved
…sription-settings-ui
…sription-settings-ui
amyevans
left a comment
There was a problem hiding this comment.
Just a few minor comments!
@Expensify/design would you like to review as well?
src/languages/en.ts
Outdated
| subscriptionSettings: { | ||
| title: 'Subscription settings', | ||
| autoRenew: 'Auto-renew', | ||
| yourAnnual: 'Your annual subscription will automatically renew on (date). You can switch to pay-per-use starting 30 days before renewal.', |
There was a problem hiding this comment.
(date) should be a variable here, equal to nvp_private_subscription.endDate + 1 month
There was a problem hiding this comment.
Actually this translation key is not used anywhere 😅 It was present in the doc so I've added it but its not used anywhere so Im removing it
There was a problem hiding this comment.
I will however adjust the renewal date we display under auto-renew toggle
There was a problem hiding this comment.
Ah okay good catch, I think that initial text was from a previous iteration (I see it in the high level portion of the doc, but not Figma or the mocks in Detailed, so I think we're good to remove it).
src/languages/en.ts
Outdated
| autoRenew: 'Auto-renew', | ||
| yourAnnual: 'Your annual subscription will automatically renew on (date). You can switch to pay-per-use starting 30 days before renewal.', | ||
| autoIncrease: 'Auto-increase annual seats', | ||
| saveUpTo: 'Save up to $10/month per active member', |
There was a problem hiding this comment.
This needs to be slightly variable: it should be 10 for a Collect plan and 18 for a Control plan. I'm also asking in the doc if it should always be in USD or not
There was a problem hiding this comment.
Just gonna tag you here directly too @MitchExpensify 😄
There was a problem hiding this comment.
I think this should be localised to the billing currency, personally. It doesn't make sense if you're billed in GBP.
There was a problem hiding this comment.
At the moment all prices on main Subscription page have fixed $ currency. Do you want me to fix them all as part of this PR or do we leave the currency as it is for now and change it later in a separate issue?
There was a problem hiding this comment.
I think it's fine to be a follow-up, but let's make sure we do it.
There was a problem hiding this comment.
Ok, so should we create new issue for it? If so, who's job is it? :)
| return ( | ||
| <ScreenWrapper | ||
| testID={DisableAutoRenewSurveyPage.displayName} | ||
| includeSafeAreaPaddingBottom={false} |
There was a problem hiding this comment.
Could this in theory still be accessed on native via deep link? Should we implement return null for native?
It will be fixed with next rebase. Fix for it made it to main late afternoon :) |
|
@amyevans I've replied to/fixed whats been pointed out. Have a look when you can :) |
amyevans
left a comment
There was a problem hiding this comment.
1 small thing to go (my bad!), then we can merge!
|
|
||
| // TODO this will come from API in next phase | ||
| const expirationDate = format(new Date(), CONST.DATE.MONTH_DAY_YEAR_ABBR_FORMAT); | ||
| const autoRenewalDate = privateSubscription?.endDate ? format(addMonths(new Date(privateSubscription?.endDate), 1), CONST.DATE.MONTH_DAY_YEAR_ABBR_FORMAT) : ''; |
There was a problem hiding this comment.
Sorry, I gave you bad info regarding adding a month to the end date. The autoRenewalDate should just be equal to the endDate (keep the formatting you've applied here though)
There was a problem hiding this comment.
I think
const autoRenewalDate = privateSubscription?.endDate ? format(new Date(`${privateSubscription?.endDate}T00:00:00`), CONST.DATE.MONTH_DAY_YEAR_ABBR_FORMAT) : '';
would work, currently it's picking up my local timezone I think
There was a problem hiding this comment.
Ok, I've changed it. I will be finishing for today but on monday I might get back to this (in this or one of next PRs) and refactor it to something more elegant. I believe getNewSubscriptionRenewalDate might have the same TZ issue so I will look into it
There was a problem hiding this comment.
Okay, I'm going to merge this PR to keep things moving but definitely feel free to refactor in a follow up PR. Thank you!
src/pages/settings/Subscription/DisableAutoRenewSurveyPage/index.native.tsx
Show resolved
Hide resolved
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
Only UI was implemented in this PR. Submit action will come in the next phase - there is a comment that serves as a reminder as well. It might be the case that it's being already implemented in one of the PRs. |
|
🚀 Deployed to production by https://github.com/luacmartins in version: 1.4.81-11 🚀
|
| <FormAlertWithSubmitButton | ||
| isAlertVisible={shouldShowReasonError} | ||
| onSubmit={handleSubmit} | ||
| message="common.error.pleaseCompleteForm" |
There was a problem hiding this comment.
Error message here was left hardcoded, it needed translate function. #44075







Details
Fixed Issues
$ #38626
PROPOSAL:
Tests
/settings/subscriptionOffline tests
QA Steps
/settings/subscriptionPR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop