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

Make CustomerSheet.Configuration non nullable. #7627

Merged

Conversation

jaynewstrom-stripe
Copy link
Collaborator

@jaynewstrom-stripe jaynewstrom-stripe commented Nov 13, 2023

Summary

Make customer sheet configuration non null. This is to ensure defaults live in one place. Similar PR done in #7625

@@ -19,7 +19,7 @@ import com.stripe.android.utils.rememberActivityOrNull
@ExperimentalCustomerSheetApi
@Composable
fun rememberCustomerSheet(
configuration: CustomerSheet.Configuration = CustomerSheet.Configuration(),
configuration: CustomerSheet.Configuration,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I’m not sure what to think about this. Should we relax this to a nullable config and create a default configuration internally, with the application label as the merchant name?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Totally possible. This is what we do for PaymentSheet.

If everything else in this sounds good to you, I think we should definitely do that and ship it.

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 do it!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Chatted offline. Slightly more inclined to leave it as not optional since the non compose way to instantiate CustomerSheet already requires a config.

@jaynewstrom-stripe jaynewstrom-stripe marked this pull request as ready for review November 13, 2023 21:37
@jaynewstrom-stripe jaynewstrom-stripe force-pushed the jaynewstrom/non-null-customersheet-configuration branch from b7e0545 to f8444b5 Compare November 17, 2023 16:05
@jaynewstrom-stripe jaynewstrom-stripe enabled auto-merge (squash) November 17, 2023 16:31
@jaynewstrom-stripe jaynewstrom-stripe merged commit 4cd5ca9 into master Nov 17, 2023
8 checks passed
@jaynewstrom-stripe jaynewstrom-stripe deleted the jaynewstrom/non-null-customersheet-configuration branch November 17, 2023 16:59
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

2 participants