-
Notifications
You must be signed in to change notification settings - Fork 3.2k
feat: add animation for auto suggestions popup #19933
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
Conversation
@puneetlath @s77rt 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] |
src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js
Outdated
Show resolved
Hide resolved
ref={props.forwardedRef} | ||
style={[styles.autoCompleteSuggestionsContainer, StyleUtils.getAutoCompleteSuggestionContainerStyle(rowHeight, props.shouldIncludeReportRecipientLocalTimeHeight)]} | ||
style={animatedStyles} | ||
exiting={FadeOutDown.duration(100)} |
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.
Why we are adding an existing animation here? Can you upload two videos with/without the existing animation?
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.
Without exit animation the popup gets hidden abruptly if we clear the input. Fadeout animation smooths it out a bit.
without FadeOut
withOut-FadeOut.mov
with FadeOut
withFadeOut.mov
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.
Let's annoy ask @shawnborton 😁 Thoughts here?
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 don't mind the fade, but why can't we exit it the same way it enters? That feels more consistent to me.
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 don't mind the fade, but why can't we exit it the same way it enters? That feels more consistent to me.
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.
When we clear the input the suggestions popup gets removed from layout at ReportActionCompose
level. For entry and further change in height of popup we are animating the container height variable. But for exit we wouldn't get an opportunity to animate the container height further, as the component gets removed from layout hierarchy immediately. That's why I'm using the exiting
prop with FadeOutDown
animation which feels closer to the entry animation. Other exit animation options are Bounce, Flip, Stretch, Zoom, Slide, LightSpeed, Pinwheel, Roll, Rotate. But none of those match the entry behaviour.
Below I've modified the FadeOutDown animation to add easeInOut
easing to make it feel closer to the timing animation for height.
Screen.Recording.2023-06-01.at.6.50.12.PM.mov
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.
@shawnborton Thoughts on the above ^
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 think that feels fine to me, so let's go with that. Thanks for sharing!
src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js
Outdated
Show resolved
Hide resolved
src/components/AutoCompleteSuggestions/BaseAutoCompleteSuggestions.js
Outdated
Show resolved
Hide resolved
Reviewer Checklist
Screenshots/VideosWebweb.mp4Mobile Web - Chromemweb-chrome.mp4Mobile Web - Safarimweb-safari.mp4Desktopdesktop.mp4iOSios.mp4Androidandroid.mp4 |
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! 🚀
cc @puneetlath
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Cherry-picked to staging by https://github.com/puneetlath in version: 1.3.24-5 🚀
@Expensify/applauseleads please QA this PR and check it off on the deploy checklist if it passes. |
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.24-5 🚀
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.3.24-5 🚀
|
Details
This PR add an animation to auto suggestions popup using
react-native-reanimated
package.Fixed Issues
$ #18974
PROPOSAL: #18974 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.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
web.mov
Mobile Web - Chrome
mWeb-Android.webm
Mobile Web - Safari
mWeb-iOS.mp4
Desktop
desktop.mov
iOS
iOS.mp4
Android
android.webm