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] Android - Profile-After selecting pronoun, keypad remains open and shown in profile page #30527

Closed
1 of 6 tasks
lanitochka17 opened this issue Oct 27, 2023 · 11 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Weekly KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Oct 27, 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!


Version Number: 1.3.92-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: Applause - Internal Team
Slack conversation:

Action Performed:

  1. Launch app
  2. Tap profile icon
  3. Tap Profile
  4. Tap pronoun
  5. Type "The"
  6. Select a pronoun from the suggested list

Expected Result:

In pronoun page, after selecting pronoun, keypad must not be shown in profile page

Actual Result:

In pronoun page, after selecting pronoun, keypad remains open and shown in profile page until selected pronoun is shown

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
Bug6253572_1698425341533.pronoun.mp4
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01ff1fb12e6fe58887
  • Upwork Job ID: 1717948058125668352
  • Last Price Increase: 2023-10-27
@lanitochka17 lanitochka17 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 27, 2023
@melvin-bot melvin-bot bot changed the title Android - Profile-After selecting pronoun, keypad remains open and shown in profile page [$500] Android - Profile-After selecting pronoun, keypad remains open and shown in profile page Oct 27, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 27, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 27, 2023

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

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

melvin-bot bot commented Oct 27, 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
Copy link

melvin-bot bot commented Oct 27, 2023

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

@ZhenjaHorbach
Copy link
Contributor

Can't reproduce on the last main

But if there are any very specific cases, we can always add Keyboard.dismiss()
When we select pronoun

const updatePronouns = (selectedPronouns) => {
PersonalDetails.updatePronouns(selectedPronouns.keyForList === currentPronounsKey ? '' : lodashGet(selectedPronouns, 'value', ''));
};

Or call Keyboard.dismiss() when we leave the screen using

React.useEffect(() => {
    const unsubscribe = navigation.addListener('blur', () => {
        Keyboard.dismiss()
  });

  return unsubscribe;
}, [navigation]);

@Krishna2323
Copy link
Contributor

Proposal

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

Android - Profile-After selecting pronoun, keypad remains open and shown in profile page

What is the root cause of that problem?

Its not reproducible on the latest build but in this issue, it was reproducible in the newer builds, so I think it should be fixed here also.

The root cause is the use of keyboardShouldPersistTaps="always" on SectionList used in the BaseOptionsList. This property essentially dictates that the keyboard should remain open even after a tap on the screen (like selecting an any result).
This is a known issue in react native facebook/react-native#17252

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

We already faced this issue many times before, I think we should remove keyboard before going away from the screen and it should be done in the BaseSelectionList component.

We should compose BaseSelectionList with withNavigation and use it like:

const keyboardState = useKeyboardState();

useEffect(() => {
    // We need to have this prop to remove keyboard before going away from the screen, to avoid previous screen look weird for a brief moment,.
    // described here https://reactnavigation.org/docs/preventing-going-back/#limitations
    const beforeRemoveSubscription = navigation.addListener('blur', () => {
        if (!keyboardState) {
            return;
        }
        Keyboard.dismiss();
    });

    return beforeRemoveSubscription;
}, []);

Result

@bernhardoj
Copy link
Contributor

I think this will be fixed in #30268

@melvin-bot melvin-bot bot added the Overdue label Oct 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 31, 2023

@puneetlath, @sobitneupane Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@puneetlath puneetlath changed the title [$500] Android - Profile-After selecting pronoun, keypad remains open and shown in profile page [HOLD #30268] [$500] Android - Profile-After selecting pronoun, keypad remains open and shown in profile page Oct 31, 2023
@puneetlath puneetlath added Weekly KSv2 and removed Daily KSv2 labels Oct 31, 2023
@melvin-bot melvin-bot bot removed the Overdue label Oct 31, 2023
@melvin-bot melvin-bot bot added the Overdue label Nov 9, 2023
@puneetlath
Copy link
Contributor

Still on hold.

@melvin-bot melvin-bot bot removed the Overdue label Nov 21, 2023
@puneetlath puneetlath changed the title [HOLD #30268] [$500] Android - Profile-After selecting pronoun, keypad remains open and shown in profile page [$500] Android - Profile-After selecting pronoun, keypad remains open and shown in profile page Nov 21, 2023
@puneetlath
Copy link
Contributor

Looks like this is no longer blocked actually. I asked QA to re-test it.

@puneetlath
Copy link
Contributor

Looks like #30268 fixed it. Closing!

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. External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Weekly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants