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 2023-11-22] [$500] Distance - Address search term not highlighted on refocus #30198

Closed
6 tasks done
kbecciv opened this issue Oct 23, 2023 · 27 comments
Closed
6 tasks done
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@kbecciv
Copy link

kbecciv commented Oct 23, 2023

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: 1.3.89.6
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: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1698057007022009

Action Performed:

  1. Open the app
  2. Click on green plus and click request money
  3. Click on distance and click on start/finish
  4. Type anything in search
  5. Remove focus from search and focus back on search
  6. Observe that app does not highlight search term
  7. Similarly try on any other search in the app like search page and observe that search term is highlighted on refocus

Expected Result:

App should highlight search term on refocus

Actual Result:

App does not highlight search term on refocus for address search

Workaround:

Unknown

Platforms:

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

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

Screenshots/Videos

Android: Native
Android.native.no.search.selection.address.mp4
Android: mWeb Chrome
Android.chrome.no.select.of.search.address.mp4
iOS: Native
ios.native.no.search.focus.address.mov
iOS: mWeb Safari
ios.safari.no.search.focus.address.mov
MacOS: Chrome / Safari
mac.chrome.no.search.selection.address.mov
windows.chrome.no.highlight.search.term.address.mp4
Recording.5123.mp4
MacOS: Desktop
mac.desktop.no.search.selection.address.mov

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0142e6f24bf8176632
  • Upwork Job ID: 1716527404788051968
  • Last Price Increase: 2023-10-23
@kbecciv kbecciv 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 Oct 23, 2023
@c3024
Copy link
Contributor

c3024 commented Oct 23, 2023

Proposal

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

Text is not selected when focused on the text input in way point selection page.

What is the root cause of that problem?

We are not passing the prop selectTextOnFocus here

textInputProps={{

in GooglePlacesAutocomplete.

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

We should also pass the selectTextOnFocus: true prop to textInputProps specified above

                        textInputProps={{
                            selectTextOnFocus: true,

What alternative solutions did you explore? (Optional)

Result
selectOnFocusWayPoint.mov

@namhihi237
Copy link
Contributor

Proposal

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

The address search term is not selected on refocus

What is the root cause of that problem?

We do not pass the param selectTextOnFocus in the textInputProps here

textInputProps={{

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

We should pass the param selectTextOnFocus = true in here

What alternative solutions did you explore? (Optional)

N/A

@melvin-bot melvin-bot bot changed the title Distance - Address search term not highlighted on refocus [$500] Distance - Address search term not highlighted on refocus Oct 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 23, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 23, 2023

Job added to Upwork: https://www.upwork.com/jobs/~0142e6f24bf8176632

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 23, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@melvin-bot
Copy link

melvin-bot bot commented Oct 23, 2023

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

@DylanDylann
Copy link
Contributor

DylanDylann commented Oct 24, 2023

Proposal

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

  • Address search term not highlighted on refocus

What is the root cause of that problem?

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

  • We should apply selectTextOnFocus to the text input, but there are two cases that we need to consider:
  1. User are typing on search input, then blur, and then refocus on search input. In this case selectTextOnFocus is true.
  2. User clicking on any waypoint (for example "123 W Main St...") , it will navigate user to search address page with the input value is "123 W Main St...". In this case, selectTextOnFocus should be false. Then , if user blur the search input and then refocus, selectTextOnFocus should be set to true (Like the URL input in google browser, once we open the page, firstly, it does not highlight all the input. But if we refocus on the input, it will highlight all the text)
           textInputProps={{
           selectTextOnFocus: shouldSelectTextOnFocus,
  • When user blurs the search input, set it to true

What alternative solutions did you explore? (Optional)

  • NA

@JmillsExpensify
Copy link

Open for proposals and should be going through proposal review soon.

@cubuspl42
Copy link
Contributor

@DylanDylann While I get the general idea of your proposal, I'm unsure if I fully understand the details of when/how shouldSelectTextOnFocus should change. Do you have a Git branch at hand, so I could quickly test it?

@DylanDylann
Copy link
Contributor

@cubuspl42 sure, please wait a minute

@DylanDylann
Copy link
Contributor

DylanDylann commented Oct 25, 2023

#30326 @cubuspl42 please help check this PR and here is the result:

Screencast.from.25-10-2023.14.40.54.webm
  • In the above video, if the user clicks on Waypoint to edit it, the search term is not highlighted. Then after blurring and refocusing, the search term is highlighted

@c3024
Copy link
Contributor

c3024 commented Oct 25, 2023

I think selecting/highlighting the whole search string when a user clicks on waypoint to edit it is better because, in Autocomplete situations like these, it is unlikely that a user adds a letter after the existing way point or delete some letters from the waypoint.
Instead, selecting/highlighting the string on user clicking on waypoint to edit appears to be more logical because in components like GoogleAutoComplete, a user likely searches for a waypoint afresh instead of deleting some letters or moving to another position in the string with keyboard.

@cubuspl42
Copy link
Contributor

@DylanDylann I tested your solution, and it doesn't seem to be a noticeable improvement. It's related to a corner case. A user can still easily place their cursor at any position of the text input with another click, if they want to.

@cubuspl42
Copy link
Contributor

I approve the proposal by @c3024, which is the first one to suggest passing the selectTextOnFocus property.

C+ reviewed 🎀 👀 🎀

@melvin-bot
Copy link

melvin-bot bot commented Oct 26, 2023

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

@DylanDylann
Copy link
Contributor

@Julesssss Should this be the expected behavior? #30198 (comment). If not, i think @c3024 `s proposal is the best

@Julesssss
Copy link
Contributor

I agree with @cubuspl42 here. Assigning @c3024

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 26, 2023
@cubuspl42
Copy link
Contributor

cubuspl42 commented Oct 26, 2023

It's worth noting that to get to the state from the first frame of that video, the user has to first search for and select an address.

If we'd like to improve the UX here in the future, we could consider adding a "Put this result in the search field" button (the diagonal arrow on my screenshot). But I'm not suggesting this has a high priority.

image

@Julesssss Julesssss added Engineering and removed External Added to denote the issue can be worked on by a contributor labels Oct 26, 2023
@Julesssss Julesssss added the External Added to denote the issue can be worked on by a contributor label Oct 26, 2023
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 26, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 26, 2023

Current assignee @cubuspl42 is eligible for the External assigner, not assigning anyone new.

@Julesssss
Copy link
Contributor

@JmillsExpensify any idea what label I'm missing here? Melvin didn't seem to add some of the UpWork/raise a PR comments.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Oct 26, 2023
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Nov 15, 2023
@melvin-bot melvin-bot bot changed the title [$500] Distance - Address search term not highlighted on refocus [HOLD for payment 2023-11-22] [$500] Distance - Address search term not highlighted on refocus Nov 15, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 15, 2023
Copy link

melvin-bot bot commented Nov 15, 2023

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

Copy link

melvin-bot bot commented Nov 15, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.99-0 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 2023-11-22. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

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

Copy link

melvin-bot bot commented Nov 15, 2023

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:

  • [@cubuspl42] The PR that introduced the bug has been identified. Link to the PR:
  • [@cubuspl42] 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:
  • [@cubuspl42] 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:
  • [@cubuspl42] Determine if we should create a regression test for this bug.
  • [@cubuspl42] 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.
  • [@JmillsExpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@cubuspl42
Copy link
Contributor

  • The PR that introduced the bug has been identified. Link to the PR:
    • It seems that the bug was present in the relevant components since they were created
  • 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:
    • N/A
  • 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:
    • No need for additional discussion
  • Determine if we should create a regression test for this bug.
    • No need for a regression test
  • 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.
    • N/A

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Nov 22, 2023
@JmillsExpensify
Copy link

Closing the loop on payments. Thanks for the regression suggestion @cubuspl42!

Payment summary:

@melvin-bot melvin-bot bot removed the Overdue label Nov 24, 2023
@JmillsExpensify
Copy link

Offers sent to everyone in Upwork based on the above summary.

@JmillsExpensify
Copy link

Everyone has been paid out based on the summary above and no regression test required, so closing one out!

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 Engineering External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

7 participants