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

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

Open
2 of 8 tasks
IuliiaHerets opened this issue Oct 22, 2024 · 13 comments
Open
2 of 8 tasks
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 Reviewing Has a PR in review 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

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 Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

7 participants