-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix RHP animation on Safari #44840
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 RHP animation on Safari #44840
Conversation
@mountiny this is the fix, please take a look - perhaps we could run a build here and test it? |
This doesn't seem to fix the issue: Screen.Recording.2024-07-04.at.9.19.06.PM.mov |
Sadly, these does not fixed the issue for me Screen.Recording.2024-07-04.at.11.54.33.PM.mov |
I see, it's a shame that this doesn't solve the bug. However the funny thing is that this solves it for me 100%. I literally cannot trigger the bug anymore which means I can't try to fix it anymore 😓 Check my video. Interestingly if you look at the period around 0:25 - 0:40 you can see the very similar faulty animation - but for me it always comes back to correct layout. But I still think its these interpolators that break it. rec-web-safair-bug2.mp4Not sure what to do next, since I cannot reproduce it anymore - either via clicking or via keyboard and I tried multiple types of RHP modals. Btw I'm on mac M3 Pro, Sonoma v14.4.1, Safari v17.14.1 |
I can still reliably repro on this branch as well when going from the task title to confirmation page @Kicu nobody in SWM can reproduce this? |
This PR is now using the custom interpolators only for Safari as a temporary solution, until we can fix all the animations correctly. |
import useThemeStyles from '@hooks/useThemeStyles'; | ||
import useWindowDimensions from '@hooks/useWindowDimensions'; | ||
import {isSafari} from '@libs/Browser'; |
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.
NAB, we usually import libs like this
import * as Browser from '@libs/Browser';
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.
sorry forgot to change this, lets just keep as is - this code is supposed to go away soon when we have a better solution. Will keep this in mind for future
Reviewer Checklist
Screenshots/VideosAndroid: NativeNot affected Android: mWeb Chromenot affected iOS: NativeNot affected iOS: mWeb SafariScreen.Recording.2024-07-05.at.6.35.39.PM.movMacOS: Chrome / SafariScreen.Recording.2024-07-05.at.6.29.44.PM.movMacOS: DesktopScreen.Recording.2024-07-05.at.6.38.20.PM.mov |
src/libs/Navigation/AppNavigator/Navigators/RightModalNavigator.tsx
Outdated
Show resolved
Hide resolved
@ishpaul777 PR updated, pushed a with commit with usememo |
// The .forHorizontalIOS interpolator from `@react-navigation` is misbehaving on Safari, so we override it with Expensify custom interpolator | ||
if (isSafari()) { | ||
const customInterpolator = createModalCardStyleInterpolator(styleUtils); | ||
screenOptions.cardStyleInterpolator = (props: StackCardInterpolationProps) => customInterpolator(isSmallScreenWidth, false, false, props); |
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.
screenOptions.cardStyleInterpolator = (props: StackCardInterpolationProps) => customInterpolator(isSmallScreenWidth, false, false, props); | |
options.cardStyleInterpolator = (props: StackCardInterpolationProps) => customInterpolator(isSmallScreenWidth, false, false, props); |
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.
done, thank you for catching this, I was kinda rushing it 😓
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.
we just need to apply suggestion rest looks good! Approving since I have go offline for few hours. @mountiny Can you please handle it forward.
Please be advised that the test failure on this PR is most likely because of the file I have not touched any logic related to the files that are failing |
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.
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. |
🚀 Deployed to staging by https://github.com/mountiny in version: 9.0.5-0 🚀
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.0.5-2 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.5-13 🚀
|
🚀 Deployed to production by https://github.com/thienlnam in version: 9.0.6-8 🚀
|
Details
react-navigation
for RHP because it seems to be the source of the bug on SafariFixed Issues
$ #44765
PROPOSAL:
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 methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Chrome
rec-web-chrome-bug.mp4
Safari
rec-web-safari-bug.mp4
MacOS: Desktop