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-06-13] [$1000] Chat - Thread - Keyboard does not open when click of reply in thread #19558

Closed
1 of 6 tasks
kbecciv opened this issue May 24, 2023 · 134 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 Internal Requires API changes or must be handled by Expensify staff

Comments

@kbecciv
Copy link

kbecciv commented May 24, 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!


Action Performed:

  1. Go to any chat
  2. Click on reply in thread

Expected Result:

Keyboard opens when click of reply in thread

Actual Result:

Keyboard does not open when click of reply in thread

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.17.2

Reproducible in staging?: yes

Reproducible in production?: yes

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

Notes/Photos/Videos: Any additional supporting documentation

Screen_Recording_20230519_085144_Chrome.mp4
Screen_Recording_20230524_170020_New.Expensify.mp4

Expensify/Expensify Issue URL:

Issue reported by: Manan Gadhiya (non GH)

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1684466830344199

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01bb2845ef5dc4bb85
  • Upwork Job ID: 1663649941210693632
  • Last Price Increase: 2023-06-20
Issue OwnerCurrent Issue Owner: @adelekennedy
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 24, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 24, 2023

Triggered auto assignment to @tjferriss (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented May 24, 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

@melvin-bot melvin-bot bot added the Overdue label May 29, 2023
@bernhardoj
Copy link
Contributor

Looks like we don't auto focus when we open a chat anymore.

@melvin-bot
Copy link

melvin-bot bot commented May 30, 2023

@tjferriss Huh... This is 4 days overdue. Who can take care of this?

@tjferriss tjferriss added the External Added to denote the issue can be worked on by a contributor label May 30, 2023
@melvin-bot melvin-bot bot changed the title Chat - Thread - Keyboard does not open when click of reply in thread [$1000] Chat - Thread - Keyboard does not open when click of reply in thread May 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 30, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 30, 2023

Triggered auto assignment to @anmurali (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@melvin-bot
Copy link

melvin-bot bot commented May 30, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 30, 2023
@tjferriss
Copy link
Contributor

Whoops, I forgot to throw the External label on this one.

@melvin-bot
Copy link

melvin-bot bot commented May 30, 2023

Triggered auto assignment to @johnmlee101 (External), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@melvin-bot melvin-bot bot removed the Overdue label May 30, 2023
@rvenky125
Copy link

I willing to try it out. But, how can I run it in my Windows System. The .sh files are running in windows machine which are executing by running yarn run android.

@melvin-bot
Copy link

melvin-bot bot commented Jun 1, 2023

📣 @rvenky125! 📣
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. 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.
  2. 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.
  3. 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>

@rvenky125
Copy link

Contributor details
Your Expensify account email: venkypaithireddy@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~014e86511f26b3d333

@melvin-bot
Copy link

melvin-bot bot commented Jun 1, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@rvenky125
Copy link

I willing to try it out. But, how can I run it in my Windows System. The .sh files are running in windows machine which are executing by running yarn run android.

Can any one guide me to run the project on android in windows environment.

@Nodebrute
Copy link
Contributor

Proposal

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

The keyboard does not open when clicking on reply in the thread

What is the root cause of that problem?

React Native utilizes asynchronous rendering, which means that updates to the UI and layout calculations may not occur immediately. By introducing a small delay with setTimeout, you allow the rendering and layout to catch up, ensuring that the keyboard opening is triggered at the appropriate time.

It appears that setting the focus on a TextInput component in React Native successfully brings the focus to the input field, but the keyboard doesn't open automatically. This behavior might resemble a known issue, although the exact reproduction steps may vary. Some developers have reported success by using setTimeout to introduce a slight delay before focusing on the input field, which triggers the keyboard to open.

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

I solved this issue using a timeout in ReportActionCompose's ComponentDidMount. It works smoothly.

What alternative solutions did you explore? (Optional)

N/A

@melvin-bot
Copy link

melvin-bot bot commented Jun 1, 2023

📣 @Nodebrute! 📣
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. 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.
  2. 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.
  3. 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>

@melvin-bot
Copy link

melvin-bot bot commented Jun 1, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@rvenky125
Copy link

Proposal

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

The keyboard does not open when clicking on reply in the thread

What is the root cause of that problem?

In some situations the keyboard may not open even if the text input is focused. So you can fix this issue by blurring and focusing again the text input.

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

If the keyboard still not opens while focusing the text input then you can blur the text input by calling
textInputRef.current.blur() method. After that focus the text input again by calling textInputRef.current.blur().
You can check for the keyboard whether it has opened or not by adding listener to the keyboard.

import { useEffect, useState } from "react";
import { Keyboard } from "react-native";

const useIsKeyboardVisible = () => {
const [isKeyboardVisible, setKeyboardVisible] = useState(false);

useEffect(() => {
  const keyboardDidShowListener = Keyboard.addListener(
    'keyboardDidShow',
    () => {
      setKeyboardVisible(true); // or some other action
    },
  );
  const keyboardDidHideListener = Keyboard.addListener(
    'keyboardDidHide',
    () => {
      // console.log('Hide keyboard');
      setKeyboardVisible(false); // or some other action
    },
  );

  return () => {
    keyboardDidHideListener.remove();
    keyboardDidShowListener.remove();
  };
}, []);

 return isKeyboardVisible;
 };

 export default useIsKeyboardVisible;

Use this function inside the chat screen as const isKeyboardVisible = useIsKeyboardVisible().
you can blur the text input, focus it again if isKeyboardVisible is false with some delay using setTimeout

What alternative solutions did you explore? (Optional)

@adelekennedy
Copy link

Bump @mollfpr

@melvin-bot melvin-bot bot removed the Overdue label Apr 29, 2024
@mollfpr
Copy link
Contributor

mollfpr commented Apr 29, 2024

Thanks @bernhardoj!

@adelekennedy @bernhardoj I think we can continue with the PR now. @johnmlee101 Do you have a question about the proposal?

@adelekennedy adelekennedy changed the title [HOLD] [$1000] Chat - Thread - Keyboard does not open when click of reply in thread [$1000] Chat - Thread - Keyboard does not open when click of reply in thread Apr 29, 2024
@bernhardoj
Copy link
Contributor

Should I open the PR now or wait for @johnmlee101?

@johnmlee101
Copy link
Contributor

I think that's fine, let's go with the same shared logic as from ReportUtils.shouldReportBeInOptionList.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels May 1, 2024
@bernhardoj
Copy link
Contributor

PR is ready

cc: @mollfpr

@adelekennedy
Copy link

I think we're just waiting for John's review here

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jun 6, 2024
@melvin-bot melvin-bot bot changed the title [$1000] Chat - Thread - Keyboard does not open when click of reply in thread [HOLD for payment 2024-06-13] [$1000] Chat - Thread - Keyboard does not open when click of reply in thread Jun 6, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 6, 2024
Copy link

melvin-bot bot commented Jun 6, 2024

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

Copy link

melvin-bot bot commented Jun 6, 2024

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

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

  • @mollfpr requires payment through NewDot Manual Requests
  • @bernhardoj requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented Jun 6, 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:

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

mollfpr commented Jun 13, 2024

[@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
[@mollfpr] 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:

No offending PR.

[@mollfpr] 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:

The regression step should be enough.

[@mollfpr] Determine if we should create a regression test for this bug.
[@mollfpr] 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.

  1. Open a chat with an existing message
  2. Verify the composer (if android/iOS/mWeb) isn't focused (if web/desktop) is focused
  3. Send a message
  4. Reply in a thread of the message
  5. Verify the composer is focused and a keyboard is shown for mobile devices (except mWeb Safari because of this [$250] Safari mWeb - Keyboard won't open for some inputs (New Chat, Change Password, New Room) #10414)
  6. 👍 or 👎

@adelekennedy Could you give the payment summary? Thank you!

Copy link

melvin-bot bot commented Jun 13, 2024

Payment Summary

Upwork Job

BugZero Checklist (@adelekennedy)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified that there are no duplicate or incorrect contracts on Upwork for this job (https://www.upwork.com/ab/applicants/1663649941210693632/hired)
  • I have paid out the Upwork contracts or cancelled the ones that are incorrect
  • I have verified the payment summary above is correct

@adelekennedy
Copy link

adelekennedy commented Jun 14, 2024

Ugh - Upwork won't let me reuse the original job posting so I've just created a new job and sent an offer to @bernhardoj

Payouts due:

Upwork job is here.

@bernhardoj
Copy link
Contributor

Accepted

@JmillsExpensify
Copy link

$1,000 approved for @mollfpr

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 Internal Requires API changes or must be handled by Expensify staff
Projects
No open projects
Archived in project
Development

No branches or pull requests