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.57k stars 2.91k forks source link

Chore/52820 workspace cards cleanup #52871

Open koko57 opened 1 day ago

koko57 commented 1 day ago

Explanation of Change

Fixed Issues

$ https://github.com/Expensify/App/issues/52820 PROPOSAL:

Tests

PREREQUISITES: ideally 4 workspaces with Company Cards enabled and a feed added Workspace A - 1 member, multiple cards to assign Workspace B - several members, 1 card to assign (if you don't have a workspace with only 1 card you can change this code from)

function hasOnlyOneCardToAssign(list: FilteredCardList) {
    return Object.keys(list).length === 1;
}

to

function hasOnlyOneCardToAssign(list: FilteredCardList) {
    return Object.keys(list).length !== 1;
}

Workspace C - 1 member, 1 card to assign Workspace D - several members, several cards to assign

Workspace A

  1. Go to Workspace A -> Company Cards -> Assign Card
  2. Verify that the Assignee step is skipped, you're on the Card selection step
  3. Go to members -> member details -> New Card
  4. Verify that the Assignee step is skipped, you're on the Card selection step (the behavior was the same before, it should not change)

Workspace B

  1. Go to Workspace B -> Company Cards -> Assign Card
  2. Verify that after choosing Assignee the Card selection step is skipped - you land on the Transaction Start step
  3. Go to members -> member details -> New Card
  4. Verify that the Assignee and Card Selection steps are skipped - you land on the Transaction Start step

Workspace C

  1. Go to Workspace C -> Company Cards -> Assign Card
  2. Verify that the Assignee and Card Selection steps are skipped - you land on the Transaction Start step
  3. Go to members -> member details -> New Card
  4. Verify that the Assignee and Card Selection steps are skipped - you land on the Transaction Start step

Workspace D

  1. Go to Workspace D -> Company Cards -> Assign Card
  2. Verify that you land on the Assignee step like before
  3. Go to members -> member details -> New Card
  4. Verify that only the Assignee is skipped - you land on the Card selection step

Offline tests

QA Steps

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

PR Author Checklist

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari https://github.com/user-attachments/assets/ce167fa9-e1c8-4d5b-9e58-386b5e84fdc0 https://github.com/user-attachments/assets/869f4f26-4ad6-40cc-abd1-56c9d5360063 https://github.com/user-attachments/assets/170d0213-d565-4ba2-a962-f00019fdd300
MacOS: Desktop
melvin-bot[bot] commented 1 day ago

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

DylanDylann commented 8 hours ago

@koko57 Step 2 on workspace C seems to be confusing to me

Verify that after choosing Assignee the Card selection step is skipped - you land on the Transaction Start step

I think it should be

Verify that the Assignee and Card Selection steps are skipped - you land on the Transaction Start step

koko57 commented 8 hours ago

@DylanDylann yes, you're right, fixing it

DylanDylann commented 8 hours ago

@koko57 We don't reset assignCard field on Onyx when starting a new creation flow again

https://github.com/user-attachments/assets/d41e141b-0cf9-4d2d-8b98-ccb41739c65e

My suggestion is that we reset assignCard field on Onyx when users click on Assign card on both Company page and member Detail page

DylanDylann commented 6 hours ago

Reviewer Checklist

Screenshots/Videos

Android: Native https://github.com/user-attachments/assets/4808222b-c992-43d0-9077-d0d36dda6373
Android: mWeb Chrome https://github.com/user-attachments/assets/e1c17363-884f-4751-b3be-495d59a88aee
iOS: Native https://github.com/user-attachments/assets/1a31cc2c-5461-4b94-94f8-1f2785a24d12
iOS: mWeb Safari https://github.com/user-attachments/assets/92072501-6179-4de3-82c7-512a237bbed6
MacOS: Chrome / Safari https://github.com/user-attachments/assets/f12a3829-db84-420e-9625-9480715c6386
MacOS: Desktop https://github.com/user-attachments/assets/071b81fe-f8b7-4f71-baec-3c7b4ccfc6b8