Skip to content

[HOLD for payment 2024-01-05][$500] Search - Nothing happens when hitting Enter key on the selected user #33654

Closed

Description

@kbecciv

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: v1.4.18-2
Reproducible in staging?: y
Reproducible in production?: n
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:

  1. Go to Search.
  2. Hit Enter.

Expected Result:

The user in the list is selected.

Actual Result:

Nothing happens when hitting Enter key.

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

Add any screenshot/video evidence

Bug6326899_1703696940505.20231228_002617__1_.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~012d7fac1fa0422658
  • Upwork Job ID: 1740463680635154432
  • Last Price Increase: 2023-12-28
  • Automatic offers:
    • situchan | Reviewer | 28071858
    • Pujan92 | Contributor | 28071859

Activity

  1. github-actions commented on Dec 27, 2023

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  2. melvin-bot commented on Dec 27, 2023

    @melvin-bot

    Triggered auto assignment to @Beamanator (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

  3. changed the title [-]Web - Search - Nothing happens when hitting Enter key on the selected user[/-] [+]Search - Nothing happens when hitting Enter key on the selected user[/+] on Dec 27, 2023
  4. Pujan92 commented on Dec 27, 2023

    @Pujan92
    Contributor

    Proposal

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

    Row isn't selected on pressing enter for the option selector

    What is the root cause of that problem?

    • In this PR we have added testID for the input and on pressing an enter it will fetch testID of the focused element here.
      selectFocusedOption(e) {
      const focusedItemKey = lodashGet(e, ['target', 'attributes', 'data-testid', 'value']);
      const focusedOption = focusedItemKey ? _.find(this.state.allOptions, (option) => option.keyForList === focusedItemKey) : this.state.allOptions[this.state.focusedIndex];

    Due to that focusedItemKey will be options-selector-input and focusedOption will be undefined and it will return early. Earlier we weren't provided the testId for the option selector input and on enter it provides focusedItemKey undefined and we follow the else condition in ternary where we considers focusedIndex of the list.

    <PressableWithFeedback
    testID={props.keyForList}

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

    We should avoid comparing the keyForList when the focusedItemKey is options-selector-input here.

    (focusedItemKey && !_.isEqual(focusedItemKey, 'options-selector-input'))
    

    const focusedOption = focusedItemKey ? _.find(this.state.allOptions, (option) => option.keyForList === focusedItemKey) : this.state.allOptions[this.state.focusedIndex];

  5. Beamanator commented on Dec 27, 2023

    @Beamanator
    Contributor

    Hmm @Pujan92 it looks like #33491 was merged 3 hours ago and is not on staging yet, but the bug is reproducible in staging

  6. situchan commented on Dec 27, 2023

    @situchan
    Contributor

    @Beamanator it's automation bug. Already deployed to staging. As you see, it's in deploy checklist

    Screenshot 2023-12-28 at 1 52 44 AM
  7. Pujan92 commented on Dec 27, 2023

    @Pujan92
    Contributor

    Yes, I am seeing that change with the inspect element in the staging.

  8. Beamanator commented on Dec 27, 2023

    @Beamanator
    Contributor

    Ooh good catch!

    While I like your solution @Pujan92 , I don't really like that we started using testID OptionRow in https://github.com/Expensify/App/pull/33265/files for a non-test-related fix 🤔 do y'all think we should update that to just id? Or am I crazy?

  9. Pujan92 commented on Dec 27, 2023

    @Pujan92
    Contributor

    I agree @Beamanator , using nativeId makes sense instead of testID.

  10. situchan commented on Dec 27, 2023

    @situchan
    Contributor

    I don't really like that we started using testID OptionRow in https://github.com/Expensify/App/pull/33265/files for a non-test-related fix 🤔 do y'all think we should update that to just id?

    Agree

  11. Beamanator commented on Dec 27, 2023

    @Beamanator
    Contributor

    Nice, @Pujan92 are you up for making that change along with the change you proposed?

  12. 34 remaining items

  13. melvin-bot commented on Dec 28, 2023

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.18-8 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 2024-01-04. 🎊

    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:

  14. melvin-bot commented on Dec 28, 2023

    @melvin-bot

    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:

    • [@situchan] The PR that introduced the bug has been identified. Link to the PR:
    • [@situchan] 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:
    • [@situchan] 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:
    • [@situchan] Determine if we should create a regression test for this bug.
    • [@situchan] 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.
    • [@jliexpensify] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  15. changed the title [-][HOLD for payment 2024-01-04] [$500] Search - Nothing happens when hitting Enter key on the selected user[/-] [+][HOLD for payment 2024-01-05] [HOLD for payment 2024-01-04] [$500] Search - Nothing happens when hitting Enter key on the selected user[/+] on Dec 29, 2023
  16. melvin-bot commented on Dec 29, 2023

    @melvin-bot

    The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.19-2 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 2024-01-05. 🎊

    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:

  17. melvin-bot commented on Dec 29, 2023

    @melvin-bot

    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:

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

    @jliexpensify
    Contributor

    Hi @situchan - bump to complete the checklist please!

  19. jliexpensify commented on Jan 5, 2024

    @jliexpensify
    Contributor

    Payment Summary:

    Upwork job

  20. changed the title [-][HOLD for payment 2024-01-05] [HOLD for payment 2024-01-04] [$500] Search - Nothing happens when hitting Enter key on the selected user[/-] [+][HOLD for payment 2024-01-05][$500] Search - Nothing happens when hitting Enter key on the selected user[/+] on Jan 5, 2024
  21. situchan commented on Jan 5, 2024

    @situchan
    Contributor
    • The PR that introduced the bug has been identified. Link to the PR: Fix: focusing on item by tab key does not work #33265
    • 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: https://github.com/Expensify/App/pull/33265/files#r1437244150
    • 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: N/A
    • Determine if we should create a regression test for this bug.
    • 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.

    This was deploy blocker, which means QA team caught this during regression test on staging build.
    So no need another regression test.

  22. jliexpensify commented on Jan 5, 2024

    @jliexpensify
    Contributor

    Paid and closed!

    Note: there were 2 payment dates (the 4th and 5th) and I'm OOO for the next 2 days so I paid now. It's the 5th in the APAC region as well :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions