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

[$250] iOS -Chat - When using extension in compose box the focus disappears #11867

Closed
kavimuru opened this issue Oct 14, 2022 · 16 comments
Closed
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Improvement Item broken or needs improvement. Reviewing Has a PR in review

Comments

@kavimuru
Copy link

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 app
  2. Log in with any account
  3. Navigate to any conversation
  4. Focus on the compose box and start typing in a quick manner
  5. When the arrows appear to enlarge the compose box - tap on them

Expected Result:

User can continue typing.

Actual Result:

Focus disappears from compose box.

Workaround:

unknown

Platform:

Where is this issue occurring?

  • iOS

Version Number: v1.2.15-2
Reproducible in staging?: Y
Reproducible in production?: Y
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
https://user-images.githubusercontent.com/43996225/195930916-7e012d5d-6bff-4dd6-a1c5-4694d84f18d7.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 Oct 14, 2022

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

@MariaHCD MariaHCD added the External Added to denote the issue can be worked on by a contributor label Oct 17, 2022
@melvin-bot melvin-bot bot added the Overdue label Oct 17, 2022
@melvin-bot
Copy link

melvin-bot bot commented Oct 17, 2022

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 17, 2022

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

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

melvin-bot bot commented Oct 17, 2022

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

@melvin-bot melvin-bot bot changed the title iOS -Chat - When using extension in compose box the focus disappears [$250] iOS -Chat - When using extension in compose box the focus disappears Oct 17, 2022
@MariaHCD MariaHCD removed their assignment Oct 17, 2022
@melvin-bot melvin-bot bot removed the Overdue label Oct 17, 2022
@hungvu193
Copy link
Contributor

Proposal
We didn't focus the text input again after expand or collapse so this issue happened.

Solution
Add the input focus after press expand or collapse in this file:

{(!this.props.isComposerFullSize && this.state.isFullComposerAvailable) && (
<Tooltip text={this.props.translate('reportActionCompose.expand')}>
<TouchableOpacity
onPress={(e) => {
e.preventDefault();
Report.setIsComposerFullSize(this.props.reportID, true);
}}
style={styles.composerSizeButton}
underlayColor={themeColors.componentBG}
disabled={isBlockedFromConcierge}
>
<Icon src={Expensicons.Expand} />
</TouchableOpacity>
</Tooltip>
)}
<Tooltip text={this.props.translate('reportActionCompose.addAction')}>
<TouchableOpacity
onPress={(e) => {
e.preventDefault();
this.setMenuVisibility(true);
}}
style={styles.chatItemAttachButton}
underlayColor={themeColors.componentBG}
disabled={isBlockedFromConcierge}
>
<Icon src={Expensicons.Plus} />
</TouchableOpacity>

For collapse:

          <Tooltip text={this.props.translate('reportActionCompose.collapse')}>
              <TouchableOpacity
                  onPress={(e) => {
                      e.preventDefault();
                      Report.setIsComposerFullSize(this.props.reportID, false);
+                    this.textInput.focus();
                  }}
                  style={styles.composerSizeButton}
                  underlayColor={themeColors.componentBG}
                  disabled={isBlockedFromConcierge}
              >
                  <Icon src={Expensicons.Collapse} />
              </TouchableOpacity>
          </Tooltip>

      )}
                                                              

For expand:

                           <Tooltip text={this.props.translate('reportActionCompose.expand')}>
                                <TouchableOpacity
                                    onPress={(e) => {
                                        e.preventDefault();
                                        Report.setIsComposerFullSize(this.props.reportID, true);
+                                      this.textInput.focus();
                                    }}
                                    style={styles.composerSizeButton}
                                    underlayColor={themeColors.componentBG}
                                    disabled={isBlockedFromConcierge}
                                >
                                    <Icon src={Expensicons.Expand} />
                                </TouchableOpacity>
                            </Tooltip>                                                             

@aimane-chnaif
Copy link
Contributor

aimane-chnaif commented Oct 17, 2022

Proposal

This is regressed from 981edd9 in this PR
Especially bumping @react-navigation/drawer version from 6.3.0 to 6.5.0 caused this bug.
I tested and confirmed that this bug started appearing from 6.3.1

Solution:
revert @react-navigation/drawer back to 6.3.0 until we fix this weird issue on latest version of this library

cc: @marc (since you did this change)

@melvin-bot
Copy link

melvin-bot bot commented Oct 17, 2022

Looks like something related to react-navigation may have been mentioned in this issue discussion.

As a reminder, please make sure that all proposals are not workarounds and that any and all attempt to fix the issue holistically have been made before proceeding with a solution. Proposals to change our DeprecatedCustomActions.js files should not be accepted.

Feel free to drop a note in #expensify-open-source with any questions.

@mountiny
Copy link
Contributor

Please see discussion in this thread. This is related to the the react-drawer update but we would like to fix it without downgrading its version.

@roryabraham
Copy link
Contributor

I'm going to put this issue on HOLD for #11915 since we should have a fix ready-to-go in the upstream react-navigation repo.

@mountiny mountiny changed the title [$250] iOS -Chat - When using extension in compose box the focus disappears [HOLD] [$250] iOS -Chat - When using extension in compose box the focus disappears Oct 17, 2022
@roryabraham
Copy link
Contributor

Taking this over because I have a fix ready for review.

@roryabraham roryabraham removed 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 labels Oct 18, 2022
@kbecciv
Copy link

kbecciv commented Oct 21, 2022

Issue is reproducible with build 1.2.18.5, re-opening

11944.mWeb-2.mp4
Recording.1498.mp4

@kbecciv kbecciv reopened this Oct 21, 2022
@mountiny
Copy link
Contributor

I think this has been reported much before the react-drawer change, cant find the link right now :(

@aimane-chnaif
Copy link
Contributor

I am not able to reproduce this in v1.2.18.5 on native apps.
For web, the issue existed from the beginning: #11093

@mountiny
Copy link
Contributor

Oh, there we go, thanks!

@techievivek
Copy link
Contributor

So I think for the scope of this issue we have already implemented a fix, right?

@roryabraham
Copy link
Contributor

Closing this out, it's fixed

@JmillsExpensify JmillsExpensify changed the title [HOLD] [$250] iOS -Chat - When using extension in compose box the focus disappears [$250] iOS -Chat - When using extension in compose box the focus disappears Nov 1, 2022
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 Engineering Improvement Item broken or needs improvement. Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests