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

[Awaiting checklist] [$250] Contact method - Keyboard not opened when navigating to enter magic code step #51279

Closed
2 of 8 tasks
IuliiaHerets opened this issue Oct 22, 2024 · 23 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Oct 22, 2024

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: 9.0.52.1
Reproducible in staging?: Y
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y
Issue was found when executing this PR: #49445
Issue reported by: Applause Internal Team

Action Performed:

  1. Open the app and log in
  2. Navigate to the account settings > Profile > Contact method
  3. Tap the New contact method button
  4. Enter an email that will be used as a secondary login
  5. Proceed to the magic code step

Expected Result:

The keyboard is opened automatically

Actual Result:

The keyboard is not opened automatically

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6642245_1729612995396.video_2024-10-22_12-03-06.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021848790071589041805
  • Upwork Job ID: 1848790071589041805
  • Last Price Increase: 2024-10-22
Issue OwnerCurrent Issue Owner: @Ollyws
@IuliiaHerets IuliiaHerets added DeployBlockerCash This issue or pull request should block deployment Bug Something is broken. Auto assigns a BugZero manager. labels Oct 22, 2024
Copy link

melvin-bot bot commented Oct 22, 2024

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

Copy link

melvin-bot bot commented Oct 22, 2024

Triggered auto assignment to @twisterdotcom (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 22, 2024

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

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

@cead22
Copy link
Contributor

cead22 commented Oct 22, 2024

I couldn't reproduce on iOS native, but regardless, this doesn't need to be a blocker

@cead22 cead22 added Daily KSv2 External Added to denote the issue can be worked on by a contributor and removed Hourly KSv2 DeployBlockerCash This issue or pull request should block deployment labels Oct 22, 2024
@melvin-bot melvin-bot bot changed the title Contact method - Keyboard not opened when navigating to enter magic code step [$250] Contact method - Keyboard not opened when navigating to enter magic code step Oct 22, 2024
Copy link

melvin-bot bot commented Oct 22, 2024

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

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

melvin-bot bot commented Oct 22, 2024

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

@Krishna2323
Copy link
Contributor

Krishna2323 commented Oct 22, 2024

Edited by proposal-police: This proposal was edited at 2024-10-22 18:28:34 UTC.

Proposal


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

Contact method - Keyboard not opened when navigating to enter magic code step

What is the root cause of that problem?

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


  • We should use useAutoFocusInput callback.
  • We can use mergeRefs.

What alternative solutions did you explore? (Optional)

Result

@truph01
Copy link
Contributor

truph01 commented Oct 22, 2024

I cannot reproduce in latest main

@bernhardoj
Copy link
Contributor

Proposal

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

Keyboard doesn't open when open the magic code step on Android.

What is the root cause of that problem?

It's a common issue on Android where we need a delay in focusing and showing the keyboard. We already do that here.

useFocusEffect(
useCallback(() => {
if (!inputValidateCodeRef.current) {
return;
}
if (focusTimeoutRef.current) {
clearTimeout(focusTimeoutRef.current);
}
focusTimeoutRef.current = setTimeout(() => {
inputValidateCodeRef.current?.focusLastSelected();
}, CONST.ANIMATED_TRANSITION);
return () => {
if (!focusTimeoutRef.current) {
return;
}
clearTimeout(focusTimeoutRef.current);
};
}, []),
);

However, it's useless because we set autoFocus to the magic code input without shouldDelayFocus, so the input is focused immediately.

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

Since we already handle the focus manually (so it's focused whenever the screen is re-focused), we can set the autoFocus to false.

autoFocus={false}

@Ollyws
Copy link
Contributor

Ollyws commented Oct 24, 2024

@bernhardoj's solution LGTM.
🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Oct 24, 2024

Current assignee @cead22 is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 24, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Oct 25, 2024
@bernhardoj
Copy link
Contributor

PR is ready

cc: @Ollyws

@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, 2024
@melvin-bot melvin-bot bot changed the title [$250] Contact method - Keyboard not opened when navigating to enter magic code step [HOLD for payment 2024-11-22] [$250] Contact method - Keyboard not opened when navigating to enter magic code step Nov 15, 2024
Copy link

melvin-bot bot commented Nov 15, 2024

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Nov 15, 2024
Copy link

melvin-bot bot commented Nov 15, 2024

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

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

  • @Ollyws requires payment through NewDot Manual Requests
  • @bernhardoj requires payment through NewDot Manual Requests

Copy link

melvin-bot bot commented Nov 15, 2024

@Ollyws @twisterdotcom @Ollyws 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]

@twisterdotcom
Copy link
Contributor

Payment Summary:

  • @Ollyws paid $250 via NewDot Manual Request
  • @bernhardoj paid $250 via NewDot Manual Request

@twisterdotcom
Copy link
Contributor

Waiting on the checklist now @Ollyws.

@twisterdotcom twisterdotcom removed the Awaiting Payment Auto-added when associated PR is deployed to production label Nov 22, 2024
@twisterdotcom twisterdotcom changed the title [HOLD for payment 2024-11-22] [$250] Contact method - Keyboard not opened when navigating to enter magic code step [Awaiting checklist] [$250] Contact method - Keyboard not opened when navigating to enter magic code step Nov 22, 2024
@bernhardoj
Copy link
Contributor

Requested in ND.

@JmillsExpensify
Copy link

$250 approved for @bernhardoj

@Ollyws
Copy link
Contributor

Ollyws commented Nov 25, 2024

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other:

Where bug was reported:

  • 2a. Reported on production
  • 2b. Reported on staging (deploy blocker)
  • 2c. Reported on both staging and production
  • 2d. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other:
  • [Contributor] 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/49445/files#r1857315081

  • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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:

  • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

Regression Test Proposal Template
  • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue:

Regression Test Proposal

Precondition:

Test:

1. Open settings > Profile > Contact method
2. Tap the New contact method button
3. Enter any email that will be used as a secondary login
4. Press on anywhere to close the keyboard
5. Proceed to the magic code step
6. Verify the magic code input is focused and a keyboard is shown (mobile)

Do we agree 👍 or 👎

@Ollyws
Copy link
Contributor

Ollyws commented Nov 25, 2024

Requested in ND.

@garrettmknight
Copy link
Contributor

$250 approved for @Ollyws

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

9 participants