-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Extend implementation of Haptic Feedback #17095
Extend implementation of Haptic Feedback #17095
Conversation
@Santhosh-Sellavel @arosiclair One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Reviewer Checklist
Screenshots/VideosN/A |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I've tested it on Android by changing the code, I can feel the impact for each type. Can you test it on iOS @arosiclair?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, I managed to test this on iOS device. I can feel the impact between types here too!
All you @arosiclair, thanks!
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
@arosiclair or @robertKozik Can you assign me the issue |
🚀 Deployed to staging by https://github.com/arosiclair in version: 1.2.99-0 🚀
|
🚀 Deployed to production by https://github.com/francoisl in version: 1.2.99-6 🚀
|
@@ -20,7 +20,7 @@ const PressableWithSecondaryInteraction = (props) => { | |||
onPress={props.onPress} | |||
onLongPress={(e) => { | |||
e.preventDefault(); | |||
HapticFeedback.trigger(); | |||
HapticFeedback.longPress(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@roryabraham @robertKozik
Nitpick: I don't think we should change the haptic feedback just for consistency across iOS and Android (and for one single native file).
Install the android app, and long press a message - it's a very 2010 era type vibration and doesn't feel good.
You can try long pressing a message on Android whatsapp / slack for comparison - it's a nice and short bip
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a small UX polish but worth the extra android file we'll create.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a feature request for it before - https://expensify.slack.com/archives/C01GTK53T8Q/p1627669368027700
And it seems like we've undone that.
What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heh, now that you point it out I think I agree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we just try changing it to impactMedium
and see if that helps, but effectHeavyClick
does seem like the way to go on Android.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't aware of that during the designing and implementation of this PR. The main point of it was to differentiate haptics between the various types of interactions. The pattern of haptic response can be discussed and changed, so I'm open to that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree we can change things up between platforms as long as we have a consistent gesture system within our app.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good :)
Details
Implement 4 functions in our existing Haptic Feedback library:
success
error
press
longPress
Fixed Issues
$ #16987
PROPOSAL: https://docs.google.com/document/d/1yHHs4IfaMxB2q7eW8Hyt7ew4rNtY6HdduPKdf-Q2ZxE/edit#bookmark=id.u88dj4n6qfzc
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Web
Mobile Web - Chrome
Mobile Web - Safari
Desktop
iOS
Android