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

[HOLD for payment 2024-02-15] [$500] Distance-By adding 2nd add stop user can delete empty location #35644

Closed
3 of 6 tasks
izarutskaya opened this issue Feb 2, 2024 · 22 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@izarutskaya
Copy link

izarutskaya commented Feb 2, 2024

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.35
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 or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause-Internal Team
Slack conversation:

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Tap on a workspace chat
  3. Tap plus icon --- request money
  4. Tap distance
  5. Enter start and end distance waypoints
  6. Tap add stop
  7. Note 3 dots on top right is not displayed to delete waypoint
  8. Select a location
  9. Navigate back and select add stop again
  10. Now note, 3 dots on top right is displayed to delete waypoint before location is selected
  11. Tap delete waypoint and note user can delete empty location.

Expected Result:

When adding first add stop, after adding location only 3 dots on top to delete waypoint displayed. Same behaviour must be displayed while user adding another stop point and before adding location 3dots to delete waypoint must not be shown and user must not be able to delete empty location.

Actual Result:

When adding first add stop, after adding location only 3 dots on top to delete waypoint displayed but when user add another stop point before adding location 3dots to delete waypoint shown and user can delete empty location.

Workaround:

unknown

Platforms:

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

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

Screenshots/Videos

Bug6364419_1706848809407.stop.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0196d67f3a0a23173a
  • Upwork Job ID: 1753354514723856384
  • Last Price Increase: 2024-02-02
  • Automatic offers:
    • fedirjh | Reviewer | 28142825
    • ZhenjaHorbach | Contributor | 28142827
@izarutskaya izarutskaya added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 2, 2024
@melvin-bot melvin-bot bot changed the title Distance-By adding 2nd add stop user can delete empty location [$500] Distance-By adding 2nd add stop user can delete empty location Feb 2, 2024
Copy link

melvin-bot bot commented Feb 2, 2024

Job added to Upwork: https://www.upwork.com/jobs/~0196d67f3a0a23173a

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 2, 2024
Copy link

melvin-bot bot commented Feb 2, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @fedirjh (External)

Copy link

melvin-bot bot commented Feb 2, 2024

Triggered auto assignment to @kevinksullivan (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Feb 2, 2024

Proposal

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

Distance-By adding 2nd add stop user can delete empty location

What is the root cause of that problem?

The main problem with issue is that we check only waypoint count and regardless of the fullness of the input
We will show threeDots button

const shouldShowThreeDotsButton = waypointCount > 2;

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

To fix this issue we can update this const and add waypointAddress
And if we have an address in currentWaypoint from transaction
Only then do we show the button

const shouldShowThreeDotsButton = waypointCount > 2 && waypointAddress;

What alternative solutions did you explore? (Optional)

NA

@pc11000
Copy link

pc11000 commented Feb 2, 2024

Proposal

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

When a second stop is added the user see the three dots button and can delete it .
(while its still empty)

What is the root cause of that problem?

We only check for the number of waypoints and show the button when there are more than 2 waypoints.

const shouldShowThreeDotsButton = waypointCount > 2;

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

I would check if there are more than two waypoints and if a current waypoint is already available e.g. the user wants to edit a waypoint. I think it doesnt makes sense to delete a waypoint which isnt saved.

const isCurrentWaypointAvailable = !_.isEmpty(currentWaypoint);
const shouldShowThreeDotsButton = waypointCount > 2 && isCurrentWaypointAvailable;

Additionally we could also test if it is a stop waypoint. I think it doesnt makes sense to be able to delete start and finish endpoints. Editing should be enough for them.

distance.waypointDescription.stop

What alternative solutions did you explore? (Optional)

NA

@fedirjh
Copy link
Contributor

fedirjh commented Feb 2, 2024

@ZhenjaHorbach Proposal looks good to me.

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Feb 2, 2024

Triggered auto assignment to @Beamanator, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot added the Overdue label Feb 5, 2024
@Beamanator
Copy link
Contributor

Beamanator commented Feb 5, 2024

I think it doesnt makes sense to be able to delete start and finish endpoints. Editing should be enough for them.

This is an interesting point -> If there are 3 points, and you delete the start one -> Does the 2nd one become the start? Similarly, if there are 3 points and you delete the end one, does the 2nd become the end?

If so, I think we're good to go here 👍

@fedirjh does my question make sense? If so, do you mind answer that before I approve the proposal as well?

@melvin-bot melvin-bot bot removed the Overdue label Feb 5, 2024
@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Feb 5, 2024

this is the current behavior )
What looks logical
We should be able to delete the first and last point if we have more than two

Screen.Recording.2024-02-05.at.15.17.43.mov

I think it doesnt makes sense to be able to delete start and finish endpoints. Editing should be enough for them.

This is an interesting point -> If there are 3 points, and you delete the start one -> Does the 2nd one become the start? Similarly, if there are 3 points and you delete the end one, does the 2nd become the end?

If so, I think we're good to go here 👍

@fedirjh does my question make sense? If so, do you mind answer that before I approve the proposal as well?

@fedirjh
Copy link
Contributor

fedirjh commented Feb 5, 2024

This is an interesting point -> If there are 3 points, and you delete the start one -> Does the 2nd one become the start? Similarly, if there are 3 points and you delete the end one, does the 2nd become the end?

@Beamanator Yes, that is correct. Similarly, if you add a new stop, it will be pushed to the end of the list.

I think it doesnt makes sense to be able to delete start and finish endpoints.

I don't quite agree with this one. What will you do if you mistakenly add a new waypoint? It will be pushed to the bottom, and you won't be able to delete it. The current behavior is such that you can't delete the start and finish endpoints only if you have just two waypoints.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 5, 2024
Copy link

melvin-bot bot commented Feb 5, 2024

📣 @fedirjh 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Feb 5, 2024

📣 @ZhenjaHorbach 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@Beamanator
Copy link
Contributor

Groovy, i think it's an easy decision now to hire @ZhenjaHorbach 👍

@ZhenjaHorbach
Copy link
Contributor

📣 @ZhenjaHorbach 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻 Keep in mind: Code of Conduct | Contributing 📖

PR will be ready today or tomorrow

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Feb 8, 2024
@melvin-bot melvin-bot bot changed the title [$500] Distance-By adding 2nd add stop user can delete empty location [HOLD for payment 2024-02-15] [$500] Distance-By adding 2nd add stop user can delete empty location Feb 8, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Feb 8, 2024
Copy link

melvin-bot bot commented Feb 8, 2024

Reviewing label has been removed, please complete the "BugZero Checklist".

Copy link

melvin-bot bot commented Feb 8, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.38-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2024-02-15. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Feb 8, 2024

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@fedirjh] The PR that introduced the bug has been identified. Link to the PR:
  • [@fedirjh] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@fedirjh] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@fedirjh] Determine if we should create a regression test for this bug.
  • [@fedirjh] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@kevinksullivan] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Feb 15, 2024
Copy link

melvin-bot bot commented Feb 20, 2024

@Beamanator, @kevinksullivan, @fedirjh, @ZhenjaHorbach Eep! 4 days overdue now. Issues have feelings too...

@ZhenjaHorbach
Copy link
Contributor

Oh )
It's time to pay ))

@melvin-bot melvin-bot bot removed the Overdue label Feb 20, 2024
@Beamanator
Copy link
Contributor

True :D Bump @kevinksullivan for payout & @fedirjh for checklist 🙏

@fedirjh fedirjh mentioned this issue Feb 21, 2024
59 tasks
@fedirjh
Copy link
Contributor

fedirjh commented Feb 21, 2024

BugZero Checklist:

@kevinksullivan
Copy link
Contributor

All set on payment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

6 participants