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

Add embedded to playground #4025

Merged
merged 6 commits into from
Sep 25, 2024
Merged

Add embedded to playground #4025

merged 6 commits into from
Sep 25, 2024

Conversation

porter-stripe
Copy link
Collaborator

@porter-stripe porter-stripe commented Sep 17, 2024

Summary

  • Adds an embedded toggle to the playground that when enabled results in a new view controller being presented with the embedded integration
  • Passes in the settings and appearance. In the future we may need to pass more info in, but can add as needed.
  • When embedded is selected we enforce that we are not using CSC or horizontal mode
Simulator.Screen.Recording.-.iOS.18.-.2024-09-17.at.11.49.45.mp4

Motivation

  • Easier embedded testing

Testing

  • Manual

Changelog

N/A

} set: { newUIStyle in
// If we switch to embedded put style back to vertical and default back to deferred CSC if we are in an intent first integration
if newUIStyle == .embedded {
playgroundController.settings.layout = .vertical
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Even though embedded doesn't use this layout API, I think it makes the most sense to change the toggle to vertical as that's what most resembles embedded.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it possible to disable the inapplicable toggles rather than changing their selection?

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 yes, easier than I anticipated! I left the logic for changing the confirmation type but now also disable it. I think it makes sense that it always goes back to deferred CSC, then disabling.

Simulator Screenshot - iOS 18  - 2024-09-24 at 14 32 12

Copy link
Collaborator

Choose a reason for hiding this comment

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

Switching normal -> deferred_csc makes sense.

IMO I don't want it to switch to .vertical though; that's more confusing than helpful since the value is ignored either way. It should just stay whatever value it was.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

🤦 I agree, I thought I had removed that but clearly didn't. Fixed!

@porter-stripe porter-stripe marked this pull request as ready for review September 17, 2024 23:25
@porter-stripe porter-stripe requested review from a team as code owners September 17, 2024 23:25
@stripe stripe deleted a comment from github-actions bot Sep 24, 2024
@porter-stripe porter-stripe enabled auto-merge (squash) September 25, 2024 14:50
@porter-stripe porter-stripe merged commit ffdd561 into master Sep 25, 2024
5 checks passed
@porter-stripe porter-stripe deleted the porter/embedded-playground branch September 25, 2024 16:43
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