-
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] Android - Distance - Previous waypoints displayed for a second before new suggestions appear #48643
Comments
Triggered auto assignment to @puneetlath ( |
@puneetlath 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 |
Edited by proposal-police: This proposal was edited at 2024-09-05 13:31:17 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Android - Distance - Previous waypoints displayed for a second before new suggestions appear What is the root cause of that problem?We are displaying the predefined places even in online case here until the search suggestion result comes from google place auto complete App/src/components/AddressSearch/index.tsx Lines 325 to 329 in 6760f96
What changes do you think we should make in order to solve the problem?We need to show the predefined places only for offline case so change it to
What alternative solutions did you explore? (Optional)We can also do App/src/components/AddressSearch/index.tsx Line 375 in 6760f96
or we can set |
Edited by proposal-police: This proposal was edited at 2024-09-12 00:31:47 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Distance - Previous waypoints displayed for a second before new suggestions appear What is the root cause of that problem?if the App/src/components/AddressSearch/index.tsx Lines 325 to 330 in 2af4d0a
What changes do you think we should make in order to solve the problem?If And we only need to rerender Create new const
Change this code to the following
Then add the following code on
or just this
What alternative solutions did you explore? (Optional)Create a new const
If
We should
|
ProposalPlease re-state the problem that we are trying to solve in this issue.When the user starts typing a new location in the app, they briefly see old locations they've used before, but then those disappear and get replaced by new suggested locations from the map service. This can be confusing for the user because:
What is the root cause of that problem?The app is always showing predefined locations (previously used by the user) regardless of whether the user is offline or online. This behavior is not ideal when the user is online and actively typing in a new location. What changes do you think we should make in order to solve the problem?When the user is online, only show the predefined locations if they haven't started typing anything in the input box yet. As soon as the user starts typing, stop showing the previously used locations and instead display the recommended locations fetched from the map provider's live API. App/src/components/AddressSearch/index.tsx Line 325 in 2af4d0a
This will ensure that when the user is online and has started typing, an empty array is returned, preventing the previously used locations from being displayed. Screen.20Recording.202024-09-05.20at.207.mp4 |
ProposalPlease re-state the problem that we are trying to solve in this issue.Saved waypoints are shown briefly when searching address. What is the root cause of that problem?When we search, the search keyword state is updated which recalculate the predefined places. App/src/components/AddressSearch/index.tsx Lines 325 to 330 in 8fc5e68
When the predefined places are updated, the auto complete component will update the list with the new predefined places and pass an empty result to it. Because the result is empty, the predefined places are shown. After the search is completed, the list is updated again with the new result. What changes do you think we should make in order to solve the problem?We need to pass the result when updating the list. There is already a variable that stores the last result here, but it's not a ref, so the value is always gone after re-render, so we need to convert it to ref too.
What alternative solutions did you explore? (Optional)Never show saved waypoints (predefined places) when searching. App/src/components/AddressSearch/index.tsx Lines 325 to 330 in 8fc5e68
|
Job added to Upwork: https://www.upwork.com/jobs/~021832156095103318812 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @ntdiary ( |
Hi, @FitseTLT, curious is there any doc supporting this requirement? I feel it would also be good to display predefined places if the |
Maybe let's ask @puneetlath for |
Hi, @lanitochka17, @puneetlath, I have a question about the expect result, should the related recent destinations be displayed in the suggestion list? Could you please confirm this point? (e.g., The |
I think we should show them when the composer is empty and when offline. I think once you start typing, it's fine for us to just use whatever results the maps API thinks is the most relevant to your search. Which I would assume can also include the pre-defined places. |
@puneetlath Based on your input, I believe my proposal aligns well with the requirements you've outlined, particularly regarding showing suggestions when the composer is empty (whether online or offline) and when offline (at all times) |
Based on this input, @nyomanjyotisa's solution is the first to meet the requirements. Additionally, there's a minor edge case with this solution: if we start typing while offline, the filtered predefined places will be shown, but when switching back online, no suggestions will appear. In the production app, the filtered predefined places will still be displayed. test.mp4 |
Hmm. Is there any way to have that not be the case? |
Updated my proposal to address this issue -1-New-Expensify.24.mp4 |
a new edge issue: test.mp4 |
Proposal updated to address the original Issue, this issue, and also this issue New-Expensify.30.mp4 |
another case: clear-case.mp4 |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
Predefined places are displayed after clearing the search value, make sure you try the main solution on my proposal New-Expensify.31.mp4 |
I reinstalled the |
@puneetlath, @ntdiary Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@puneetlath @ntdiary this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
@puneetlath, @ntdiary Huh... This is 4 days overdue. Who can take care of this? |
@ntdiary what's next here? |
After re-investigating, I found that the previously mentioned flash was caused by the hiding of App/src/components/AddressSearch/index.tsx Lines 304 to 311 in 00d2e32
This means their proposal is still reasonable, it's fine to move forward with their proposal! :) 🎀 👀 🎀 C+ reviewed |
Current assignee @puneetlath is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
📣 @nyomanjyotisa 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
This issue has not been updated in over 15 days. @puneetlath, @ntdiary, @nyomanjyotisa eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
What's the status with this? Is it ready to pay out? |
The PR was deployed to production 3 weeks ago, but the automation here has failed, I will fill out the bug zero checklist. :) |
Regression steps:
|
Payment summary:
Thanks everyone! |
$250 approved for @ntdiary |
Hi, @JmillsExpensify, app keeps prompting me that the |
Just ignore it, though I've already approved this payment above. |
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.29-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4923199&group_by=cases:section_id&group_order=asc&group_id=309127
Issue reported by: Applause - Internal Team
Action Performed:
Expected Result:
When the user starts writing a new waypoint, all the related suggestions should be displayed automatically
Actual Result:
When user starts writing a new waypoint, with each new letter, previously used directions appear for a second before all the related suggestions are displayed
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6592945_1725458793387.Distance_Suggestions.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @ntdiaryThe text was updated successfully, but these errors were encountered: