Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.98k stars 2.98k forks source link

Add view transactions cta to Expensify card and company cards page #55095

Closed parasharrajat closed 3 days ago

parasharrajat commented 2 weeks ago

Explanation of Change

Fixed Issues

$ https://github.com/Expensify/App/issues/54800 PROPOSAL: https://github.com/Expensify/App/issues/54800#issuecomment-2571530812

Tests

Prerequisite:

  1. Login in NewDot with an account which has a workspace.
  2. Enable Expensify Card and Company Card from the Settings > workspaces > [Your workspace] > Workflows.
  3. You have some assigned cards to your account from different workspaces and a assigned company card.

Expensify Card

  1. Go to Expensify card in workspace menu on LHN.
  2. Issue a new Expensify Card if not already.
  3. Click on the card to view details.
  4. Notice the View transactions button.
  5. Click to navigate to the search page with transactions filtered to that card.

Company Card

  1. Go to Company card in workspace menu on LHN.
  2. Add a new Company Card if not already.
  3. Click on the card to view details.
  4. Notice the View transactions button.
  5. Click to navigate to the search page with transactions filtered to that card.

Assigned Cards

  1. Go to Settings > Wallet page.
  2. Click on any assigned cards(Physical or virtual).
  3. Check that it has a View Transactions button.
  4. Click to navigate to the search page with transactions filtered to that card.
  5. Click on any Assigned Company card.
  6. Note that a popup opens with the view transactions button.
  7. Click to navigate to the search page with transactions filtered to that card.

Offline tests

QA Steps

Same as tests

PR Author Checklist

Screenshots/Videos

Android: Native https://github.com/user-attachments/assets/f07273dc-eb34-43e9-bab8-a87a42c3c8ab
Android: mWeb Chrome https://github.com/user-attachments/assets/fc68557e-a843-4547-9c7b-182c749ed6bc
iOS: Native https://github.com/user-attachments/assets/33fdd854-f785-472d-8e18-b98d255e90bd https://github.com/user-attachments/assets/cfb76545-8743-48a7-adf1-d3e83805eacb
iOS: mWeb Safari https://github.com/user-attachments/assets/142163fc-4c72-44b4-acaa-b09b3af9bfe6
MacOS: Chrome / Safari https://github.com/user-attachments/assets/3bf64b12-ff9b-4dc1-a51d-a8c0abbad3d2 https://github.com/user-attachments/assets/8e0791dc-359b-4410-9782-4a03baa91988
MacOS: Desktop https://github.com/user-attachments/assets/f039efdc-4fd0-4e5b-ab5b-e97064905c2c
melvin-bot[bot] commented 1 week ago

@allgandalf 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]

allgandalf commented 1 week ago

Also please fix failing tests

mountiny commented 1 week ago

Seems like there is still some feedback to address here

shawnborton commented 1 week ago

I think the design feedback has been taken care of, so we're good there. We can also run a test build when we are close to merge to make sure it's looking good.

parasharrajat commented 1 week ago

I have made all requested changes and retested.

github-actions[bot] commented 1 week ago

🚧 @mountiny has triggered a test build. You can view the workflow run here.

github-actions[bot] commented 1 week ago
:test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! :test_tube::test_tube: Android :robot: iOS :apple:
https://ad-hoc-expensify-cash.s3.amazonaws.com/android/55095/index.html ❌ FAILED ❌
Android The QR code can't be generated, because the iOS build failed
Desktop :computer: Web :spider_web:
❌ FAILED ❌ https://55095.pr-testing.expensify.com
The QR code can't be generated, because the Desktop build failed Web

:eyes: View the workflow run that generated this build :eyes:

allgandalf commented 1 week ago

almost done with testing, gonna mock some onyx data for card transactions and then approve this one

shawnborton commented 1 week ago

I wonder if this should also be added to Settings > Wallet > Card details? Wallet

That would make sense to me but I don't feel strongly.

parasharrajat commented 1 week ago

One thing worth mentioning is that the card filter does not work for the cards that are owned by someone else. Even though I can see the card in my list when I the admin of a workspace but the search page does not show card filters for it.

dannymcclain commented 1 week ago

I wonder if this should also be added to Settings > Wallet > Card details? That would make sense to me but I don't feel strongly.

I don't feel strongly either but agree it would make sense. Can't think of a reason not to add it here other than it's more work.

mountiny commented 1 week ago

I wonder if this should also be added to Settings > Wallet > Card details?

Yes I think we should

parasharrajat commented 1 week ago

I don't have access to such cards and not sure how can I get one. Can I get the URL of details page so that I can directly add the button to this page?

parasharrajat commented 1 week ago

@allgandalf Can you please help get a wallet card if you know the way?

shawnborton commented 1 week ago

@robertjchen are we able to give our contributors the demo card login details they can use via OldDot to import a card into their account? That might be helpful here?

parasharrajat commented 1 week ago

@shawnborton Can you meanwhile share the url address of the page?

shawnborton commented 1 week ago

Sure, it's basically this: https://new.expensify.com/settings/wallet/card/XXXXXX

mountiny commented 1 week ago

@parasharrajat let me know when this is ready to test

allgandalf commented 6 days ago

@parasharrajat any updates on this one?

parasharrajat commented 5 days ago

Working on the popup part for company cards.

parasharrajat commented 5 days ago

@allgandalf Looks like adding a popup to the Assigned Card is not straightforward. The current implementation of PaymentMethodList does not support the assigned Cards section via props. For example, the activePaymentMethodId prop is only used for bank accounts and the cards in the payment method section. Assigned Cards are not payment methods.

There are quite some refactor needed for this.

  1. Should I modify the existing defaultDeleteModal to contain view transactions menu as well and only show this for assigned cards. It might not be a good idea in terms of assign cards are different from Debit card and bank accounts methods which use this menu.
  2. Add a new popover for this menu but use the existing props such as activePaymentMethodId. using these props might be misleading as assign cards are not payment methods.

What do you suggest?

Overall, it looks like that the company Cards will take a bunch of refactor to show a view transactions menu. All Expensify Cards are done.

parasharrajat commented 5 days ago

Changes done. Its ready.

shawnborton commented 5 days ago

Nice, let us know when we have updated screenshots/videos to review as well. We need them from Workspace Editor as well as Wallet > Cards

parasharrajat commented 4 days ago

@allgandalf This is ready for testing.

parasharrajat commented 4 days ago

I will share screenshots shortly. @allgandalf Can you please start testing this in the meantime?

parasharrajat commented 4 days ago

Closed mistakenly...

github-actions[bot] commented 4 days ago

🚧 @mountiny has triggered a test build. You can view the workflow run here.

github-actions[bot] commented 4 days ago
:test_tube::test_tube: Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! :test_tube::test_tube: Android :robot: iOS :apple:
https://ad-hoc-expensify-cash.s3.amazonaws.com/android/55095/index.html ❌ FAILED ❌
Android The QR code can't be generated, because the iOS build failed
Desktop :computer: Web :spider_web:
https://ad-hoc-expensify-cash.s3.amazonaws.com/desktop/55095/NewExpensify.dmg https://55095.pr-testing.expensify.com
Desktop Web

:eyes: View the workflow run that generated this build :eyes:

parasharrajat commented 4 days ago

Vids for web and native for wallet page. Others are attached to OP. cc: @shawnborton

https://github.com/user-attachments/assets/cfb76545-8743-48a7-adf1-d3e83805eacb

https://github.com/user-attachments/assets/8e0791dc-359b-4410-9782-4a03baa91988

mountiny commented 4 days ago

Seems to test well for me!

https://github.com/user-attachments/assets/614de450-77af-4518-8001-f8e207c62eb9

mountiny commented 4 days ago

@allgandalf how is it looking?

shawnborton commented 4 days ago

Looks great!

allgandalf commented 4 days ago

Reviewer Checklist

Screenshots/Videos

Android: Native https://github.com/user-attachments/assets/e4e86b28-3308-4a78-be5f-3d6585f4568e
Android: mWeb Chrome https://github.com/user-attachments/assets/a799d69f-88ef-4a11-8c54-2f666940c055
iOS: Native https://github.com/user-attachments/assets/4782d806-21dc-424b-b5a7-fd1ae665af10
iOS: mWeb Safari https://github.com/user-attachments/assets/9e153971-db0a-4f8c-ae0e-1f3c28a9ab3c
MacOS: Chrome / Safari https://github.com/user-attachments/assets/f4cb7f5f-98c8-4011-b47b-cb8475923c3a
MacOS: Desktop https://github.com/user-attachments/assets/56832ebb-de46-4d28-8909-c58d00c6923d
mountiny commented 3 days ago

@parasharrajat can you please resolve the conflicts

parasharrajat commented 3 days ago

@mountiny Done,.

OSBotify commented 3 days ago

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

github-actions[bot] commented 2 days ago

πŸš€ Deployed to staging by https://github.com/mountiny in version: 9.0.89-0 πŸš€

platform result
πŸ€– android πŸ€– success βœ…
πŸ–₯ desktop πŸ–₯ success βœ…
🍎 iOS 🍎 success βœ…
πŸ•Έ web πŸ•Έ success βœ…
πŸ€–πŸ”„ android HybridApp πŸ€–πŸ”„ success βœ…
πŸŽπŸ”„ iOS HybridApp πŸŽπŸ”„ success βœ