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-01-18] [$500] Group - Closed keyboard opens again after adding a user to a group #29003

Closed
2 of 6 tasks
lanitochka17 opened this issue Oct 6, 2023 · 45 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 External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Oct 6, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Open iOS or Android App
  2. Login with any account
  3. Tap on FAB
  4. Tap on "Send Message"
  5. Tap on the search input so the keyboard is opened
  6. Select a any user tapping on "Add to group"
  7. Verify the keyboard is not closed or reopened after selecting an user
  8. Close the keyboard by defocusing the input
  9. Select a member

Expected Result:

Keyboard is NOT opened again

Actual Result:

Keyboard opens again

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.79-3

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

Bug6227636_1696603414371.iOS-closed-keyboard-open-after-add-user.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01efe6ff17fc35d91a
  • Upwork Job ID: 1727102793349758976
  • Last Price Increase: 2023-12-05
  • Automatic offers:
    • situchan | Contributor | 28012342
    • honnamkuan | Contributor | 28066723
Issue OwnerCurrent Issue Owner: @honnamkuan
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 6, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 6, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 6, 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 Oct 9, 2023
@alexpensify
Copy link
Contributor

I'm OOO today but will test soon

@alexpensify
Copy link
Contributor

Still on my testing list, other GHs have taken priority.

@alexpensify
Copy link
Contributor

I've run out of time and will have to test over the weekend.

@honnamkuan
Copy link
Contributor

Proposal

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

On mobile devices native app, whenever user click on "Add to group" button in Send Message page, the search input is refocused, and opens up the keyboard.
If user click on the screen to dismiss the keyboard and click on "Add to group", again the keyboard pops up.

That causes unpleasant UX for user who would like to add several people to a group, but the recipient list is partially blocked by the keyboard.

This issue does not happen in mobile browsers.

What is the root cause of that problem?

Currently in BaseOptionsSelector.js we have props.shouldPreventDefaultFocusOnSelectRow which should be:

  • set to true if we want to prevent focus on the row, and apply refocus on the search text input upon row click.
  • set to false if we want to allow focus on the row, and do not focus on search text input.

addToSelection(option) {
if (this.props.shouldShowTextInput && this.props.shouldPreventDefaultFocusOnSelectRow) {

In NewChatPage.js, it is now passed in as shouldPreventDefaultFocusOnSelectRow={!Browser.isMobile()}

shouldPreventDefaultFocusOnSelectRow={!Browser.isMobile()}

This works well to prevent input refocusing on mobile device browser, but not native platforms i.e IOS / Android, because Browser.isMobile() would returns false for native platform, applying ! on it means we have shouldPreventDefaultFocusOnSelectRow={true}.
Hance whenever the "Add to group" button is pressed, the search input is refocussed, and keyboard pops out.

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

We need to change

shouldPreventDefaultFocusOnSelectRow={!Browser.isMobile()}

From shouldPreventDefaultFocusOnSelectRow={!Browser.isMobile()} to shouldPreventDefaultFocusOnSelectRow={!DeviceCapabilities.canUseTouchScreen()}

That will allow search input refocusing for Desktop/Web, but disable it for Mobile Web / IOS / Android.

Identifical changes should be applied to other pages which is currently using shouldPreventDefaultFocusOnSelectRow={!Browser.isMobile()}

What alternative solutions did you explore? (Optional)

I have considered using other option like isSmallScreenWidth , getPlatform as well. But I think it is cleaner to use canUseTouchScreen

@alexpensify
Copy link
Contributor

Closing - I tested this experience on my Android device and was unable to replicate it.

@honnamkuan
Copy link
Contributor

@alexpensify I am still able to reproduce the issue on latest main using Android and IOS.
Android recording for reference:

Screen.Recording.2023-10-16.at.5.21.37.PM.mov

For ease of comparison, here is how it is for mobile Chrome which is not affected by the reported bug.

Screen.Recording.2023-10-16.at.5.32.46.PM.mov

@honnamkuan
Copy link
Contributor

@alexpensify just wondering if you manage to have a look at my comment above?

Issue can still be still replicated.

@alexpensify
Copy link
Contributor

alexpensify commented Oct 23, 2023

@honnamkuan - thanks for the bump, sorry I missed this one. I'll test again soon.

@alexpensify
Copy link
Contributor

I haven't had time to test but will review when I'm back from OOO.

@izarutskaya
Copy link

Issue is reproducible on latest build - 1.4.1-4

RPReplay_Final1700545435.mp4

@izarutskaya izarutskaya reopened this Nov 21, 2023
@alexpensify alexpensify added the External Added to denote the issue can be worked on by a contributor label Nov 21, 2023
@melvin-bot melvin-bot bot changed the title Group - Closed keyboard opens again after adding a user to a group [$500] Group - Closed keyboard opens again after adding a user to a group Nov 21, 2023
Copy link

melvin-bot bot commented Nov 21, 2023

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

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

melvin-bot bot commented Nov 21, 2023

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

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

melvin-bot bot commented Nov 27, 2023

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

@alexpensify
Copy link
Contributor

@eVoloshchak - will the past proposals work to fix this issue? Thanks for reviewing.

@melvin-bot melvin-bot bot removed the Overdue label Nov 27, 2023
@melvin-bot melvin-bot bot removed the Overdue label Dec 18, 2023
@situchan
Copy link
Contributor

@honnamkuan's proposal with canUseTouchScreen solution looks good to me.
The behavior of mWeb and native should be consistent.
🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Dec 19, 2023

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

@alexpensify
Copy link
Contributor

@madmax330 - we need a review here, thanks!

Copy link

melvin-bot bot commented Dec 21, 2023

📣 @honnamkuan 🎉 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 📖

@honnamkuan
Copy link
Contributor

Thank you, I have accepted the offer, will get the PR ready by tomorrow

@alexpensify
Copy link
Contributor

alexpensify commented Dec 23, 2023

Heads up, I will be offline from Friday, December 22, to Thursday, January 4, 2024. I will not be actively watching over this GitHub during that period. If anything urgent is needed here, please ask for help in the #expensify-open-source Slack Room-- thanks!

@alexpensify
Copy link
Contributor

I'm back online again and it looks like this PR is moving along.

@alexpensify
Copy link
Contributor

Just waiting for this PR to go into production now.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jan 11, 2024
@melvin-bot melvin-bot bot changed the title [$500] Group - Closed keyboard opens again after adding a user to a group [HOLD for payment 2024-01-18] [$500] Group - Closed keyboard opens again after adding a user to a group Jan 11, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jan 11, 2024
Copy link

melvin-bot bot commented Jan 11, 2024

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

Copy link

melvin-bot bot commented Jan 11, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.24-3 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-01-18. 🎊

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

Copy link

melvin-bot bot commented Jan 11, 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:

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

alexpensify commented Jan 17, 2024

To prepare for the payment date, @situchan - can you please update the checklist:

#29003 (comment)

Thanks!

@situchan
Copy link
Contributor

This was inconsistency between platforms rather than bug and implemented the way it is from the beginning.
No PR caused regression.
As this was caught by QA team, we can skip regression test.

@alexpensify
Copy link
Contributor

Here is the payment summary:

  • External issue reporter N/A
  • Contributor that fixed the issue - @honnamkuan $500
  • Contributor+ that helped on the issue and/or PR - @situchan $500

Upwork Job: https://www.upwork.com/jobs/~01efe6ff17fc35d91a

@alexpensify
Copy link
Contributor

Alright, everyone has been paid in Upwork. Closing!

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

No branches or pull requests

7 participants