Add Expensify Card promoting banner to Company cards page#56561
Add Expensify Card promoting banner to Company cards page#56561luacmartins merged 11 commits intoExpensify:mainfrom
Conversation
|
♻ Here's something to sort out before we merge this: currently I am using Onyx to store a boolean value locally based on which I decide to show / hide the banner - this value is set to ⚠ Issue with this is:
I. Since this
II. With this local Onyx variable there's one more thing to consider: when the user will press Settings > Trubleshooting >
|
|
Nice! The videos look pretty good to me 👍 |
|
This looks great. Can I ask what the back stack is? If you click back after clicking |
|
Yeah I kinda think we should theme it cause it's VERY bright in dark mode there. I like that Danny! |
@dubielzyk-expensify Correct, that's how it works on all platforms - seems logical to me in terms of navigation flow. Screen.Recording.2025-02-07.at.15.20.45.mov
I'm sure it can be done by replacing the |
|
Super down with that! |
|
@Expensify/design Does this look good ? I noticed that the title / subtitle text color in the issue's OP (this design) is a dark green, whereas with what you can see below: I used already existing styles that we use in the
|
|
I agree with that! |
|
W.r.t @ikevin127’s comment here, the OP does not specify whether we remove the banner after a user clicks on “Learn more” once. We keep the banner on the Company Cards page even after the user clicks on “Learn more,” right? |
src/libs/PolicyUtils.ts
Outdated
| } | ||
|
|
||
| function navigateToExpensifyCardPage(policyID: string) { | ||
| setTimeout(() => { |
There was a problem hiding this comment.
| setTimeout(() => { |
I think we need not use setTimeout here. It looks like we are using setTimeout for navigating the user back to workspace initial page with goBackWhenEnableFeature only for narrow layouts after enabling a feature. setTimeout does not seem to serve any purpose here.
src/libs/actions/Policy/Policy.ts
Outdated
|
|
||
| if (enabled && shouldNavigateToExpensifyCardPage) { | ||
| navigateToExpensifyCardPage(policyID); | ||
| setHasSeenExpensifyCardPromotionBanner(); |
There was a problem hiding this comment.
| setHasSeenExpensifyCardPromotionBanner(); |
We are already calling setHasSeenExpensifyCardPromotionBanner in navigateToExpensifyCardPage.
src/libs/actions/Policy/Policy.ts
Outdated
| } | ||
|
|
||
| function enableExpensifyCard(policyID: string, enabled: boolean) { | ||
| /** |
There was a problem hiding this comment.
We can omit these JSDoc comments that are redundant with TypeScript.
| CompanyCards.clearAddNewCardFlow(); | ||
| Navigation.navigate(ROUTES.WORKSPACE_COMPANY_CARDS_ADD_NEW.getRoute(policy?.id ?? '-1')); | ||
| clearAddNewCardFlow(); | ||
| Navigation.navigate(ROUTES.WORKSPACE_COMPANY_CARDS_ADD_NEW.getRoute(policy?.id ?? String(CONST.DEFAULT_NUMBER_ID))); |
|
@Expensify/design Addressed the latest text style change request, here's how it looks now:
@c3024 Addressed all code related change requests (👍), all that's left to decide regarding the logic is what I asked in #56561 (comment) and you reiterated in #56561 (comment). |
Right, I dont think we need this logic, we should show the banner all the time until they add a card feed - then the ui changes and we would not promote for the card with this pattern (we could add something more later but that is not in scope of this project) |
…7-expensifyCardPromotion
✅ Done, makes total sense - thanks for jumping in over the weekend 🚀
@c3024 PR is 💯% ready for review! |
That looks løvely! Thank you! |
Reviewer Checklist
Screenshots/VideosAndroid: NativebannerAndroid.movAndroid: mWeb ChromebannerAndroidmWeb.mp4iOS: NativebanneriOS1.movbanneriOS2.moviOS: mWeb SafaribanneriOSmWeb.MP4MacOS: Chrome / SafaribannerChrome.movMacOS: DesktopbannerDesktop.mov |
Please update the tests. |
|
✅ PR tests section updated - ready to be merged. @mountiny Ready for your review! |
…7-expensifyCardPromotion
…7-expensifyCardPromotion
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.0.99-0 🚀
|
|
🚀 Deployed to production by https://github.com/francoisl in version: 9.0.99-2 🚀
|





Explanation of Change
We want to make sure we promote the Expensify Card to customers who have the company cards or seeking this setup, this PR implements a promotional banner to the Company cards page such that:
Learn morebutton we should take them to Expensify Card pageFixed Issues
$ #56485
PROPOSAL: #56485 (comment)
Tests
Precondition: Login and create a new workspace.
Test A (Expensify Card - Disabled)
Company cards.Company cardsand notice the newExpensify Cardpromoting banner.Learn morebutton.Expensify Cardfeature and navigate the user to it.Test B (Expensify Card - Enabled)
Company cardsandExpensify Cardfeatures.Company cardsand notice the newExpensify Cardpromoting banner.Learn morebutton.Expensify Cardfeature page.Offline tests
Same as Tests.
QA Steps
Same as Tests.
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))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.webm
Android: mWeb Chrome
android-mweb.webm
iOS: Native
ios.mp4
iOS: mWeb Safari
ios-mweb.mp4
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov