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

Distance - Amount field is no longer grayed out after changing rate and then distance offline #48111

Closed
6 tasks done
lanitochka17 opened this issue Aug 27, 2024 · 9 comments
Closed
6 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Aug 27, 2024

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Version Number: 9.0.25-2
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: [email protected]
Issue reported by: Applause - Internal Team

Action Performed:

Precondition:

  • Track tax is enabled
  • Workspace has at least two distance rates
  1. Go to staging.new.expensify.com
  2. Go to workspace chat
  3. Submit a distance expense
  4. Go to transaction thread
  5. Go offline
  6. Click Rate
  7. Select a different rate
  8. Note that Amount field is grayed out
  9. Click Distance
  10. Change the distance and save it
  11. Note that Amount field is no longer grayed out

Expected Result:

Amount field should be grayed out after changing Distance offline

Actual Result:

In Step 8, Amount field is grayed out after changing distance rate offline
In Step 11, Amount field is no longer grayed out after changing distance offline

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6584082_1724759565775.20240827_194513.mp4

View all open jobs on GitHub

@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 27, 2024
Copy link

melvin-bot bot commented Aug 27, 2024

Triggered auto assignment to @anmurali (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@hayes102
Copy link

not able to reproduce the issue

Copy link

melvin-bot bot commented Aug 27, 2024

📣 @hayes102! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@cretadn22
Copy link
Contributor

Proposal

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

Distance - Amount field is no longer grayed out after changing rate and then distance offline

What is the root cause of that problem?

<OfflineWithFeedback pendingAction={getPendingFieldAction('amount') ?? (amountTitle ? getPendingFieldAction('customUnitRateID') : undefined)}>

getPendingFieldAction('customUnitRateID') only be used if amountTitle is truthy

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

Remove amountTitle check

<OfflineWithFeedback pendingAction={getPendingFieldAction('amount') ?? getPendingFieldAction('customUnitRateID')}>

What alternative solutions did you explore? (Optional)

@Krishna2323
Copy link
Contributor

I guess this is expected behaviour as per this comment.

cc: @paultsimura

@cretadn22
Copy link
Contributor

I've observed that in many instances where we remove something offline, the empty field remains grayed out. Therefore, I prefer to keep it consistent with other cases and follow our offline pattern.

@paultsimura
Copy link
Contributor

paultsimura commented Aug 27, 2024

Thank you for the tag @Krishna2323 - indeed, this was by design.
@trjExpensify could you please confirm as well that this is expected according to the discussion linked above?

@paultsimura
Copy link
Contributor

@cretadn22 this case is special because we do not remove the amount - it'll be calculated on the BE. Therefore, marking it as usual "removed" behavior will be misleading.

@trjExpensify
Copy link
Contributor

where we remove something offline, the empty field remains grayed out.

Ordinarily when we remove something ("pending delete"), it's strikethrough and at 50% opacity.

this case is special because we do not remove the amount - it'll be calculated on the BE. Therefore, marking it as usual "removed" behavior will be misleading.

Agreed. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2
Projects
None yet
Development

No branches or pull requests

7 participants