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

[$500] The keyboard closes after a moment when tapping back button #30268

Closed
1 of 6 tasks
m-natarajan opened this issue Oct 24, 2023 · 20 comments
Closed
1 of 6 tasks

[$500] The keyboard closes after a moment when tapping back button #30268

m-natarajan opened this issue Oct 24, 2023 · 20 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@m-natarajan
Copy link

m-natarajan commented Oct 24, 2023

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: 1.3.90-1
Reproducible in staging?: y
Reproducible in production?: y
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: @makievans
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1698079567043719

Action Performed:

  1. Open the app
  2. Open any chat
  3. Click the input field to open the keyboard
  4. Click the go back arrow

Expected Result:

The keyboard should close before going back

Actual Result:

The keyboard persists and it closes after going back

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

Android: Native
android_native.mp4
az_recorder_20231024_105859.1.mp4
Android: mWeb Chrome
Android-mWeb.Chrome.mp4
iOS: Native
iOS_native.mp4
iOS: mWeb Safari
iOS-mWeb.Safari.mp4
MacOS: Chrome / Safari
MacOS: Desktop

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~019f12941ee08ff92e
  • Upwork Job ID: 1716845606976106496
  • Last Price Increase: 2023-10-24
Issue OwnerCurrent Issue Owner: @garrettmknight
@m-natarajan m-natarajan added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 24, 2023
@melvin-bot melvin-bot bot changed the title The keyboard closes after a moment when tapping back button [$500] The keyboard closes after a moment when tapping back button Oct 24, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 24, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 24, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 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 Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 24, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 24, 2023

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

@tienifr
Copy link
Contributor

tienifr commented Oct 24, 2023

Proposal

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

The keyboard persists and it closes after going back

What is the root cause of that problem?

We already attempted to handle this issue here by dismissing the keyboard when the screen is removed.

However, the isKeyboardShown state that we're using is not in the useEffect dependencies list, so it keeps using the outdated value of isKeyboardShown which is always false. So our logic here doesn't work.

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

Since the isKeyboardShown is not needed as any dependency for rendering, we can make it a ref and use it in ScreenWrapper where it's needed.

const isKeyboardShownRef = useRef();

isKeyboardShownRef.current = lodashGet(keyboardState, 'isKeyboardShown', false);

This will make sure the value of isKeyboardShownRef.current (aka isKeyboardShown) is always up to date when used.

What alternative solutions did you explore? (Optional)

We can put isKeyboardShown to the dependencies list of the useEffect. But I don't prefer this since it will cause a lot of re-rendering for that useEffect.

@melvin-bot melvin-bot bot added the Overdue label Oct 26, 2023
@garrettmknight
Copy link
Contributor

Reproduced, it's definitely slow - @allroundexperts does that proposal look viable? Alternatively, do you know if we're working on this anywhere else?

@melvin-bot melvin-bot bot removed the Overdue label Oct 26, 2023
@allroundexperts
Copy link
Contributor

@tienifr's proposal looks good!

Screen.Recording.2023-10-27.at.12.07.22.AM.mov

🎀 👀 🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Oct 26, 2023

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

@puneetlath
Copy link
Contributor

What's the story with this issue? Are we going forward?

@allroundexperts
Copy link
Contributor

The PR seems to have been deployed to production some time ago. Looks like the automation failed here?

@puneetlath
Copy link
Contributor

Ah ok cool. So this is done and @garrettmknight just needs to pay out, is that right? Asking because we have some other issues blocked on this one.

@allroundexperts
Copy link
Contributor

I think so, yes.

@melvin-bot melvin-bot bot added Monthly KSv2 and removed Weekly KSv2 labels Nov 22, 2023
Copy link

melvin-bot bot commented Nov 22, 2023

This issue has not been updated in over 15 days. @garrettmknight, @arosiclair, @allroundexperts, @tienifr eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@arosiclair arosiclair added Daily KSv2 and removed Reviewing Has a PR in review Monthly KSv2 labels Nov 22, 2023
@laurenreidexpensify
Copy link
Contributor

Payment Summary:

Bug Report - @makievans - $50 offer sent in Upwork
Contributor - @tienifr $500, offer sent in Upwork
C+ Review - @allroundexperts $500, please request payment in newdot

@laurenreidexpensify
Copy link
Contributor

Payment Summary:

Bug Report - @makievans - $50 payment issued in Upwork
Contributor - @tienifr $500, payment issued in Upwork
C+ Review - @allroundexperts $500, please request payment in newdot

@laurenreidexpensify
Copy link
Contributor

@allroundexperts can you please complete checklist / confirm if this requires a regression test thanks

@allroundexperts
Copy link
Contributor

Checklist

  1. RequestorStep: Fix forward ref #28454
  2. https://github.com/Expensify/App/pull/28454/files#r1405484233
  3. N/A
  4. A checklist would be helpful here. The steps mentioned in the OP look simple and clear enough to me!

@melvin-bot melvin-bot bot added the Overdue label Nov 26, 2023
Copy link

melvin-bot bot commented Nov 27, 2023

@garrettmknight, @arosiclair, @allroundexperts, @tienifr Whoops! This issue is 2 days overdue. Let's get this updated quick!

@garrettmknight
Copy link
Contributor

QA added

@JmillsExpensify
Copy link

$500 payment approved for @allroundexperts based on this comment.

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. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

8 participants