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

Update embedded appearance API and add to playground #4062

Merged
merged 5 commits into from
Sep 27, 2024

Conversation

porter-stripe
Copy link
Collaborator

Summary

  • Updates the embedded appearance API based on the outcome of API review
  • Updates the playground appearance view to have the new properties from the embedded appearance API
Simulator.Screen.Recording.-.iOS.18.-.2024-09-26.at.09.41.56.mp4

Motivation

  • Embedded

Testing

  • Manual

Changelog

N/A

@porter-stripe porter-stripe marked this pull request as ready for review September 26, 2024 16:04
@porter-stripe porter-stripe requested review from a team as code owners September 26, 2024 16:04
Copy link
Collaborator

@yuki-stripe yuki-stripe left a comment

Choose a reason for hiding this comment

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

Awesome. BTW let's use the embedded label in PRs going forward!

@@ -6,7 +6,7 @@
// Copyright © 2022 stripe-ios. All rights reserved.
//

@_spi(STP) import StripePaymentSheet
@_spi(STP) @_spi(EmbeddedPaymentElementPrivateBeta) import StripePaymentSheet
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we remove (STP)? Leaving it risks not noticing if we break visibility of an API.

@@ -237,6 +284,7 @@ struct AppearancePlaygroundView: View {
Section(header: Text("Miscellaneous")) {
Stepper(String(format: "cornerRadius: %.1f", appearance.cornerRadius), value: cornerRadiusBinding, in: 0...30)
Stepper(String(format: "borderWidth: %.1f", appearance.borderWidth), value: borderWidthBinding, in: 0.0...2.0, step: 0.5)
Stepper(String(format: "selectedBorderWidth: %.1f", appearance.selectedBorderWidth ?? appearance.borderWidth * 1.5), value: borderWidthBinding, in: 0.0...2.0, step: 0.5)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Stepper(String(format: "selectedBorderWidth: %.1f", appearance.selectedBorderWidth ?? appearance.borderWidth * 1.5), value: borderWidthBinding, in: 0.0...2.0, step: 0.5)
Stepper(String(format: "selectedBorderWidth: %.1f", appearance.selectedBorderWidth ?? appearance.borderWidth * 1.5), value: selectedBorderWidthBinding, in: 0.0...2.0, step: 0.5)

right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ah good eye!

Comment on lines 278 to 279
/// The insets of the separator line between rows
public var separatorInsets: UIEdgeInsets?
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's add a note about behavior when nil.

@porter-stripe porter-stripe merged commit cb94005 into master Sep 27, 2024
5 checks passed
@porter-stripe porter-stripe deleted the porter/embedded-appearance-playground branch September 27, 2024 18:22
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.

2 participants