fix: no action after swipe down to close action#37630
fix: no action after swipe down to close action#37630youssef-lr merged 3 commits intoExpensify:mainfrom
Conversation
Earlier it was wrapped with the App/src/components/Lightbox/index.tsx Lines 64 to 68 in 22cb01c App/src/components/Lightbox/index.tsx Lines 125 to 128 in 22cb01c But now as we are also providing the App/src/components/Lightbox/index.tsx Lines 79 to 82 in 22cb01c I believe instead of setting true directly we can set its value based on some condition(maybe by considering |
|
@Pujan92 thank you for review - I addressed all comments, can you review again, please? 👀 |
Sure, I am on it. Can you plz update the android recording. |
Reviewer Checklist
Screenshots/VideosAndroid: Nativeandroid1.mp4Android: mWeb ChromeiOS: NativeSimulator.Screen.Recording.-.iPhone.15.Pro.-.2024-03-04.at.18.40.26.mp4iOS: mWeb SafariMacOS: Chrome / SafariMacOS: Desktop |
@Pujan92 done 🙌 |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
@youssef-lr Do I need to be assigned to the issue as well or not required? |
|
🚀 Deployed to staging by https://github.com/youssef-lr in version: 1.4.48-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 1.4.48-0 🚀
|
Details
The "no action" case happened because we didn't have a context over
MultiGestureCanvas.Initially I thought to call
Navigation.goBack()and do not passonSwipeDownin context. However it turned out, thatNavigation.goBack()can cause a "double" navigation in some cases (it can really go back + modal where attachment is shown can be unmounted).So I decided to add additional context provider and pass
closeModalasonSwipeDown. Also I found out thatcloseModalcan be passed instead ofNavigation.goBack()(and in this case we'll ahve smoother and more synchronized animations). So in this PR I'm runningonSwipeDownafter completion to avoid parallel animations.Note
It seems like on Android receipts and other images are not wrapped in
MultiGestureCanvasand because of that swipe-down-to-close gesture is no working there. However I think it's a separate problem (or problem at all?) and should be handled separately 9if needed).Fixed Issues
$ #37625
PROPOSAL: N/A
Tests
Offline tests
Not needed
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so 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
telegram-cloud-document-2-5418367991437869515.mp4
Android: mWeb Chrome
iOS: Native
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-03-01.at.19.22.01.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop