fix: Subscription - Clicking Outside the Modal Doesn't Close It, Causing Inconsistency.#47950
Conversation
…ing Inconsistency. Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
@shubham1206agra 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] |
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
@shubham1206agra, the code change is complete in my opinion, but there is an issue. We need to use a timeout because there is a minor glitch when the modal is closed. For a very brief moment, we can see two modals. This issue is resolved by using a timeout, but I want your opinion since using timeouts isn't generally encouraged. However, I believe this is an edge case where it can be safely used. I've verified that it's working well on both the desktop app and the web. Without Timeoutwithout_timeout.mp4With Timeoutwith_timeout.mp4 |
|
@Krishna2323 Can you tell me how did you added card here? |
|
@shubham1206agra, Update the TO: const defaultCard = {accountData: {addressName: 'Max', cardYear: 2029, cardMonth: 9, currency: 'USD', cardNumber: '1234567887654321', additionalData: {isBillingCard: true}}}; |
| onBackdropPress={() => { | ||
| Navigation.dismissModal(); | ||
| setTimeout(() => { | ||
| onClose?.(); | ||
| }, 50); | ||
| }} |
There was a problem hiding this comment.
I don't think setting a timeout is a good idea here. Please do it without timeout.
|
@Krishna2323 Merge main please |
| onBackdropPress={() => { | ||
| Navigation.dismissModal(); | ||
| setTimeout(() => { | ||
| onClose?.(); | ||
| }, 50); | ||
| }} |
There was a problem hiding this comment.
| onBackdropPress={() => { | |
| Navigation.dismissModal(); | |
| setTimeout(() => { | |
| onClose?.(); | |
| }, 50); | |
| }} | |
| onBackdropPress={Navigation.dismissModal} |
There was a problem hiding this comment.
@shubham1206agra, we also need to call onClose, otherwise the close animation won't work.
There was a problem hiding this comment.
There are many places we don't call onClose. It is okay for me if the animation does not trigger here.
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
@shubham1206agra, timeout is removed, all recordings have been added except for android native. I'm not able to build for android native and not sure when I will be able to fix the issue so I completed the checklist. Please test that for me🙏🏻 |
Reviewer Checklist
Screenshots/VideosAndroid: NativeNA Android: mWeb ChromeNA iOS: NativeNA iOS: mWeb SafariNA MacOS: Chrome / SafariScreen.Recording.2024-08-29.at.3.02.49.PM.movMacOS: DesktopScreen.Recording.2024-08-29.at.3.06.58.PM.mov |
|
✋ 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/puneetlath in version: 9.0.27-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.0.27-1 🚀
|
Details
Fixed Issues
$ #47559
PROPOSAL: #47559 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.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 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: mWeb Chrome
android_chrome.mp4
iOS: Native
ios_native.mp4
iOS: mWeb Safari
ios_safari.mp4
MacOS: Chrome / Safari
web_chrome.mp4
MacOS: Desktop
desktop_app.mp4