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

Fix STPThreeDSUICustomization not properly initializing defaults or t… #1303

Merged
merged 1 commit into from
Aug 19, 2019

Conversation

yuki-stripe
Copy link
Collaborator

…he STDS object it's wrapping.

Summary

STPThreeDSUICustomization didn't initialize its properties to default values, and it didn't set up the STDS object it wraps with those default values.

Motivation

😞 Sample code doesn't actually work, old behavior is not ergonomic.

Testing

Added tests for the missing behavior and tried sample code in Standard Integration app.

_uiCustomization.labelCustomization = _labelCustomization.labelCustomization;
_uiCustomization.navigationBarCustomization = _navigationBarCustomization.navigationBarCustomization;
_uiCustomization.selectionCustomization = _selectionCustomization.selectionCustomization;
_uiCustomization.textFieldCustomization = _textFieldCustomization.textFieldCustomization;
Copy link
Contributor

Choose a reason for hiding this comment

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

so the function on line 70 is what was messing me up. Mutating the returned STPThreeDSButotnCustomization wasn't syncing. Do the above _uiCustomization setButtonCustomization calls fix that because now both dictionaries reference the same STDSButtonCustomization instance?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep, exactly. _buttonCustomizationDictionary references STPThreeDSUIButtonCustomization instances which forward all their properties to the underlying STDS instance, which we are now properly setting on _uiCustomization like we should have been (like on line 67, which is why calling the setter synced things).

@yuki-stripe yuki-stripe merged commit 4d8dcb2 into master Aug 19, 2019
@yuki-stripe yuki-stripe deleted the yuki-fix-button-customization branch August 19, 2019 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants