-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$500] Distance - Inconsistency in error message when more than two same adddress is added #29803
Comments
Triggered auto assignment to @puneetlath ( |
Job added to Upwork: https://www.upwork.com/jobs/~018cedadf58c08d896 |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ntdiary ( |
@BhuvaneshPatil this is related to the changes in #29125. Can you work on correcting this, please? |
Sure thing @tgolen. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Inconsistent error message while adding duplicate waypoints. What is the root cause of that problem?The root cause for this problem is the logic used in the onError function that returns the error message, which checks duplication only the waypoints have no additional points init App/src/components/DistanceRequest/index.js Lines 148 to 162 in b494186
also, I noticed the error handling is not done properly and it only checks if it has any two valid points. That introduces bugs like allowing duplicate waypoints if they have any two valid points. App/src/components/DistanceRequest/index.js Lines 226 to 233 in b494186
App/src/components/DistanceRequest/index.js Lines 185 to 192 in b494186
check the recordings for the bug. What changes do you think we should make in order to solve the problem?to fix the error handling properly we can introduce the memo variable
Then update the OnError functions logic:
Then update the logic on submitWaypoints to prevent submission and set hasError to true.
Then update the logic on showing error in view.
by using the What alternative solutions did you explore? (Optional)N/A |
📣 @kuttyhub! 📣
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
ProposalPlease re-state the problem that we are trying to solve in this issue.Inconsistency in error message when more than two same adddress is added What is the root cause of that problem?We only display the duplicate error when having two waypoints in the same App/src/components/DistanceRequest/index.js Lines 154 to 156 in 19ef1ca
What changes do you think we should make in order to solve the problem?We should check if the To do this we should:
App/src/libs/TransactionUtils.ts Lines 430 to 431 in 19ef1ca
And then change the condition here to
App/src/components/DistanceRequest/index.js Lines 154 to 156 in 19ef1ca
What alternative solutions did you explore? (Optional)NA ResultScreencast.from.18-10-2023.11.35.53.webm |
I'm going to take this issue over from @puneetlath since I was the one working on this feature. @kuttyhub I like your proposal because I think it does a good job to clean up the error handling to be more consistent and easier to follow and maintain (especially the relationship between In the future, it would be best to write your proposal with little to no code posted (so no one is tempted to review the actual code, which is what the PR process is for). @ntdiary Are you OK with this proposal? |
@tgolen, yeah, it looks good to me. : ) 🎀 👀 🎀 C+ reviewed |
Current assignee @tgolen is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
Thanks @tgolen for the advice, I will keep it my mind for future proposals. I have one doubt regards the sub bug I found which allows submission when you have any two valid waypoints even though its contains duplicates. Is that expected behaviour? |
@ntdiary @tgolen @kuttyhub 's proposal doesn't work for all cases. Let's see the video: Screencast.from.18-10-2023.22.41.41.webmThe reason is We should get the none-empty waypoints to compare with the Actually, Screencast.from.18-10-2023.22.45.36.webmMy proposal can fix both cases above can you please check again. |
I believe this is expected and intentional. The reason is that the server will automatically remove any duplicate waypoints and simply ignore them, hopefully making it a little easier UX. @dukenv0307 Thank you for showing the bug with @kuttyhub's proposal, and I'd like to give them a chance to address that bug. I've looked at your proposal again, and I still am not as fond of it because it feels to me like it solves this problem with the fewest absolute number of changes, but doesn't actually improve the code overall and instead leaves it in a state where the validation/submission is confusing and difficult to follow and maintain. To be clear, the intention of the errors is the following.
It was kind of difficult to write this up, so I would actually welcome any proposals to simplify this even further. Maybe we should only have a single error case? Would that make it less confusing? Let's maybe consider some out-of-the-box solutions that would refactor this a bit. |
We can create a variable |
What about a variable more like |
@tgolen In the duplicate case above |
@GabiHExpensify, eh, precisely speaking, there is not necessarily a starting or finishing. Currently, we think that as long as there are at least two different addresses, the input is valid, which is more convenient for users to use. 😂 |
Yeah, sorry @GabiHExpensify! We had a hard time trying to figure out all the cases for different error conditions and we are really trying to simplify all possible cases with a single message. How about this?
|
That looks great, thanks @tgolen! Are we good to go on the Spanish translation, or does that still need to be double-checked? |
@GabiHExpensify Yes, please help to check the Spanish translation. |
Here's Spanish:
|
Thanks for the translations, Gabi! This should be merged soon. |
@dukenv0307 But I see |
@tgolen, @ntdiary, @GabiHExpensify, @dukenv0307 Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Not overdue, the related PR has been deployed |
@tgolen, @ntdiary, @GabiHExpensify, @dukenv0307 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@tgolen @GabiHExpensify The PR was deployed in production one week ago. Is this issue ready for payment? |
It seems that the bot stopped working earlier, causing this issue not to be changed to "Awaiting payment". 😂 cc @tgolen |
@GabiHExpensify Can you help with the payments on this one? It is past the regression period, but looks like the automation didn't work for some reason. |
bump @GabiHExpensify |
ah sorry i missed your comment last week @tgolen -- i don't know anything about the payments, i'm just on this GH for the copy. should there be someone from the contributor team who handles that? |
Oops, sorry about that! I'll get someone from the bugzero team. |
Triggered auto assignment to @sonialiap ( |
This comment was marked as off-topic.
This comment was marked as off-topic.
@sonialiap Could you help us settle up some payments here? I think this is what is needed:
|
bump @sonialiap |
1 similar comment
bump @sonialiap |
@dukenv0307 contributor $500 - offer sent - paid ✔️ |
@sonialiap, thank you! Have accepted. :) |
Everyone has been paid ✔️ |
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.3.85-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
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:
Expected Result:
The error message should still be 'Please remove duplicate waypoints'
Actual Result:
The error message now shows 'Please enter at least two waypoints'
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Android: Native
Bug6240647_1697554305957.Screen_Recording_20231017_193302_New_Expensify__1_.1.mp4
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @GabiHExpensifyThe text was updated successfully, but these errors were encountered: