Skip to content
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

Provide ways to define PayLaterButton color from xml #258

Merged
merged 7 commits into from
May 24, 2024

Conversation

saperi22
Copy link
Contributor

@saperi22 saperi22 commented May 20, 2024

Summary of changes

Addresses a Live Issue reported by a merchant.

  • Fix issue with PayLaterButton not honoring paypal_color attribute in xml.
  • PayLaterButton used to extend from PayPalButton, but now it extends from PaymentButton. I'm providing a new attribute paylater_color to change the button color in xml.

Checklist

  • Added a changelog entry

Authors

List GitHub usernames for everyone who contributed to this pull request.

Screenshots

Screenshot 2024-05-23 at 9 36 08 AM Screenshot 2024-05-23 at 9 36 14 AM

@saperi22 saperi22 marked this pull request as ready for review May 21, 2024 02:02
@saperi22 saperi22 requested a review from a team as a code owner May 21, 2024 02:02
@sarahkoop
Copy link
Contributor

@saperi22 Do you have more context on why the button changed from extending PayPalButton to extending PaymentButton?

@saperi22
Copy link
Contributor Author

saperi22 commented May 21, 2024

@sarahkoop context here: https://github.com/paypal/paypal-android/pull/245/files#r1521937925
TL;DR a change made for button analytics.

@@ -72,6 +75,14 @@ class PayLaterButton @JvmOverloads constructor(
)
}

private fun updateColorFrom(typedArray: TypedArray) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not to expand the scope of this PR, but does this same bug exist for the PayPalCreditButton and PayPalButton?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, those didn't have changes.
The reason this broke is because of the change in inheritance.

@saperi22 saperi22 requested a review from sarahkoop May 24, 2024 17:41
@saperi22 saperi22 merged commit c72ed1b into main May 24, 2024
7 checks passed
@saperi22 saperi22 deleted the fix-ui-issue-paylater branch May 24, 2024 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants