Fix subscription settings UI branch for legacy Collect#88115
Fix subscription settings UI branch for legacy Collect#88115emkhalid wants to merge 3 commits intoExpensify:mainfrom
Conversation
|
@Eskalifer1 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8529118ef2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| } | ||
|
|
||
| function shouldUseSimplifiedCollectSubscriptionUI(plan: PersonalPolicyTypeExcludedProps | null, hasTeam2025Pricing: boolean): boolean { | ||
| return plan === CONST.POLICY.TYPE.TEAM && !hasTeam2025Pricing; |
There was a problem hiding this comment.
Invert Collect UI gate for Team 2025 workspaces
shouldUseSimplifiedCollectSubscriptionUI() currently returns true for TEAM && !hasTeam2025Pricing, which is the opposite of how hasTeam2025Pricing is used elsewhere (e.g., getSubscriptionPrice() switches to 2025 pricing when it is true). Because both web and native SubscriptionSettings branch on this helper, Team 2025 workspaces are routed to the legacy annual/pay-per-use configuration UI, while legacy Collect workspaces still get the simplified monthly UI; this reverses the intended behavior and can expose invalid settings to the wrong accounts.
Useful? React with 👍 / 👎.
|
I recorded the following supplemental validation videos using local mock data to simulate the relevant subscription states. The main issue scenario is:
The additional videos cover neighboring states and regression checks so it is clear that the correct UI branch is shown for each subscription/pricing combination.
Video: Old.Collect.-.Annual.subscription.shows.the.legacy.settings.UI.mov
Video: Old.Collect.-.Pay-per-use.shows.the.legacy.settings.UI.mov
Video: New.Collect.Team.2025.shows.the.simplified.monthly.UI.mov
Video: Corporate.-.Annual.keeps.the.legacy.annual.settings.UI.mov
Video: Corporate.-.Pay-per-use.keeps.the.legacy.settings.UI.mov
Video: Old.Collect.-.Annual.platform.verification.mov
Video: Old.Collect.-.Pay-per-use.platform.check.mov
Video: New.Collect.Team.2025.platform.check.mov
Video: Old.Collect.-.Annual.summary.matches.details.mov
Video: Old.Collect.-.Pay-per-use.summary.matches.details.mov |
Explanation of Change
This PR updates Subscription settings to choose the correct UI for Collect workspaces based on Team 2025 pricing instead of treating all Team workspaces the same.
Legacy Collect workspaces now use the legacy subscription settings UI, which restores annual-specific settings like Auto-renew and Auto-increase annual seats for old Collect annual subscriptions. New Collect / Team 2025 workspaces continue to use the simplified monthly Collect UI.
Fixed Issues
$ #87136
PROPOSAL: #87136 (comment)
Tests
Settings > Subscription.Subscription settings.Annualis selectedSubscription sizeis shownAuto-renewis shownAuto-increase annual seatsis shownPay-per-useselectedSubscription sizeAuto-renewAuto-increase annual seatsCollect workspaces are billed monthly per member, with no annual commitment.PricingOffline tests
Settings > Subscription > Subscription settings.QA Steps
Same as Tests
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)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-native-Old.Collect.-.Annual.shows.the.legacy.annual.settings.UI.mp4
Android: mWeb Chrome
Android-web-Old.Collect.-.Annual.shows.the.legacy.annual.settings.UI.mp4
iOS: Native
IOS-native-Old.Collect.-.Annual.shows.the.legacy.annual.settings.UI.mp4
iOS: mWeb Safari
IOS-web-Old.Collect.-.Annual.shows.the.legacy.annual.settings.UI.video-converter.com.mp4
MacOS: Chrome / Safari
MACOS-Old.Collect.-.Annual.shows.the.legacy.annual.settings.UI.mov