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

[Bug] [$250] Android - Invite members - Invite message text box disappears when select emoji picker #10609

Closed
kbecciv opened this issue Aug 26, 2022 · 20 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Engineering External Added to denote the issue can be worked on by a contributor Monthly KSv2 Reviewing Has a PR in review

Comments

@kbecciv
Copy link

kbecciv commented Aug 26, 2022

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. Open the test app
  2. Log in to applause.expensifail account
  3. Navigate to the Workspace editor page
  4. Navigate to Manage Members
  5. Tap the Invite button
  6. Select the Invite message text box
  7. Select emoji picker

Expected Result:

Invite message text box is still visible when selecting the emoji picker

Actual Result:

Invite message text box disappears when selecting the emoji picker

Workaround:

Unknown

Platform:

Where is this issue occurring?

  • Android

Version Number: 1.1.92.0

Reproducible in staging?: Yes

Reproducible in production?: Yes

Email or phone of affected tester (no customers): any

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation

Bug5705895_screen-20220826-224227.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

@melvin-bot
Copy link

melvin-bot bot commented Aug 26, 2022

Triggered auto assignment to @nkuoch (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@parasharrajat
Copy link
Member

Lol. Good catch...

@nkuoch nkuoch removed their assignment Aug 26, 2022
@nkuoch nkuoch added the External Added to denote the issue can be worked on by a contributor label Aug 26, 2022
@melvin-bot
Copy link

melvin-bot bot commented Aug 26, 2022

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

@kakajann
Copy link
Contributor

Proposal

This is the KeyboardAvoidingView bug when you set its behavior to height.

Solution

We have to make this behavior undefined when we use this component in WorkspaceInvitePage on Android.

<KeyboardAvoidingView style={[styles.w100, styles.h100]} behavior={this.props.keyboardAvoidingViewBehavior}>

We can't simply add the prop (keyboardAvoidingViewBehavior={undefined}) to this component:


because undefined will be treated as height due to this line:
defaultProps.keyboardAvoidingViewBehavior = 'height';

So, how to fix?

  1. Add default to keyboardAvoidingViewBehavior in ScreenWrapper prop types
-    keyboardAvoidingViewBehavior: PropTypes.oneOf(['padding', 'height', 'position']),
+    keyboardAvoidingViewBehavior: PropTypes.oneOf(['default', 'padding', 'height', 'position']),
  1. Modify ScreenWrapper android code
import React, {useMemo} from 'react';
import BaseScreenWrapper from './BaseScreenWrapper';
import {defaultProps, propTypes} from './propTypes';

const ScreenWrapper = (props) => {
    const keyboardAvoidingViewBehavior = useMemo(() => {
        if (props.keyboardAvoidingViewBehavior === 'default') {
            return undefined;
        }

        if (props.keyboardAvoidingViewBehavior !== undefined) {
            return props.keyboardAvoidingViewBehavior;
        }

        return 'height';
    }, [props.keyboardAvoidingViewBehavior]);

    return (
        <BaseScreenWrapper
            // eslint-disable-next-line react/jsx-props-no-spreading
            {...props}
            keyboardAvoidingViewBehavior={keyboardAvoidingViewBehavior}
        >
            {props.children}
        </BaseScreenWrapper>
    );
};

defaultProps.keyboardAvoidingViewBehavior = undefined;

ScreenWrapper.propTypes = propTypes;
ScreenWrapper.defaultProps = defaultProps;

export default ScreenWrapper;
  1. Create a cross-platform WorkspaceInvitePageWrapper component (index.js and index.android.js) and return
<ScreenWrapper keyboardAvoidingViewBehavior="default">
{children}
</ScreenWrapper>

on android. Otherwise ScreenWrapper component without any prop.

Result

Screen.Recording.2022-08-27.at.8.28.59.AM.mov

@melvin-bot melvin-bot bot added the Overdue label Aug 29, 2022
@adelekennedy
Copy link

internal
external

@melvin-bot melvin-bot bot removed the Overdue label Aug 29, 2022
@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Aug 29, 2022
@melvin-bot
Copy link

melvin-bot bot commented Aug 29, 2022

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Aug 29, 2022
@melvin-bot
Copy link

melvin-bot bot commented Aug 29, 2022

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

@melvin-bot melvin-bot bot changed the title Android - Invite members - Invite message text box disappears when select emoji picker [$250] Android - Invite members - Invite message text box disappears when select emoji picker Aug 29, 2022
@roryabraham
Copy link
Contributor

Putting this on HOLD on #10273

@roryabraham roryabraham changed the title [$250] Android - Invite members - Invite message text box disappears when select emoji picker [HOLD][$250] Android - Invite members - Invite message text box disappears when select emoji picker Aug 30, 2022
@adelekennedy adelekennedy added Monthly KSv2 and removed Weekly KSv2 labels Aug 31, 2022
@mvtglobally
Copy link

Issue not reproducible during KI retests. (First week)

@JmillsExpensify JmillsExpensify changed the title [HOLD][$250] Android - Invite members - Invite message text box disappears when select emoji picker [HOLD #10273][$250] Android - Invite members - Invite message text box disappears when select emoji picker Sep 29, 2022
@JmillsExpensify JmillsExpensify changed the title [HOLD #10273][$250] Android - Invite members - Invite message text box disappears when select emoji picker [HOLD #10273] [Bug] [$250] Android - Invite members - Invite message text box disappears when select emoji picker Sep 29, 2022
@melvin-bot melvin-bot bot added the Overdue label Oct 3, 2022
@adelekennedy
Copy link

this is on hold

@melvin-bot melvin-bot bot removed the Overdue label Oct 3, 2022
@tgolen tgolen assigned tgolen and unassigned roryabraham Oct 12, 2022
@tgolen tgolen changed the title [HOLD #10273] [Bug] [$250] Android - Invite members - Invite message text box disappears when select emoji picker [Bug] [$250] Android - Invite members - Invite message text box disappears when select emoji picker Oct 13, 2022
@tgolen tgolen added the Reviewing Has a PR in review label Oct 13, 2022
@tgolen
Copy link
Contributor

tgolen commented Oct 13, 2022

I removed the HOLD on this and assigned it to me because this is fixed in #11586

@adelekennedy
Copy link

I don't think any payment is due, this was reported by applause and no proposals were accepted

@adelekennedy adelekennedy removed their assignment Oct 13, 2022
@mvtglobally
Copy link

Issue not reproducible during KI retests. (Second week)

@parasharrajat
Copy link
Member

parasharrajat commented Oct 18, 2022

No review was requested from me on the related PR. I am unassigning myself from it. let me know otherwise.

@parasharrajat parasharrajat removed their assignment Oct 18, 2022
@parasharrajat
Copy link
Member

let's remove the help wanted and External labels.

@puneetlath puneetlath added the Bug Something is broken. Auto assigns a BugZero manager. label Oct 19, 2022
@roryabraham roryabraham removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 21, 2022
@roryabraham
Copy link
Contributor

Removed Help Wanted for now

@mvtglobally
Copy link

Issue not reproducible during KI retests. (Third week) @roryabraham Are we ok to close this?

@tgolen
Copy link
Contributor

tgolen commented Oct 25, 2022

Wow, it's so weird that a lot of these are disappearing, even without my fix deployed. It's fine to close this.

@0xmiros
Copy link
Contributor

0xmiros commented Nov 24, 2022

This issue is still reproducible. Please use Gboard for device input method.
Proposal here: https://expensify.slack.com/archives/C01GTK53T8Q/p1669197533676619?thread_ts=1669197511.103729&cid=C01GTK53T8Q

Before fix:

before.mp4

After fix:

after.mp4

@melvin-bot
Copy link

melvin-bot bot commented Nov 29, 2022

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

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. Engineering External Added to denote the issue can be worked on by a contributor Monthly KSv2 Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests