-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[$250] Distance - Recent destination list shows more than 5 destinations #45241
Comments
Triggered auto assignment to @greg-schroeder ( |
Triggered auto assignment to @danieldoglas ( |
👋 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:
|
@greg-schroeder FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors. |
We think this issue might be related to the #collect project. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Recent destination list shows more than 5 destinations What is the root cause of that problem?
App/src/pages/iou/request/step/IOURequestStepWaypoint.tsx Lines 257 to 259 in 19922f5
What changes do you think we should make in order to solve the problem?We should change What alternative solutions did you explore? (Optional) |
Demoting from blocker |
Job added to Upwork: https://www.upwork.com/jobs/~018ea8c6fb29aecd8f |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Ollyws ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Distance - Recent destination list shows more than 5 destinations What is the root cause of that problem?I think we are intentionally storing 20 recent destinations and it was added in this PR . We just need to slice the App/src/components/AddressSearch/index.tsx Lines 325 to 330 in 9138d8b
What changes do you think we should make in order to solve the problem?We should const filteredPredefinedPlaces = useMemo(() => {
if (!searchValue) {
return predefinedPlaces?.slice(0, 5) ?? [];
}
return predefinedPlaces?.filter((predefinedPlace) => isPlaceMatchForSearch(searchValue, predefinedPlace)).splice(0, 5) ?? [];
}, [predefinedPlaces, searchValue]); What alternative solutions did you explore? (Optional) |
This is not a bug we intentionally increased the number of displayed places to 20. We may need to update regression test steps somewhere though. cc @neil-marcellini |
@arosiclair, the waypoints_page_scrollables.mp4 |
assigning @neil-marcellini to the issue based on @arosiclair's comment |
I think that's correct, but we did have a long discussion about it and I don't remember where we landed tbh. I'll leave it up to @neil-marcellini if we should change it or not. |
Ah yeah this stuff again 😅, let me find what we decided. This is working as expected. I sort of explained it here and we decided to go with the following approach at the end of that thread.
@izarutskaya I wasn't able to find a regression test checking that there are only 5 recent waypoints. If so, please update it to 20. |
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.6-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: https://expensify.testrail.io/index.php?/tests/view/4709538
Logs: https://stackoverflow.com/c/expensify/questions/4856
Issue reported by: Applause-Internal team
Action Performed:
Expected Result:
The recent destination list will show at most 5 destinations (production behavior).
Actual Result:
The recent destination list shows more than 5 destinations on staging.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Bug6538587_1720674896378.bandicam_2024-07-11_13-06-18-825.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @OllywsThe text was updated successfully, but these errors were encountered: