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.25k stars 2.69k forks source link

Split - Split preview shows 0 instead of "Your split $0.00" when split amount is 0.00 #41752

Open lanitochka17 opened 3 months ago

lanitochka17 commented 3 months ago

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 1.4.71-0 Reproducible in staging?: Y Reproducible in production?: N If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to group chat
  3. Go to + > Split expense
  4. Enter amount > Next
  5. Enter 0.00 amount on the first person (split creator)
  6. Split the expense
  7. Click on the split preview

Expected Result:

In Step 6, the expense preview will show "Your split $0.00" In Step 7, the split creator under "Split amount" will show $0.00, or the split creator will not show up under the list

Actual Result:

In Step 6, the expense preview shows "0" In step 7, the split creator shows up under "Split amount" list with no split amount (0.00) indicated

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/Expensify/App/assets/78819774/1280dc24-e9c5-4c2b-a450-ba3584568603

View all open jobs on GitHub

melvin-bot[bot] commented 3 months ago

Triggered auto assignment to @nkuoch (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

github-actions[bot] commented 3 months ago

:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.
Nodebrute commented 3 months ago

Proposal

Please re-state the problem that we are trying to solve in this issue.

Split preview shows 0 instead of "Your split $0.00" when split amount is 0.00

What is the root cause of that problem?

splitShare will be 0 so instead of rendering next component react will render 0. https://github.com/Expensify/App/blob/9cad71513fc52ab0cfd5ca5a5434770eb6eec7a7/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx#L316

What changes do you think we should make in order to solve the problem?

We should use a boolean value here. For example we can use isBillSplit or !!splitShare https://github.com/Expensify/App/blob/9cad71513fc52ab0cfd5ca5a5434770eb6eec7a7/src/components/ReportActionItem/MoneyRequestPreview/MoneyRequestPreviewContent.tsx#L316

The descriptiveText = ' ' that's why in split details we can't see amount. If we want to show $0 then we should also set descriptiveText

What alternative solutions did you explore? (Optional)

marcaaron commented 3 months ago

@youssef-lr Another one related to Splits. Off the top of my head it doesn't make a whole lot of sense to be able to "split $0" and have it say:

"You split $0.00"

So, curious if we got these steps right. Either way, new feature not a deploy blocker IMO.

youssef-lr commented 3 months ago

I don't think it makes sense for someone to be the payer of a split and set the amount 0 for themselves. So this seems like we should show an error in this case. I'll bring this up in Slack.

youssef-lr commented 3 months ago

Will start a discussion today.

melvin-bot[bot] commented 3 months ago

@youssef-lr Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

youssef-lr commented 3 months ago

Haven't got to this yet, will try tomorrow

melvin-bot[bot] commented 3 months ago

@youssef-lr Huh... This is 4 days overdue. Who can take care of this?

youssef-lr commented 3 months ago

I'm planning to tackle this in an ongoing PR for delegated splits as I think it's related. I think this might be a common scenario where someone pays for a bill even though they haven't ordered anything. So we should still allow them to input 0 for the amount.

melvin-bot[bot] commented 2 months ago

@youssef-lr Eep! 4 days overdue now. Issues have feelings too...

youssef-lr commented 2 months ago

No update yet

melvin-bot[bot] commented 2 months ago

@youssef-lr Eep! 4 days overdue now. Issues have feelings too...

melvin-bot[bot] commented 2 months ago

@youssef-lr 6 days overdue. This is scarier than being forced to listen to Vogon poetry!

youssef-lr commented 2 months ago

No update yet, we have paused working on vip-split.

melvin-bot[bot] commented 2 months ago

@youssef-lr Eep! 4 days overdue now. Issues have feelings too...

youssef-lr commented 2 months ago

No update yet

youssef-lr commented 1 month ago

No update, I can't prioritize this now given vip-split is paused. Putting it on monthly.

youssef-lr commented 1 week ago

Still paused.