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

STPFormView and StackViewWithSeparator better SwiftUI support #4275

Closed
wants to merge 2 commits into from

Conversation

wooj-stripe
Copy link
Collaborator

@wooj-stripe wooj-stripe commented Nov 17, 2024

Summary

Surrouding higher priority views around STPCardFormView was causing the view to completely collapse depsite already setting contentCompressionResistancePriority. To remedy, determine the intrinsic content size such that swift ui can lay this view out better.

Motivation

Adding Spacers() w/ higher priority around this view can cause this view to completely collapse.

Testing

Manual testing

Before after
image image

Changelog

Copy link
Collaborator Author

@wooj-stripe wooj-stripe left a comment

Choose a reason for hiding this comment

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

Seems that the spacing is off for a few. I will try and match this up the best i can, and there are some places that I've obviously broken... From a quick review:

  • Not sure what's going on with: testEmptyHiddenPostalCode
  • In testSingleSectionWithTItle -- the title is missing.

Copy link

⚠️ Public API changes detected:

StripePaymentsUI

- public var intrinsicContentSize: CoreFoundation.CGSize {
+ @objc get
+ }

If you are adding a new public API consider the following:

  • Do these APIs need to be public or can they be protected with @_spi(STP)?
  • If these APIs need to be public, assess whether they require an API review.

If you are modifying or removing a public API:

  • Does this require a breaking version change?
  • Do these changes require API review?

If you confirm these APIs need to be added/updated and have undergone necessary review, add the label modifies public API to this PR to acknowledge and bypass this check.

ℹ️ If this comment appears to be left in error, make sure your branch is up-to-date with master.

@wooj-stripe
Copy link
Collaborator Author

#4284

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.

1 participant