Skip to content

[Collect Pricing Update] Update Collect subscription pricing and the subscription page composition - #59077

Merged
amyevans merged 44 commits into
Expensify:mainfrom
callstack-internal:VickyStash/feature/59007-subscription-settings-rhp
Apr 14, 2025
Merged

amyevans merged 44 commits into
Expensify:mainfrom
callstack-internal:VickyStash/feature/59007-subscription-settings-rhp

Conversation

@VickyStash

@VickyStash VickyStash commented Mar 25, 2025 •

Copy link
Copy Markdown
Contributor

Explanation of Change

[Collect Pricing Update] Implement new pricing on Settings > Subscription page

Fixed Issues

$ #59007
$ #59005
$ #59006
PROPOSAL: N/A

Tests

  • Verify that no errors appear in the JS console

You will need to test 4 user scenarios:

  • User 1 - new collect subscription (create a new account and create a workspace there)
  • User 2 - new control subscription (can be obtained by upgrading User 1 to control subscription)
  • User 3 - old collect subscription
  • User 4 - old control subscription

Repeat the following test steps for every user case:

  1. Open the app and log in.
  2. Go to the Settings -> Subscription page.
  3. See there are no Subscription Details or Subscription Settings sections.
  4. Check that Your Plan section looks as expected (check the mockups) depending on your subscription plan and first subscription time.
  5. If you use a new subscription, check that Add members button works as expected on web platforms and navigates you to your active workspace members page.
  6. If you use an old subscription, open the Setting page by clicking the related menu item in the Your Plan section. Verify that changing any setting works the same way as before and that the setting screen follows the mockup.
  7. Tap on the Explore all plans button. Check that the subscription comparison modal follows the mockups.
  8. Try to Upgrade to Control / Downgrade to Collect, make sure it works as expected.

Offline tests

N/A

QA Steps

// TODO: These must be filled out, or the issue title must include "[No QA]."

  • Verify that no errors appear in the JS console

Same, as in the Tests section

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
    • MacOS: Desktop
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
      • If any non-english text was added/modified, I used JaimeGPT to get English > Spanish translation. I then posted it in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:
    • I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
    • I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
  • I verified any variables that can be defined as constants (ie. in CONST.ts or at the top of the file that uses the constant) are defined as such
  • I verified that if a function's arguments changed that all usages have also been updated correctly
  • If any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
android-old.mp4
android-new.mp4
Android: mWeb Chrome
android-web-new.mp4
android_web-old.mp4
iOS: Native
ios-new.mp4
ios-old.mp4
iOS: mWeb Safari
ios-web-new.mp4
ios-web-old.mp4
MacOS: Chrome / Safari
web-new.mp4
web-old.mp4
MacOS: Desktop
desktop-new.mp4
desktop-old.mp4

@VickyStash VickyStash changed the title [WIP] [Collect Pricing Update] Move subscription settings to RHP [ON HOLD] [Collect Pricing Update] Update Collect subscription pricing and the subscription page composition Apr 2, 2025
@VickyStash

Copy link
Copy Markdown
Contributor Author

On HOLD till BE updates are ready!

flodnv
flodnv previously requested changes Apr 2, 2025
Comment thread src/CONST.ts Outdated
Comment thread src/libs/SubscriptionUtils.ts Outdated
Comment thread src/hooks/useIsNewSubscription.tsx Outdated
Comment thread src/CONST.ts Outdated
Comment thread src/hooks/useIsNewSubscription.tsx Outdated
Comment thread src/libs/SubscriptionUtils.ts Outdated
Comment thread src/CONST.ts Outdated
…tion-settings-rhp

# Conflicts:
#	src/pages/settings/Subscription/SubscriptionDetails/index.tsx
@jayeshmangwani

Copy link
Copy Markdown
Contributor

@amyevans If you're just looking to test the compare plan's navigation bar issue, this build #59077 (comment) should work too.

@VickyStash

Copy link
Copy Markdown
Contributor Author

@amyevans If you're just looking to test the compare plan's navigation bar issue, this build #59077 (comment) should work too.

Are you sure? Cause I've added a fix today morning 😅

@jayeshmangwani

Copy link
Copy Markdown
Contributor

Are you sure? Cause I've added a fix today morning 😅

Sorry, Please ignore my previous comment #59077 (comment) — I was able to reproduce the issue on the debug build. So, let's wait for the latest ad-hoc build to be created.

@amyevans

Copy link
Copy Markdown
Contributor

Sounds good!

@jayeshmangwani

Copy link
Copy Markdown
Contributor

By the way, I was also able to reproduce this issue on the Pixel 9 Pro emulator. Need to set to 3-button navigation mode to reproduce. If you want to verify it on the emulator, please make sure it’s in 3-button mode.

Screenshot 2025-04-14 at 11 44 59 PM

amyevans
amyevans previously approved these changes Apr 14, 2025

@amyevans amyevans left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Took another pass at the code and it's looking good to me!

@github-actions

Copy link
Copy Markdown
Contributor

🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪

Android 🤖 iOS 🍎
Android 🤖🔄 iOS 🍎🔄
❌ FAILED ❌ ❌ FAILED ❌
The QR code can't be generated, because the Android build failed The QR code can't be generated, because the iOS build failed
Desktop 💻 Web 🕸️
https://ad-hoc-expensify-cash.s3.amazonaws.com/desktop/59077/NewExpensify.dmg https://59077.pr-testing.expensify.com
Desktop Web

👀 View the workflow run that generated this build 👀

@amyevans

Copy link
Copy Markdown
Contributor

Hmm I see in the workflow run that Android built just fine - it's available here: https://ad-hoc-expensify-cash.s3.amazonaws.com/android/59077-hybrid/index.html

I've tested on Android and can repro the overlapping navigation bar as mentioned here.

@VickyStash

Copy link
Copy Markdown
Contributor Author

Let me try one more time on my end quickly!

@VickyStash

Copy link
Copy Markdown
Contributor Author

Need to set to 3-button navigation mode to reproduce.

Yep, it helped!
@jayeshmangwani I've applied a fix, could you check please?

@jayeshmangwani

Copy link
Copy Markdown
Contributor

Thanks, I'm testing it.

@jayeshmangwani

Copy link
Copy Markdown
Contributor

@VickyStash Looks good now — all fixed!

@jayeshmangwani jayeshmangwani left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 🚀

@melvin-bot
melvin-bot Bot requested a review from amyevans April 14, 2025 20:07
@jayeshmangwani

Copy link
Copy Markdown
Contributor

@amyevans, everything looks good here now.

@amyevans

Copy link
Copy Markdown
Contributor

Amazing, thank you both!

@amyevans
amyevans merged commit fe09a3a into Expensify:main Apr 14, 2025
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/amyevans in version: 9.1.28-0 🚀

platform result
🖥 desktop 🖥 success ✅
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/marcaaron in version: 9.1.28-15 🚀

platform result
🖥 desktop 🖥 success ✅
🕸 web 🕸 success ✅
🤖 android 🤖 failure ❌
🍎 iOS 🍎 success ✅

Comment on lines +116 to +119
if (hasTeam2025Pricing && subscriptionPlan === CONST.POLICY.TYPE.TEAM) {
return null;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Adding these conditions caused #60356

);

return (
<Modal

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not setting a maxHeight for the Modal caused #64948 where the user was not able to scroll the view on certain screen sizes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants