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

[NT-497] Ensure payment methods scroll edge-to-edge #941

Merged
merged 2 commits into from
Nov 12, 2019

Conversation

justinswart
Copy link
Contributor

πŸ“² What

Restructures our UIStackView hierarchies to allow the payment methods to scroll edge-to-edge.

πŸ€” Why

The experience isn't currently correct in that the views are being clipped by the parent UIStackView.

πŸ›  How

Restructed the view hierarchy so that insets are now applied to child stackviews rather than the parent, this allows us to not set any insets for the stackview containing the payment methods scrollview.

πŸ‘€ See

Before πŸ› After πŸ¦‹
image image

βœ… Acceptance criteria

  • The payment methods now scroll edge-to-edge in the pledge view.
  • The payment methods now scroll edge-to-edge in change payment method view.
  • Only noticeable change in snapshots is that the cards reach all the way to the right edge.

Copy link
Contributor

@ifbarrera ifbarrera left a comment

Choose a reason for hiding this comment

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

Minor comment, lgtm!

private let nestedStackViewStyle: StackViewStyle = { stackView in
stackView
|> checkoutRootStackViewStyle
|> \.layoutMargins .~ UIEdgeInsets(leftRight: CheckoutConstants.PledgeView.Inset.leftRight)
Copy link
Contributor

Choose a reason for hiding this comment

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

checkoutRootStackViewStyle already has a leftRight margin inset of Styles.grid(4) πŸ€” not sure you need this nestedStackViewStyle then...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is to remove the top and bottom insets 😬

@justinswart justinswart merged commit d0d27a4 into master Nov 12, 2019
@justinswart justinswart deleted the payment-methods-edge-to-edge branch November 12, 2019 19:52
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