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

Keep focus on the Composer when send button is clicked #8091

Merged
merged 1 commit into from
Mar 11, 2022

Conversation

parasharrajat
Copy link
Member

@parasharrajat parasharrajat commented Mar 11, 2022

Details

#7798 (comment)

Fixed Issues

$ #7798

Tests

Contributor (PR Author) Checklist

  • I verified the PR has a small number of commits behind main
  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I clearly indicated the environment tests should be run in (Staging vs Production)
  • I wrote testing steps that cover success & fail scenarios (if applicable)
  • I included screenshots or videos for tests on all platforms
  • I ran the tests & veryfy they passed on:
    • iOS / native
    • Android / native
    • iOS / Safari
    • Android / Chrome
    • MacOS / Chrome
    • MacOS / Desktop
  • I verified there are no console errors related to changes in this PR
  • I followed proper code patterns (see Reviewing the code)
    • I added comments when the code was not self explanatory
    • I put all copy / text shown in the product in all src/languages/* files (if applicable)
    • I followed proper naming convention for platform-specific files (if applicable)
    • I followed style guidelines (in Styling.md) for all style edits I made
    • I followed the JSDocs style guidelines (in STYLE.md)
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I corroborated the UI performance was not affected (the performance is the same than main branch)
  • If I created a new component I verified that a similar component doesn't exist in the codebase

PR Reviewer Checklist

  • I verified the PR has a small number of commits behind main
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the testing environment is mentioned in the test steps
  • I verified testing steps cover success & fail scenarios (if applicable)
  • I checked that screenshots or videos are included for tests on all platforms
  • I verified tests pass on all platforms & I tested again on:
    • iOS / native
    • Android / native
    • iOS / Safari
    • Android / Chrome
    • MacOS / Chrome
    • MacOS / Desktop
  • I verified there are no console errors related to changes in this PR
  • I verified proper code patterns were followed (see Reviewing the code)
    • I verified comments were added when the code was not self explanatory
    • I verified any copy / text shown in the product was added in all src/languages/* files (if applicable)
    • I verified proper naming convention for platform-specific files was followed (if applicable)
    • I verified style guidelines were followed
    • I verified the JSDocs style guidelines (in STYLE.md) were followed
  • I verified that this PR follows the guidelines as stated in the Review Guidelines
  • I verified other components are not impacted by changes in this PR (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • I verified the UI performance was not affected (the performance is the same than main branch)
  • If a new component is created I verified that a similar component doesn't exist in the codebase

QA Steps

  1. Open any chat on each platforms.
  2. Type a message in composer.
  3. manually click the send button.
  4. Notice that cursor should remain on the Composer after message is sent.
  5. On Mobile devices(native or mWeb) Virtual keyboard should not close after message is sent.
  • Verify that no errors appear in the JS console

Screenshots

Web | Desktop

screen-2022-03-11_17.34.11.mp4

Mobile Web

screen-2022-03-11_17.51.55.mp4
screen-2022-03-11_19.37.02.mp4

iOS

screen-2022-03-11_19.23.55.mp4

Android

screen-2022-03-11_17.50.53.mp4

@parasharrajat parasharrajat requested a review from a team as a code owner March 11, 2022 12:11
@MelvinBot MelvinBot requested review from roryabraham and removed request for a team March 11, 2022 12:11
@@ -578,6 +581,10 @@ class ReportActionCompose extends React.Component {
]}
onPress={this.submitForm}
underlayColor={themeColors.componentBG}

// Keep focus on the composer when Send message is clicked.
// eslint-disable-next-line react/jsx-props-no-multi-spaces
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should disable this eslint rule

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I guess so. It is used in many places

@roryabraham roryabraham merged commit 2375337 into Expensify:main Mar 11, 2022
@OSBotify
Copy link
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify
Copy link
Contributor

🚀 Deployed to staging by @roryabraham in version: 1.1.43-0 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @roryabraham in version: 1.1.43-2 🚀

platform result
🤖 android 🤖 success ✅
🖥 desktop 🖥 success ✅
🍎 iOS 🍎 success ✅
🕸 web 🕸 success ✅

@MonilBhavsar
Copy link
Contributor

I was looking at this issue where we have an unexpected behaviour in iOS that makes autocorrect selection persist in the text input after message is sent. I guess a line added in this PR is causing this. I could be wrong and sorry If I am, ha ha. Can anyone please confirm @parasharrajat @roryabraham.

@parasharrajat
Copy link
Member Author

Yup, I think this PR is behind that.

@MonilBhavsar
Copy link
Contributor

Thanks for confirming 🙇🏻
So I guess the next step is to revert this PR and fix the original issue with different approach?

@parasharrajat
Copy link
Member Author

parasharrajat commented Apr 21, 2022

So I guess the next step is to revert this PR and fix the original issue with a different approach?

No. is the new issue a deploy blocker? IMO the solution in this PR was the best of all known and the new issue is only affecting one platform under an edge case.

IMO, The regression period for this issue is over. so it would be best to fix the new issue separately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants