-
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: On add Paypal page, the add Paypal button isn't working correctly #12197
Conversation
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 remove the un used code here related to editing PayPal as the flow no longer exists?
@pecanoro What do you think?
Updated! |
@@ -36,7 +36,7 @@ class AddPayPalMePage extends React.Component { | |||
super(props); | |||
|
|||
this.state = { | |||
payPalMeUsername: props.payPalMeData.description, | |||
payPalMeUsername: props.payPalMeData.description || '', |
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.
Why do we need props.payPalMeData.description
, please clean up other unnecessary codes.
#### Web & Desktop
https://user-images.githubusercontent.com/85645967/200027918-1b418d2a-4773-401e-a074-5fff5f4c2a01.mov
|
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.
Looks good & tests well!
✋ 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 production by @yuwenmemon in version: 1.2.25-0 🚀
|
/> | ||
</FixedFooter> | ||
</ScreenWrapper> | ||
); | ||
} | ||
} | ||
|
||
AddPayPalMePage.propTypes = propTypes; | ||
AddPayPalMePage.defaultProps = defaultProps; | ||
AddPayPalMePage.propTypes = {...withLocalizePropTypes}; |
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.
PropTypes should be defined at the top of the file. cc: @Santhosh-Sellavel
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.
We don't have any additional PropTypes to define, so this makes more sense.
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.
But still, this is an object literal ( a new object is being created). Following the pattern of existing components, it is better to define these at the top.
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.e There is nothing to define. withLocalizePropTypes
is already defined and imported, Defining it again is redundant so it seemed fine to me.
Also, I checked whether we had such a definition in existing components. I saw we defined it in the following way if there are no other additional props i.e in TermsAndLicenses
and UnreadActionIndicator
.
So I was okay with it.
@pecanoro Any thoughts though?
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.
Ok. I still think that we should move any prop definition to the top of the file even if we are spreading properties from other objects.
But it fine too.
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 there are guidelines for this exactly so it's fine either way. If any of you feel passionate about it, it would be good to bring it up on Slack.
Details
#12049 (comment)
Fixed Issues
$ #12049
PROPOSAL: #12049 (comment)
Tests
QA Steps
PR Review Checklist
PR Author Checklist
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
)src/languages/*
filesWaiting 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)PR Reviewer Checklist
The reviewer will copy/paste it into a new comment and complete it after the author checklist is completed
### Fixed Issues
section aboveTests
sectionQA steps
sectiontoggleReport
and notonIconClick
).src/languages/*
filesWaiting 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
have been tested & I retested again)/** 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)Screenshots
Web
Screen.Recording.2022-10-27.at.9.30.01.PM.mov
Mobile Web - Chrome
Screen.Recording.2022-10-27.at.10.09.36.PM.mov
Mobile Web - Safari
Screen.Recording.2022-10-27.at.9.39.12.PM.mov
Desktop
Screen.Recording.2022-10-27.at.9.58.25.PM.mov
iOS
Screen.Recording.2022-10-27.at.9.43.13.PM.mov
Android
Screen.Recording.2022-10-27.at.9.47.28.PM.mov