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] iOS - RHP- Keyboard persist when user opened chat and navigated on Profile via QR Code or share link #36003

Closed
1 of 6 tasks
izarutskaya opened this issue Feb 7, 2024 · 28 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

@izarutskaya
Copy link

izarutskaya commented Feb 7, 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: 1.4.37-7
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: Applause-Internal Team
Slack conversation:

Action Performed:

  1. Open app
  2. Navigate to any chat
  3. Tap on the compose box
  4. Open camera app
  5. Scan the Profile QR code of different user

Expected Result:

Profile page should be properly displayed

Actual Result:

Keyboard persist when user opened the chat and then navigated on profile page

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

Bug6370182_1707299989099.RPReplay_Final1707273030.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01f5e97312ab13244c
  • Upwork Job ID: 1755180155710287872
  • Last Price Increase: 2024-02-14
  • Automatic offers:
    • situchan | Contributor | 0
    • akinwale | Contributor | 0
Issue OwnerCurrent Issue Owner: @situchan
Issue OwnerCurrent Issue Owner: @situchan
@izarutskaya izarutskaya 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 Feb 7, 2024
@melvin-bot melvin-bot bot changed the title iOS - RHP- Keyboard persist when user opened chat and navigated on Profile via QR Code or share link [$500] iOS - RHP- Keyboard persist when user opened chat and navigated on Profile via QR Code or share link Feb 7, 2024
Copy link

melvin-bot bot commented Feb 7, 2024

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

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

melvin-bot bot commented Feb 7, 2024

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

Copy link

melvin-bot bot commented Feb 7, 2024

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

@akinwale
Copy link
Contributor

akinwale commented Feb 7, 2024

Proposal

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

The soft keyboard shows up when navigating to a profile using a QR Code or share link from the chat report that is already open.

What is the root cause of that problem?

In ComposerWithSuggestions, we have certain conditions being checked for the shouldAutoFocus flag. There is an instant where this returns true when navigation is about to open the profile page, because the modal is not considered visible at this point.

const shouldAutoFocus = !modal.isVisible && (shouldFocusInputOnScreenFocus || (isEmptyChat && !ReportActionsUtils.isTransactionThread(parentReportAction))) && shouldShowComposeInput;

The issue is also reproducible by trying to open the URI scheme of a user profile when their corresponding chat report is the current active window. The command to do this with an example profile is: npx uri-scheme open new-expensify://a/16292980 --ios

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

We can add an extra condition using the isFocused hook to make sure that the composer is visible on the current screen before the shouldAutoFocus flag is set to true.

-const shouldAutoFocus = !modal.isVisible && (shouldFocusInputOnScreenFocus || (isEmptyChat && !ReportActionsUtils.isTransactionThread(parentReportAction))) && shouldShowComposeInput;
+const shouldAutoFocus = !modal.isVisible && isFocused && (shouldFocusInputOnScreenFocus || (isEmptyChat && !ReportActionsUtils.isTransactionThread(parentReportAction))) && shouldShowComposeInput;

What alternative solutions did you explore? (Optional)

None.

@akinwale
Copy link
Contributor

akinwale commented Feb 7, 2024

Proposal

Updated

@melvin-bot melvin-bot bot added the Overdue label Feb 9, 2024
Copy link

melvin-bot bot commented Feb 12, 2024

@anmurali, @thesahindia Huh... This is 4 days overdue. Who can take care of this?

@akinwale
Copy link
Contributor

@thesahindia Did you get a chance to review my proposal yet?

@anmurali
Copy link

@thesahindia - bump on the above.

@melvin-bot melvin-bot bot removed the Overdue label Feb 13, 2024
Copy link

melvin-bot bot commented Feb 14, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@thesahindia
Copy link
Member

thesahindia commented Feb 15, 2024

Sorry! I am having issue building the app on my physical device. I think it will be better to assign someone else. Please reassign @anmurali.

@thesahindia thesahindia removed their assignment Feb 15, 2024
@anmurali anmurali removed the Bug Something is broken. Auto assigns a BugZero manager. label Feb 16, 2024
@anmurali anmurali removed their assignment Feb 16, 2024
@anmurali anmurali added the Bug Something is broken. Auto assigns a BugZero manager. label Feb 16, 2024
@anmurali
Copy link

Rotated the label since I will be OOO till 29th! I can take it back when I return!
But that will also get us a new C+ here

Copy link

melvin-bot bot commented Feb 16, 2024

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

@anmurali anmurali added Help Wanted Apply this label when an issue is open to proposals by contributors and removed Help Wanted Apply this label when an issue is open to proposals by contributors labels Feb 16, 2024
@anmurali
Copy link

@mallenexpensify rotating bug and help wanted didn't assign a new C+. You will need to ask manually in the C+ slack channel and get this assigned! Thank you.

@anmurali anmurali self-assigned this Feb 16, 2024
@melvin-bot melvin-bot bot added Overdue and removed Help Wanted Apply this label when an issue is open to proposals by contributors labels Feb 18, 2024
Copy link

melvin-bot bot commented Feb 18, 2024

📣 @situchan 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@mallenexpensify
Copy link
Contributor

Assigned to @situchan , please review the proposal above, thx

@melvin-bot melvin-bot bot removed the Overdue label Feb 18, 2024
@akinwale
Copy link
Contributor

@situchan Just to note here, this is also reproducible without having to use a physical device. Quoting from my proposal:

The issue is also reproducible by trying to open the URI scheme of a user profile when their corresponding chat report is the current active window. The command to do this with an example profile is: npx uri-scheme open new-expensify://a/16292980 --ios

@situchan
Copy link
Contributor

Thanks. xcrun simctl openurl booted 'new-expensify://a/16292980' also works

autofocus.mov

@situchan
Copy link
Contributor

@akinwale's proposal looks good to me.
🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Feb 19, 2024

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

Copy link

melvin-bot bot commented Feb 20, 2024

📣 @akinwale 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@akinwale
Copy link
Contributor

@situchan My PR is ready for review. Thanks.

@situchan
Copy link
Contributor

situchan commented Mar 6, 2024

PR was deployed to production on Feb 28

@mallenexpensify
Copy link
Contributor

@situchan, we want a regression test for this, right? Below is the checklist, it didn't auto-populate for some reason.

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:

  • The PR that introduced the bug has been identified. Link to the PR:
  • 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:
  • 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:
  • 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.
  • Link the GH issue for creating/updating the regression test once above steps have been agreed upon:
  • [ ]

@mallenexpensify
Copy link
Contributor

Contributor: @akinwale paid $500 via Upwork
Contributor+: @situchan paid $500 via Upwork

@mallenexpensify mallenexpensify added Daily KSv2 and removed Reviewing Has a PR in review Weekly KSv2 labels Mar 10, 2024
Copy link

melvin-bot bot commented Mar 14, 2024

@akinwale, @anmurali, @mallenexpensify, @thienlnam, @situchan Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Mar 14, 2024
@situchan
Copy link
Contributor

I haven't found any culprit PR. I think this bug existed for long time and just not caught as unusual case.
This was caught by QA team so I don't think new regression test is needed here.

@melvin-bot melvin-bot bot removed the Overdue label Mar 15, 2024
@mallenexpensify
Copy link
Contributor

@situchan , most bugs are created by QA/Applause and most end up with new or updated regression tests.
Unless you're 100% sure we don't need one, it's best practice to err on the side of creating one because QA can easily close if it' not needed. Created one for this issue.

Thx

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

7 participants