-
Notifications
You must be signed in to change notification settings - Fork 3k
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: Subscription - Clicking Outside the Modal Doesn't Close It, Causing Inconsistency. #47950
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
onBackdropPress={() => { | |
Navigation.dismissModal(); | |
setTimeout(() => { | |
onClose?.(); | |
}, 50); | |
}} | |
onBackdropPress={Navigation.dismissModal} |
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.
@shubham1206agra, we also need to call onClose
, otherwise the close animation won't work.
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.
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 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
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