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-10-29] [HOLD for payment 2024-10-25] [$250] Android - Search - Keyboard does not auto open in Search modal #51010

Closed
2 of 8 tasks
IuliiaHerets opened this issue Oct 17, 2024 · 51 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

@IuliiaHerets
Copy link

IuliiaHerets commented Oct 17, 2024

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.50-0
Reproducible in staging?: Y
Reproducible in production?: N/A - new feature, doesn't exist in prod
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team

Action Performed:

  1. Launch New Expensify app.
  2. Open a report.
  3. Tap Search icon.

Expected Result:

Keyboard will auto open.

Actual Result:

Keyboard does not auto open.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6637494_1729158638593.1729158562598_Screen_Recording_20241017_174902_New_Expensify.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021846960678624915682
  • Upwork Job ID: 1846960678624915682
  • Last Price Increase: 2024-10-17
  • Automatic offers:
    • abzokhattab | Contributor | 104471055
Issue OwnerCurrent Issue Owner: @jayeshmangwani
@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Oct 17, 2024
Copy link

melvin-bot bot commented Oct 17, 2024

Triggered auto assignment to @srikarparsi (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

Copy link

melvin-bot bot commented Oct 17, 2024

Triggered auto assignment to @sakluger (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

Copy link

melvin-bot bot commented Oct 17, 2024

💬 A slack conversation has been started in #expensify-open-source

@melvin-bot melvin-bot bot added the Daily KSv2 label Oct 17, 2024
@github-actions github-actions bot added Engineering Hourly KSv2 and removed Daily KSv2 labels Oct 17, 2024
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.

@abzokhattab
Copy link
Contributor

abzokhattab commented Oct 17, 2024

Edited by proposal-police: This proposal was edited at 2024-10-17 18:17:16 UTC.

Proposal

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

Search - Keyboard does not auto open in Search modal

What is the root cause of that problem?

keyboard doesnt open up because we dont use the useAutoFocusInput inside the SearchRouterInput component like we do in other textInput fields and the autoFocus doesn't work well on android with modals

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

we should assign the ref to the inputCallbackRef value of the useAutoFocusInput hook:

    const {inputCallbackRef } = useAutoFocusInput();

then use it in the TextInput here:

                        ref={inputCallbackRef}

then we could remove the autoFocus as its now handled by the useAutoFocusInput

What alternative solutions did you explore? (Optional)

optionally we can delay the focus so that the input field focuses correctly by adding shouldDelayFocus

@rayane-d
Copy link
Contributor

@Kicu
Copy link
Member

Kicu commented Oct 17, 2024

Was this tested on a physical phone? Cos I'm testing this on android emulator right now (Pixel) and the keyboard does open:

rec-search-keyboard-andr.mp4
rec-search-keyboard-andr2.mp4

I did however noticed exactly one case where it didn't open, but I cannot reproduce it consistently. All the other cases it did open.
I can test on a physical device later, but I'm curious if other people can reproduce this easily?

@luacmartins
Copy link
Contributor

I can reliably reproduce this on a Pixel 6 physical device

@srikarparsi
Copy link
Contributor

I'm also able to pretty reliably reproduce this on an emulator (I'm using Pixel 7 Pro API 33):

Screen.Recording.2024-10-17.at.12.50.48.PM.mov

@rayane-d
Copy link
Contributor

@Kicu I'm able to reproduce on android emulator

Screen.Recording.2024-10-17.at.5.58.08.PM.mov

@srikarparsi
Copy link
Contributor

Going to make this external

@srikarparsi srikarparsi added the External Added to denote the issue can be worked on by a contributor label Oct 17, 2024
@melvin-bot melvin-bot bot changed the title Android - Search - Keyboard does not auto open in Search modal [$250] Android - Search - Keyboard does not auto open in Search modal Oct 17, 2024
Copy link

melvin-bot bot commented Oct 17, 2024

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

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

melvin-bot bot commented Oct 17, 2024

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

@hayes102
Copy link

@rayane-djouah i am still not able to reproduce... is there a specific step that i am missing?

Copy link

melvin-bot bot commented Oct 17, 2024

📣 @hayes102! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@huult
Copy link
Contributor

huult commented Oct 17, 2024

Proposal

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

Keyboard does not auto open in Search modal

What is the root cause of that problem?

This issue of react-native-modal

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

We should update follow this comment

//.src/components/Search/SearchRouter/SearchRouterInput.tsx#L87
+    useEffect(() => {
+        InteractionManager.runAfterInteractions(() => {
+            inputRef.current?.blur();
+            inputRef.current?.focus();
+        });
+    }, []);
Screen.Recording.2024-10-18.at.00.59.25.mov

@shahinyan11
Copy link

shahinyan11 commented Oct 17, 2024

Edited by proposal-police: This proposal was edited at 2024-10-17 18:18:14 UTC.

Proposal

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

Android - Search - Keyboard does not auto open in Search modal

What is the root cause of that problem?

If the TextInput component is inside a some kind of view that renders asynchronously or after some delay, the keyboard may not open automatically. We already encounter such issues in other places . For example this one

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

  1. Add below code in SearchRouterInput component
    const inputRef = useRef<BaseTextInputRef | null>(null);

    useEffect(() => {
        if(autoFocus){
            InteractionManager.runAfterInteractions(()=>{
                inputRef.current?.focus();
            })
        }
    }, [])
  1. Add ref={inputRef} on TextInput component

What alternative solutions did you explore? (Optional)

@jayeshmangwani
Copy link
Contributor

Thanks, I am starting testing

@srikarparsi
Copy link
Contributor

PR merged, requested CP

@marcaaron
Copy link
Contributor

@luacmartins @srikarparsi please remove the deploy blocker label and check this off whenever we confirm the fix worked.

@srikarparsi
Copy link
Contributor

Fix worked

Screen.Recording.2024-10-18.at.2.00.50.PM.mov

@srikarparsi srikarparsi removed the DeployBlockerCash This issue or pull request should block deployment label Oct 18, 2024
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 18, 2024
@melvin-bot melvin-bot bot changed the title [$250] Android - Search - Keyboard does not auto open in Search modal [HOLD for payment 2024-10-25] [$250] Android - Search - Keyboard does not auto open in Search modal Oct 18, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 18, 2024
Copy link

melvin-bot bot commented Oct 18, 2024

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

Copy link

melvin-bot bot commented Oct 18, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.50-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-10-25. 🎊

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

Copy link

melvin-bot bot commented Oct 18, 2024

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:

  • [@jayeshmangwani] The PR that introduced the bug has been identified. Link to the PR:
  • [@jayeshmangwani] 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:
  • [@jayeshmangwani] 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:
  • [@jayeshmangwani] Determine if we should create a regression test for this bug.
  • [@jayeshmangwani] 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.
  • [@sakluger] 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 Oct 22, 2024
@melvin-bot melvin-bot bot changed the title [HOLD for payment 2024-10-25] [$250] Android - Search - Keyboard does not auto open in Search modal [HOLD for payment 2024-10-29] [HOLD for payment 2024-10-25] [$250] Android - Search - Keyboard does not auto open in Search modal Oct 22, 2024
Copy link

melvin-bot bot commented Oct 22, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.51-4 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-10-29. 🎊

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

Copy link

melvin-bot bot commented Oct 22, 2024

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:

  • [@jayeshmangwani] The PR that introduced the bug has been identified. Link to the PR:
  • [@jayeshmangwani] 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:
  • [@jayeshmangwani] 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:
  • [@jayeshmangwani] Determine if we should create a regression test for this bug.
  • [@jayeshmangwani] 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.
  • [@sakluger] 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 Oct 25, 2024
@sakluger
Copy link
Contributor

Weird - I'm not sure why the second payment hold was added, this was deployed to prod 7 days ago. I'll prep the payment summary.

Summarizing payment on this issue:

Contributor: @abzokhattab $250, paid via Upwork
Contributor+: @jayeshmangwani $250, please complete the BZ checklist, then request on Newdot

@jayeshmangwani
Copy link
Contributor

@jayeshmangwani
Copy link
Contributor

@sakluger I’ve checked the first two items on the checklist. For the third, I’m not sure if discussion is necessary here, as it could have been addressed in the PR review. As for items 4 and 5, I don’t think dedicated regression tests are needed.

@sakluger
Copy link
Contributor

Thanks @jayeshmangwani!

Copy link

melvin-bot bot commented Oct 28, 2024

@sakluger @luacmartins @srikarparsi Be sure to fill out the Contact List!

@garrettmknight
Copy link
Contributor

$250 approved for @jayeshmangwani

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