-
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
Fix RequestMoney tabs animations #32577
Fix RequestMoney tabs animations #32577
Conversation
@mananjadhav Please 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] |
Hi @mananjadhav, could you look into that? Thanks a lot! 👍 |
I've gone through the explanation of the PR, I am going through the code now and will test this today/tomorrow. @kacper-mikolajczak can you resolve the conflicts. |
@mananjadhav conflicts are resolved 👍 |
Tested this on Web and it looks to be working fine. Screen.Recording.2023-12-20.at.1.55.36.AM.mov |
@kacper-mikolajczak Seems like there are some unverified commits |
Going to wait for @kacper-mikolajczak to resolve conflicts and fixed the signed commits before finishing the checklist. |
@mountiny Fixed 👍
@mananjadhav Done ✅ |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid-rhp-tab-animations.movAndroid: mWeb Chromemweb-chrome-rhp-tab-animations.moviOS: Nativeios-rhp-tab-animations.moviOS: mWeb Safarimweb-safari-rhp-tab-animations.movMacOS: Chrome / Safariweb-rhp-tab-animations.movMacOS: Desktopdesktop-rhp-tab-animations.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.
@kacper-mikolajczak Looking good, I see that the root cause is in react-navigation, could you link to react-navigation issue which can be used to track this and how we ensure this will be fixed and we can turn the animations for web too? thank you!
const getBackgroundColorStyle = useCallback( | ||
(hovered: boolean) => { | ||
if (hovered && !isFocused) { | ||
return {backgroundColor: theme.highlightBG}; | ||
} | ||
return {backgroundColor: focusValueRef.current.interpolate({inputRange: [0, 1], outputRange: [theme.appBG, theme.border]})}; | ||
}, | ||
[theme, isFocused], | ||
); |
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 might be handy just to note here why we are using this approach instead of styles
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.
Most of the code was moved from old definition in TabSelector
, but I am not that familiar with the style conventions, so if you feel like there is a room for improvement, then let me know and we can fix that 👍
Since @stitesExpensify is ooo this week and this is handy performance improvement, I am going to go ahead and merge this |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/mountiny in version: 1.4.19-0 🚀
|
@@ -0,0 +1,3 @@ | |||
const tabNavigatorAnimationEnabled = false; |
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.
Comment for reference
Sure thing! Here is a link to the issue I posted in |
@kacper-mikolajczak please also check this regression. That bug is critical |
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.19-2 🚀
|
Details
RequestMoney
screen is laggy when switching between its tabs. This PR aims to refactor animations and temporarily disable them on web-based platforms until root cause is addressed in React Navigation (or other solution is implemented).Fixed Issues
$ #31190
PROPOSAL: #31190 (comment)
Tests
FAB
->RequestMoney
Manual
and check if it is rendered correctlyScan
and check if it is rendered correctlyDistance
and check if it is rendered correctlyOffline tests
n/a
QA Steps
FAB
->RequestMoney
Manual
and check if it is rendered correctlyScan
and check if it is rendered correctlyDistance
and check if it is rendered correctlyPR 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
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
Android: Native
android.mp4
Android: mWeb Chrome
mandroid.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
mios.mp4
MacOS: Chrome / Safari
web.mp4
MacOS: Desktop
desktop.mp4