Skip to content

Add some hitSlop around the send button - #6708

Merged
deetergp merged 3 commits into
mainfrom
Rory-SendButtonHitSlop
Dec 15, 2021
Merged

deetergp merged 3 commits into
mainfrom
Rory-SendButtonHitSlop

Conversation

@roryabraham

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

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

underlayColor={themeColors.componentBG}
disabled={this.state.isCommentEmpty || isBlockedFromConcierge || isArchivedChatRoom}
hitSlop={{
top: 3, right: 3, bottom: 3, left: 3,

Copy link
Copy Markdown
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.

@deetergp deetergp left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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 OSBotify mentioned this pull request Dec 15, 2021
37 tasks done
@OSBotify

Copy link
Copy Markdown
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
Copy Markdown
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