-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Removing payment method actions model when payment method is removed from another device #14869
Removing payment method actions model when payment method is removed from another device #14869
Conversation
@PauloGasparSv @0xmiroslav One of you needs to 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] |
@0xmiroslav Gentle ping to review the PR |
reviewing today |
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.
Can we also reset state on closing default/delete menu?
@abdulrahuman5196 sorry for delay but I was testing various edge cases. |
|
This was missing originally but let's set default state value of |
Hi, @0xmiroslav Added the comments and the default selectedPaymentMethodType in constructor as requested. |
Re-Requesting @0xmiroslav 's review somehow removed @PauloGasparSv review. I am not able to add back. Kindly review the PR. |
<PasswordPopover
isVisible={this.state.shouldShowPasswordPrompt}
onClose={this.hidePasswordPrompt}
anchorPosition={{
top: this.state.anchorPositionTop,
right: this.state.anchorPositionRight,
}}
onSubmit={(password) => {
- this.hidePasswordPrompt();
+ this.setState({shouldShowPasswordPrompt: false});
this.makeDefaultPaymentMethod(password);
}}
submitButtonText={this.state.passwordButtonText}
/> We cannot call Instead of above code diff, I prefer introducing flag parameter on |
Also, I don't think we need this workaround anymore App/src/pages/settings/Payments/PaymentsPage/BasePaymentsPage.js Lines 251 to 253 in f8d7a3a
@PauloGasparSv this is out of scope but I suggest to fix iOS freeze issue (#10509) on this PR. |
@0xmiroslav Nice callout. I have made the change to add a flag to reset selected method data and also cleared the selected method data after make default is called. |
@0xmiroslav I not sure of this though. If we want to remove the code, i can remove it as a separate PR. Because if this change causes some regression we would end up revert this whole PR. |
ok freeze issue can still be separate, though it's annoying while testing iOS app. @abdulrahuman5196 We can replace all usages of |
@also, make sure to test various cases on your side and confirm expected results so it doesn't cause any regressions:
Also, try to delete selected payment method from another device on every modal show. |
@0xmiroslav |
@0xmiroslav
Yes. I agree. This seems to be a different issue than what this PR is concerned. |
@abdulrahuman5196 have you noticed that when add fake paypal, it deletes already existing payment methods on another device? |
@0xmiroslav I haven't seen this issue. I always use some random text as paypal id. But it gets added obviously. |
Hi, @0xmiroslav I could see you had completed the reviewers checklist. Thank you for that. If we are good, could you kindly approve the PR? |
This comment was marked as off-topic.
This comment was marked as off-topic.
We haven't tested yet with debit card so cannot approve yet, though I believe it will work. I asked @PauloGasparSv for help testing. We'll keep you posted. |
Thank you for quick response @0xmiroslav |
Had to shift a focus a bit and will have to finish the review tomorrow, sorry guys! Will do this first thing in the morning. |
@PauloGasparSv Thank you. |
@PauloGasparSv Kindly let me know if anything else is required from my end. Would be happy to sort it out sooner. |
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.
LGTM! :D
Tested the debit card (check the desktop test) and also deleting a Workspace created VBA from the Workspace Page (check desktop and web tests)
@0xmiroslav do you have any more inputs on this or can we merge it? : )
Web
Web.Workspace.mov
Mobile Web - Chrome
Android.Web.mov
Mobile Web - Safari
ioS.Web.mov
Desktop
Desktop.mov
iOS
https://user-images.githubusercontent.com/6564265/217911574-2ba4ea8e-8bd9-48d2-94e0-7e23c72c7681.movAndroid
Android.mov
BTW, while testing I found the following unrelated bug:
Bug
StrangeBug.mov
We had an internal discussion and I'll create an internal issue for it (because it requires setting up the Expensify Card and a Domain)
@PauloGasparSv thanks for full testing. Desktop and web videos look good to me. |
Merging then! |
Strange, first merge attempt failed with a message about signed commits. |
✋ 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/PauloGasparSv in version: 1.2.69-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.2.69-2 🚀
|
@PauloGasparSv @0xmiroslav
Details
Removing payment method actions model when payment method is removed from another device
Fixed Issues
$ #14524
PROPOSAL: #14524 (comment)
Tests
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)ScrollView
component to make it scrollable when more elements are added to the page.Screenshots/Videos
All payment methods where deleted from another device
Web
web.mov
Mobile Web - Chrome
mweb.chrome.mp4
Mobile Web - Safari
mweb.safari.mov
Desktop
desktop.mov
iOS
ios.mov
Android
android.mp4