Skip to content

[V3 Beta] Streamline Card Payments UI#384

Open
sshropshire wants to merge 24 commits into
v3-betafrom
v3-beta__streamline_ui
Open

[V3 Beta] Streamline Card Payments UI#384
sshropshire wants to merge 24 commits into
v3-betafrom
v3-beta__streamline_ui

Conversation

@sshropshire

@sshropshire sshropshire commented Apr 27, 2026

Copy link
Copy Markdown
Collaborator

Summary of changes

  • This PR streamlines the Card Payments UI into a single scroll view.
  • This PR also makes use of environmentObject and ObservableObject to clean up UI state management logic.

After Refactor

screenshot-ui-post-streamline-refactor.mov

Current State on main

screenshot-ui-pre-streamline-refactor.mov

Checklist

  • Added a changelog entry

Authors

List GitHub usernames for everyone who contributed to this pull request.

@sshropshire
sshropshire force-pushed the v3-beta__streamline_ui branch from 118f9d0 to c2d26c1 Compare April 27, 2026 22:28
@sshropshire
sshropshire marked this pull request as ready for review April 28, 2026 16:16
@sshropshire sshropshire changed the title V3 Beta: Streamline Card Payments UI [V3 Beta] Streamline Card Payments UI Apr 28, 2026
@MikeThorntonPayPal
MikeThorntonPayPal self-requested a review May 4, 2026 14:51
Comment on lines +9 to +11
.font(.system(size: 20))
.frame(maxWidth: .infinity, alignment: .leading)
.font(.headline)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Two .font() modifiers are applied to the same Text: .font(.system(size: 20)) and .font(.headline). The first one wins in SwiftUI, so .font(.headline) on line 11 is silently ignored. Remove one or the other.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in c374693.

}
ScrollAnchor(id: "bottomAnchor")
}
.onChange(of: viewModel.stepCount) { _ in

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

onChange(of:) with trailing closure { _ in } is the deprecated iOS 14-style API. If the deployment target supports iOS 17+, use the newer onChange(of:) { oldValue, newValue in }

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Should we upgrade the demo app to iOS 17? We probably should bump the min supported version for v3 of our SDK to give us more flexibility. I could improve this PR a good bit if we bump the version too.

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.

2 participants