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 2024-01-05][$500] Search - Nothing happens when hitting Enter key on the selected user #33654

Closed
2 of 6 tasks
kbecciv opened this issue Dec 27, 2023 · 30 comments
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

Comments

@kbecciv
Copy link

kbecciv commented Dec 27, 2023

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
@kbecciv kbecciv added the DeployBlockerCash This issue or pull request should block deployment label Dec 27, 2023
Copy link
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.

Copy link

melvin-bot bot commented Dec 27, 2023

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

@kbecciv kbecciv 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 Dec 27, 2023
@Pujan92
Copy link
Contributor

Pujan92 commented Dec 27, 2023

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];

@Beamanator
Copy link
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

@situchan
Copy link
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

@Pujan92
Copy link
Contributor

Pujan92 commented Dec 27, 2023

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

@Beamanator
Copy link
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?

@Pujan92
Copy link
Contributor

Pujan92 commented Dec 27, 2023

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

@situchan
Copy link
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

@Beamanator
Copy link
Contributor

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

@Pujan92
Copy link
Contributor

Pujan92 commented Dec 27, 2023

Yes @Beamanator.

@situchan
Copy link
Contributor

I am up too for reviewing and testing 😄

@Beamanator
Copy link
Contributor

Amazing, thanks to both of you! Assigned :D

@Beamanator
Copy link
Contributor

PR Merged! requesting CP to staging

@mountiny mountiny added the External Added to denote the issue can be worked on by a contributor label Dec 28, 2023
@melvin-bot melvin-bot bot changed the title Search - Nothing happens when hitting Enter key on the selected user [$500] Search - Nothing happens when hitting Enter key on the selected user Dec 28, 2023
@melvin-bot melvin-bot bot removed the Weekly KSv2 label Dec 28, 2023
Copy link

melvin-bot bot commented Dec 28, 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

@mountiny mountiny removed the DeployBlockerCash This issue or pull request should block deployment label Dec 28, 2023
@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 28, 2023
Copy link

melvin-bot bot commented Dec 28, 2023

📣 @situchan 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@mountiny
Copy link
Contributor

this is fixed, thank you!

Copy link

melvin-bot bot commented Dec 28, 2023

📣 @Pujan92 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Dec 28, 2023
@melvin-bot melvin-bot bot changed the title [$500] Search - Nothing happens when hitting Enter key on the selected user [HOLD for payment 2024-01-04] [$500] Search - Nothing happens when hitting Enter key on the selected user Dec 28, 2023
Copy link

melvin-bot bot commented Dec 28, 2023

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Dec 28, 2023
Copy link

melvin-bot bot commented Dec 28, 2023

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:

Copy link

melvin-bot bot commented Dec 28, 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:

  • [@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:

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Dec 29, 2023
@melvin-bot melvin-bot bot 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 Dec 29, 2023
Copy link

melvin-bot bot commented Dec 29, 2023

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:

Copy link

melvin-bot bot commented Dec 29, 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:

  • [@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:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jan 4, 2024
@jliexpensify
Copy link
Contributor

Hi @situchan - bump to complete the checklist please!

@jliexpensify
Copy link
Contributor

Payment Summary:

Upwork job

@jliexpensify jliexpensify 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 Jan 5, 2024
@situchan
Copy link
Contributor

situchan commented Jan 5, 2024

  • 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.

@jliexpensify
Copy link
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
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
Projects
None yet
Development

No branches or pull requests

6 participants