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

Add some hitSlop around the send button #6708

Merged
merged 3 commits into from
Dec 15, 2021
Merged

Conversation

roryabraham
Copy link
Contributor

Details

Adds some extra touchability margins around the "send chat" button.

Fixed Issues

$ #6662

Tests / QA Steps

  1. Type a message.
  2. Touch just outside the send button (but still within the bounds of the composer)
  3. Verify that the message sends.

Tested On

  • [] Web
  • Mobile Web
  • Desktop
  • iOS
  • Android

Screenshots

Web

Mobile Web

Desktop

iOS

Android

@roryabraham roryabraham self-assigned this Dec 10, 2021
@roryabraham roryabraham requested a review from a team as a code owner December 10, 2021 22:29
@MelvinBot MelvinBot requested review from deetergp and removed request for a team December 10, 2021 22:29
onPress={this.submitForm}
underlayColor={themeColors.componentBG}
disabled={this.state.isCommentEmpty || isBlockedFromConcierge || isArchivedChatRoom}
hitSlop={{top: 3, right: 3, bottom: 3, left: 3}}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The docs say that you should be able to pass a single number here, but that caused a crash when I tried it.

@roryabraham
Copy link
Contributor Author

@deetergp I just fixed the lint errors here, ready for review

onPress={this.submitForm}
underlayColor={themeColors.componentBG}
disabled={this.state.isCommentEmpty || isBlockedFromConcierge || isArchivedChatRoom}
hitSlop={{
top: 3, right: 3, bottom: 3, left: 3,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that 3 is chosen because it matches the margin around the button. That's the max hitSlop we can add because it cannot extend beyond the bounds of the parent component.

Copy link
Contributor

@deetergp deetergp left a comment

Choose a reason for hiding this comment

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

It's silly that you have to send the same number four times, but the code looks good and test well.

@deetergp deetergp merged commit ebfb904 into main Dec 15, 2021
@deetergp deetergp deleted the Rory-SendButtonHitSlop branch December 15, 2021 02:11
@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 @deetergp in version: 1.1.20-3 🚀

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

@OSBotify
Copy link
Contributor

🚀 Deployed to production by @Julesssss in version: 1.1.21-1 🚀

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

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.

3 participants