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

Bank Icons add for payment methods #4653

Conversation

Santhosh-Sellavel
Copy link
Collaborator

@Santhosh-Sellavel Santhosh-Sellavel commented Aug 13, 2021

Details

Added bank icons for cards & bank account payment options

Fixed Issues

$ #4398

Tests & QA Steps

  1. Go to Settings -> Payments
  2. Your Card & Bank payment methods should be their respective bank icons. Or should show our default bank or card icons.

Note: Refer to screenshot & ensure default icons & Expensify are in small size & bank logos slightly bigger as shown.

Tested On

  • Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

Screenshot 2021-09-03 at 10 07 41 PM

Mobile Web

Simulator Screen Shot - iPhone 11 - 2021-09-03 at 22 11 55

Desktop

Screenshot 2021-09-03 at 10 08 22 PM

iOS

Simulator Screen Shot - iPhone 12 - 2021-09-03 at 22 08 48

Android

Screenshot_1630687226

@Santhosh-Sellavel
Copy link
Collaborator Author

@stitesExpensify I see lint error will fix those asap, please ignore it for time being, thanks!

Copy link
Contributor

@stitesExpensify stitesExpensify left a comment

Choose a reason for hiding this comment

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

Looking good! What is the problem you mentioned with Fidelity and Citizens bank here? Can you give me an example?

assets/images/bankicons/discover.svg Outdated Show resolved Hide resolved
src/components/Icon/BankIcons.js Show resolved Hide resolved
@Santhosh-Sellavel
Copy link
Collaborator Author

Looking good! What is the problem you mentioned with Fidelity and Citizens bank [here]
(#4398 (comment))? Can you give me an example?

@stitesExpensify
For Fidelity, what banks to take from here. Look at the namings I don't know whether they are the same or different organizations
Screenshot 2021-08-18 at 1 16 20 AM

For Citizens bank,
Screenshot 2021-08-18 at 1 14 28 AM

Minified Mapping results for fidelity & Citizen's Bank have a look at it.

{"fidelity":[{"bankName":"FIDELITY BANK","assetName":"fidelity"},{"bankName":"The Fidelity Bank (NC) - Personal","assetName":"fidelity"},{"bankName":"Fidelity","assetName":"fidelity"},{"bankName":"FIDELITY CO-OP BANK","assetName":"fidelity"},{"bankName":"FIDELITY DEP DISCOUNT BK","assetName":"fidelity"},{"bankName":"THE FIDELITY BANK","assetName":"fidelity"},{"bankName":"FIDELITY BANK AND TRUST","assetName":"fidelity"},{"bankName":"FIDELITY NATIONAL BANK","assetName":"fidelity"},{"bankName":"FIRST FIDELITY BANK  N.A.","assetName":"fidelity"},{"bankName":"FIDELITY BANK OF TEXAS","assetName":"fidelity"},{"bankName":"First Fidelity Bank (OK & AZ)","assetName":"fidelity"},{"bankName":"FIDELITY FED SAVINGS & LOA","assetName":"fidelity"},{"bankName":"Fidelity Bank (LA)","assetName":"fidelity"},{"bankName":"Fidelity Bank (Georgia) - Business","assetName":"fidelity"},{"bankName":"Fidelity Bank (Georgia)","assetName":"fidelity"},{"bankName":"Fidelity Bank","assetName":"fidelity"},{"bankName":"First Fidelity Bank","assetName":"fidelity"},{"bankName":"Fidelity Charitable Gift Fund","assetName":"fidelity"},{"bankName":"Fidelity Bank (IA)","assetName":"fidelity"},{"bankName":"United Fidelity Bank - Personal","assetName":"fidelity"},{"bankName":"FIRST FIDELITY BANK","assetName":"fidelity"},{"bankName":"Fidelity Bank & Oklahoma Fidelity Bank - Personal Online Banking","assetName":"fidelity"},{"bankName":"Fidelity Bank (PA) - Personal","assetName":"fidelity"}],"citizens-bank":[{"bankName":"citizensbankbusiness","assetName":"citizens-bank"},{"bankName":"Citizens Bank","assetName":"citizens-bank"},{"bankName":"CITIZENS BANK NA","assetName":"citizens-bank"},{"bankName":"CITIZENS BANK","assetName":"citizens-bank"},{"bankName":"CITIZENS BANK  NATIONAL ASSOCIATION","assetName":"citizens-bank"},{"bankName":"CITIZENS BANK OF LAFAYETTE","assetName":"citizens-bank"},{"bankName":"CITIZENS BANK OF MUKWONAGO","assetName":"citizens-bank"},{"bankName":"CITIZENS BANK & TRUST CO","assetName":"citizens-bank"},{"bankName":"CITIZENS BANK OF PHILADELPHIA","assetName":"citizens-bank"},{"bankName":"CITIZENS BANK OF EDMOND","assetName":"citizens-bank"},{"bankName":"CITIZENS BANK & TRUST OF CHILLICOTHE","assetName":"citizens-bank"},{"bankName":"CITIZENS BANK MINNESOTA","assetName":"citizens-bank"},{"bankName":"CITIZENS BANK & TRUST CO.","assetName":"citizens-bank"},{"bankName":"Citizens Bank & Trust (MO)","assetName":"citizens-bank"},{"bankName":"CITIZENS BANK AND TRUST CO","assetName":"citizens-bank"},{"bankName":"CITIZENS BANK OF CHATSWORTH","assetName":"citizens-bank"},{"bankName":"CITIZENS BANK AND TRUST","assetName":"citizens-bank"},{"bankName":"CITIZENS BANK OF ADA","assetName":"citizens-bank"},{"bankName":"CITIZENS BANK AND TRUST COMPANY","assetName":"citizens-bank"},{"bankName":"Citizens Bank Minnesota","assetName":"citizens-bank"},{"bankName":"CITIZENS BANK & TRUST BIG TIMBER","assetName":"citizens-bank"},{"bankName":"Citizens Bank & Trust Company","assetName":"citizens-bank"},{"bankName":"CITIZENS BANK OF FARMINGTON","assetName":"citizens-bank"},{"bankName":"Citizens Bank (Swainsboro, Laurens County)","assetName":"citizens-bank"},{"bankName":"CITIZENS BANK OF KANSAS  N.A.","assetName":"citizens-bank"},{"bankName":"Citizens Bank of Lafayette","assetName":"citizens-bank"},{"bankName":"Citizens Bank & Trust","assetName":"citizens-bank"},{"bankName":"Citizens Bank of Mukwonago","assetName":"citizens-bank"},{"bankName":"Citizens Bank & Trust Company (Big Timber, Montana)","assetName":"citizens-bank"},{"bankName":"Citizens Bank & Trust Company (VA)","assetName":"citizens-bank"},{"bankName":"Citizens Bank & Trust (Alabama)","assetName":"citizens-bank"},{"bankName":"Citizens Bank of Edmond","assetName":"citizens-bank"},{"bankName":"Citizens Bank of Kansas","assetName":"citizens-bank"},{"bankName":"CITIZENS BANK OF KENTUCKY, INC","assetName":"citizens-bank"},{"bankName":"CITIZENS BANK, NATIONAL ASSOCIATION","assetName":"citizens-bank"},{"bankName":"Citizens Bank of Georgia","assetName":"citizens-bank"},{"bankName":"CITIZENS BANK OF KANSAS","assetName":"citizens-bank"},{"bankName":"Citizens Bank & Trust (Florida)","assetName":"citizens-bank"},{"bankName":"Citizens Bank & Trust Co. (Vivian, Louisiana)","assetName":"citizens-bank"},{"bankName":"CITIZENS BANK OF LAS CRUCES","assetName":"citizens-bank"},{"bankName":"CITIZENS BANK & TRUST COMPANY","assetName":"citizens-bank"}]}

@Santhosh-Sellavel
Copy link
Collaborator Author

  1. Citizens Bank & Trust & Citizens Bank of * Is it the same bank or different?
  2. Fidelity is a too generic name, there are different bank name variations. I don't whether they are the same bank or different.
    See the names here give me some input what to do with this @stitesExpensify

@stitesExpensify
Copy link
Contributor

Citizens Bank & Trust & Citizens Bank of * Is it the same bank or different?

Same bank

Fidelity is a too generic name, there are different bank name variations. I don't whether they are the same bank or different.

I think it's all the same.

Let's just assume that anything with "citizens bank" in it is citizens, and anything with "Fidelity" in it is fidelity. I don't think the false positives really matter if the bank is so obscure that it has one of those things in it

@Santhosh-Sellavel
Copy link
Collaborator Author

@stitesExpensify I don't have a real account with bank account linked.
So I need your help me with test with real time data.

I used some dummy data for to have a peek. Here is my some screenshots, is it okay do you think we need some additional styling? let me know.

Android

Screenshot_1629569993

web

Screenshot 2021-08-21 at 11 49 47 PM

Thanks!

@Santhosh-Sellavel Santhosh-Sellavel changed the title [WIP] Bank Icons add for payment methods initial commit [WIP] Bank Icons add for payment methods Aug 23, 2021
@Santhosh-Sellavel
Copy link
Collaborator Author

@stitesExpensify Just a reminder, I had done the requested changes. Let me know If there are any issues thanks!

@Santhosh-Sellavel
Copy link
Collaborator Author

@stitesExpensify Any update on this?

@stitesExpensify
Copy link
Contributor

My apologies, still no update. I am completely swamped with internal priorities. I will get to it as soon as I can

@Santhosh-Sellavel
Copy link
Collaborator Author

Santhosh-Sellavel commented Aug 27, 2021

Thanks for notifying me!

/**
* Returns matching asset icon for bankName
* @param {String} bankName
* @returns
Copy link
Contributor

Choose a reason for hiding this comment

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

Need a return type

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@stitesExpensify What's the return type here can you help me here.

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe it should just be Object

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated as Object


export default function getBankIcon(bankName) {
if (!bankName) {
return DefaultBank;
Copy link
Contributor

Choose a reason for hiding this comment

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

So can we not get the default credit card icon anymore? We still want that for cards that don't match anything

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We can do it since we are trying to get Icon for Bank Name by default it should be a Bank Logo.
I'll make the changes if needed, let me know about the default card icon size whether new size or the old size. Also confirm for default bank size also.

Copy link
Contributor

Choose a reason for hiding this comment

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

Default bank size looks good to me, I think card can be the same.

We definitely want a card icon when there are no matches.

I think adding a param to getBankIcon for isCard and returning the default card icon would be a good solution for this

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Updated

@stitesExpensify
Copy link
Contributor

#4653 (comment)

I don't think we need more styling, it looks good to me. What about you @shawnborton

@shawnborton
Copy link
Contributor

Yup, I think it's good to go.

@stitesExpensify
Copy link
Contributor

One more request please, can you add one more condition to bankIcons.js for the expensify card specifically?

if(bankName === 'Expensify Card') {
    return expensifyCard
}

expensifyCard is in assetes/images/expensifycard.svg

Sorry that was not in the original request. Thanks!

@Santhosh-Sellavel
Copy link
Collaborator Author

@stitesExpensify

I think we are good with this, then.
Screenshot 2021-09-02 at 11 18 51 AM

@Santhosh-Sellavel Santhosh-Sellavel force-pushed the Add_Bank_Icons_To_Payment_Method branch from dda2f18 to 00f7e9c Compare September 2, 2021 07:01
@shawnborton
Copy link
Contributor

shawnborton commented Sep 2, 2021 via email

@Santhosh-Sellavel
Copy link
Collaborator Author

Santhosh-Sellavel commented Sep 2, 2021

@shawnborton
Following the same size as the bankicon, as shown below.

130331487-058b2c63-9550-4e04-84ab-08fd0cbe6700.png

@shawnborton
Copy link
Contributor

shawnborton commented Sep 2, 2021 via email

@Santhosh-Sellavel
Copy link
Collaborator Author

Santhosh-Sellavel commented Sep 2, 2021

@shawnborton
How about this?

Screenshot 2021-09-02 at 2 57 57 PM

@shawnborton
Copy link
Contributor

shawnborton commented Sep 2, 2021 via email

@Santhosh-Sellavel
Copy link
Collaborator Author

@shawnborton
Can you confirm on the Expensify card too?
Screenshot 2021-09-02 at 3 03 13 PM

Thanks!

@shawnborton
Copy link
Contributor

shawnborton commented Sep 2, 2021 via email

@Santhosh-Sellavel
Copy link
Collaborator Author

expensifyCard is in assetes/images/expensifycard.svg

@shawnborton This was the image mentioned by @stitesExpensify

We can discussion in Slack?

Sure please initiate @shawnborton

@shawnborton
Copy link
Contributor

shawnborton commented Sep 2, 2021 via email

Copy link
Contributor

@stitesExpensify stitesExpensify left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for all of your work on this. One small change then you can take it off WIP and fill out the screenshots/tests.

Once that's done I'll approve and merge!

src/components/Icon/BankIcons.js Outdated Show resolved Hide resolved
@Santhosh-Sellavel Santhosh-Sellavel marked this pull request as ready for review September 3, 2021 17:33
@Santhosh-Sellavel Santhosh-Sellavel requested a review from a team as a code owner September 3, 2021 17:33
@MelvinBot MelvinBot requested review from nickmurray47 and removed request for a team September 3, 2021 17:33
@stitesExpensify stitesExpensify mentioned this pull request Sep 3, 2021
5 tasks
@Santhosh-Sellavel
Copy link
Collaborator Author

@stitesExpensify Ready for the review!

@stitesExpensify stitesExpensify changed the title [WIP] Bank Icons add for payment methods Bank Icons add for payment methods Sep 3, 2021
Copy link
Contributor

@stitesExpensify stitesExpensify left a comment

Choose a reason for hiding this comment

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

Looks great!

@stitesExpensify stitesExpensify merged commit 7f66480 into Expensify:main Sep 3, 2021
@OSBotify
Copy link
Contributor

OSBotify commented Sep 3, 2021

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

OSBotify commented Sep 4, 2021

🚀 Deployed to staging by @stitesExpensify in version: 1.0.93-2 🚀

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

@botify
Copy link

botify commented Sep 8, 2021

This has been deployed to production and is now subject to a 7-day regression period.
If no regressions arise, payment will be issued on 2021-09-15. 🎊

@OSBotify
Copy link
Contributor

OSBotify commented Sep 8, 2021

🚀 Deployed to production by @yuwenmemon in version: 1.0.94-1 🚀

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

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.

5 participants