-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Due for payment 2025-05-22] [$250] Profile- Setting address, select a suggested address, street name displays duplicate #60795
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
Comments
Triggered auto assignment to @lschurr ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Profile - Setting address, select a suggested address, street name displays duplicate What is the root cause of that problem?We build the address here from App/src/components/AddressSearch/index.tsx Line 179 in e1e89c9
The issue is that App/src/libs/GooglePlacesUtils.ts Lines 43 to 51 in e1e89c9
For example, if we search for address That's the parts that the App/src/libs/GooglePlacesUtils.ts Lines 39 to 43 in e1e89c9
But for an address like What changes do you think we should make in order to solve the problem?We can rewrite function getPlaceAutocompleteTerms(addressTerms: AddressTerm[]): GetPlaceAutocompleteTermsResult {
const n = addressTerms.length;
// country / state / city = always the last 3 terms
const country = addressTerms[n - 1]?.value ?? '';
const state = addressTerms[n - 2]?.value ?? '';
const city = addressTerms[n - 3]?.value ?? '';
// the very first term holds "number + street name"
const firstTerm = addressTerms[0]?.value ?? '';
const [maybeNumber, ...nameParts] = firstTerm.split(' ');
let street = firstTerm;
let streetNumber = '';
// if the first “word” is numeric, pull it out
if (!isNaN(Number(maybeNumber))) {
streetNumber = maybeNumber;
street = nameParts.join(' ');
}
return { country, state, city, street, streetNumber };
} What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?Write unit test for |
ProposalPlease re-state the problem that we are trying to solve in this issue.Double street name when selecting address auto complete. What is the root cause of that problem?This happens after #55996. The PR is trying to fix an issue where, after selecting App/src/components/AddressSearch/index.tsx Lines 127 to 129 in 6291404
So, they proceed to use fallbacks for the street name and number from the App/src/components/AddressSearch/index.tsx Lines 169 to 171 in 6291404
The problem with App/src/libs/GooglePlacesUtils.ts Lines 40 to 51 in 6291404
It populates the value starting from the last index of the array. In our case, the streetNumber is populated with the street number. ![]() So, street name and number is the same. What changes do you think we should make in order to solve the problem?I tried searching and selecting What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N/A |
ProposalPlease re-state the problem that we are trying to solve in this issue.Street name is duplicated in Address What is the root cause of that problem?In App/src/libs/GooglePlacesUtils.ts Line 44 in d42fb2c
where the first term is always That makes both App/src/components/AddressSearch/index.tsx Line 179 in 33ed5b1
What changes do you think we should make in order to solve the problem?Remove the What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?NA What alternative solutions did you explore? (Optional)NA |
Job added to Upwork: https://www.upwork.com/jobs/~021915446391858547053 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @mananjadhav ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Profile- Setting address, select a suggested address, street name displays duplicate What is the root cause of that problem?This issue is occurred after this #55996 PR. Here we have added street and streetNumber fallback to fix that issue where street and streetNumber may be empty. App/src/components/AddressSearch/index.tsx Line 179 in 6291404
We use ![]() App/src/libs/GooglePlacesUtils.ts Lines 43 to 44 in d42fb2c
Because of data is not return in specific format, both What changes do you think we should make in order to solve the problem?
App/src/components/AddressSearch/index.tsx Line 179 in d42fb2c
Here we are adding ![]() ![]() What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?NA What alternative solutions did you explore? (Optional)Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
@mananjadhav Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Will review the proposals today. |
Well I checked and I don't think we should be updating the auto complete util as it's a bit dependent on the Google places API.
I had helped with the review of the PR and even after reverting it previous one still works fine. I am inclined to use @bernhardoj's proposal. I was also trying to decide if we can use 🎀 👀 🎀 C+ reviewed. |
Triggered auto assignment to @mollfpr, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
Thank you all for the proposals! I'm incline to go with @bernhardoj proposal. Assigning! |
PR is ready cc: @mananjadhav |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.45-21 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 2025-05-22. 🎊 For reference, here are some details about the assignees on this issue:
|
@mananjadhav @lschurr @mananjadhav The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
@mananjadhav - Can you work on the checklist for this one? |
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: v9.1.32-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: No, reproducible on hybrid only
If this was caught during regression testing, add the test name, ID and link from TestRail: Explore
Email or phone of affected tester (no customers): N/A
Issue reported by: Applause Internal Team
Device used: Win 11/Chrome
App Component: User Settings
Action Performed:
Expected Result:
Street name should display correctly
Actual Result:
Street name is duplicated in Address if the suggested isn't included the word "Ho Chi Minh"
Workaround:
Unknown
Platforms:
Screenshots/Videos
1.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @lschurrThe text was updated successfully, but these errors were encountered: