Repository navigation
fix: RHN flashes if dismissed using swipe from the edge gesture - #81622
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@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] |
| @@ -51,10 +52,11 @@ const useSplitNavigatorScreenOptions = () => { | |||
| ...hideKeyboardOnSwipe, | |||
| headerShown: false, | |||
| title: CONFIG.SITE_TITLE, | |||
There was a problem hiding this comment.
❌ PERF-13 (docs)
The isMobileSafari() function is called on every render of this hook since its not memoized. The function performs user agent string parsing which is expensive work that could be hoisted outside the hook.
Consider storing the result in a constant at module level:
const IS_MOBILE_SAFARI = isMobileSafari();
const useSplitNavigatorScreenOptions = () => {
// ...
animation: shouldUseNarrowLayout && !IS_MOBILE_SAFARI ? Animations.SLIDE_FROM_RIGHT : Animations.NONE,
// ...
animationEnabled: !IS_MOBILE_SAFARI
}This pattern is already used elsewhere in the codebase (e.g., src/components/FlatList/index.tsx).
Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
| animationTypeForReplace: 'pop', | ||
| web: { | ||
| cardStyleInterpolator: (props: StackCardInterpolationProps) => modalCardStyleInterpolator({props, isFullScreenModal: true, shouldAnimateSidePanel: true}), | ||
| cardStyleInterpolator: (props: StackCardInterpolationProps) => |
There was a problem hiding this comment.
❌ PERF-13 (docs)
The isMobileSafari() function is called again here, performing redundant user agent parsing on every render.
Use the same module-level constant suggested above:
const IS_MOBILE_SAFARI = isMobileSafari();
// In the hook:
modalCardStyleInterpolator({props, isFullScreenModal: true, shouldAnimateSidePanel: true, animationEnabled: !IS_MOBILE_SAFARI})Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
|
@mananjadhav I updated |
mananjadhav
left a comment
There was a problem hiding this comment.
Code change looks fine. Needs adhoc build to test.
|
@jasperhuangg Can you trigger adhoc build ? |
|
@mananjadhav just kicked it off |
|
🚧 @jasperhuangg has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
@mananjadhav adhoc build is ready to go |
|
Yes testing in a while. |
jasperhuangg
left a comment
There was a problem hiding this comment.
nice thanks! @JmillsExpensify all yours, this one seems pretty straightforward
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid-rhn-flash.movAndroid: mWeb Chromemweb-chrome-rhn-flash.moviOS: HybridAppios-rhn-flash.mp4iOS: mWeb Safarimweb-safari-rhn-flash.mp4MacOS: Chrome / Safariweb-rhn-flash.mov |
jasperhuangg
left a comment
There was a problem hiding this comment.
nice, makes sense to me, @JmillsExpensify off to you for the product review, please approve and merge if everything checks out
JmillsExpensify
left a comment
There was a problem hiding this comment.
No product review required on this one.
|
All checks pass so I'm going to merge per Jasper's comment. |
|
🚧 @JmillsExpensify has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ 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/JmillsExpensify in version: 9.3.19-0 🚀
|
|
@paulnjs Left swipe doesn't work on Android App. Bug7077431_1771023215729.81622-Android.1.mp4 |
|
@izarutskaya Yes, swipe left to go back isn't a feature on android. Actually, there are some phone have this option and it also not work like ios. I think we don't need create ticket for this. |
|
🚀 Deployed to production by https://github.com/mountiny in version: 9.3.19-5 🚀
|
Explanation of Change
Fixed Issues
$#80375
PROPOSAL:#80375 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
android.mov
Android: mWeb Chrome
android_chorme.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios_sfr.mov
MacOS: Chrome / Safari
chorme.mov