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-574] Fix various spacing issues on Pledge screen #952

Merged
merged 15 commits into from
Nov 21, 2019
Merged

Conversation

ifbarrera
Copy link
Contributor

📲 What

Fixes a few spacing issues we were seeing on the pledge screen.

  • spacing after the payment methods
  • button height on the PledgeCreditCardView and AddNewCardView should be consistent now

🤔 Why

Design/visual cleanup.

🛠 How

Updating the PledgeCreditCardView to use a layout guide instead of a spacer view in the stack view. The layout guide will now serve as a "spacer" in the scenario where the unavailable card label is shown.

👀 See

Trello, screenshots, external resources?

Before 🐛 After 🦋
IMG_0431 Simulator Screen Shot - iPhone 8 - 2019-11-15 at 10 21 36

♿️ Accessibility

  • Tap targets use minimum of 44x44 pts dimensions

🏎 Performance

N/A

✅ Acceptance criteria

  • Navigate to pledge screen and verify that the spacing after the payment methods section is reasonable

@cdolm92
Copy link
Contributor

cdolm92 commented Nov 19, 2019

The spacing still looks a little large, let me know what you think:

Simulator Screen Shot - iPhone Xs - 2019-11-19 at 18 11 49

…NT-574

# Conflicts:
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_NeedsConversion_IsFalse_lang_en_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_NeedsConversion_IsTrue_lang_ja_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_de_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_de_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_en_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_es_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_es_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_fr_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_fr_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_ja_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_ja_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_de_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_de_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_en_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_en_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_es_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_es_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_fr_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_fr_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_ja_device_phone4_7inch_LoggedIn@2x.png
let mockService = MockService(fetchGraphCreditCardsResponse: userEnvelope)
let project = Project.template
|> \.availableCardTypes .~ [GraphUserCreditCard.CreditCardType.discover.rawValue]
let device = Device.phone4inch
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we test for the other devices?

(.template |> \.id .~ "123")
)
|> \.availableCardTypes .~ [GraphUserCreditCard.CreditCardType.discover.rawValue]
let device = Device.phone4_7inch
Copy link
Contributor

Choose a reason for hiding this comment

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

here too

…NT-574

# Conflicts:
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_NeedsConversion_IsFalse_lang_en_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_NeedsConversion_IsTrue_lang_ja_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_de_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_de_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_en_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_es_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_es_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_fr_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_fr_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_ja_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsFalse_lang_ja_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_de_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_de_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_en_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_en_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_es_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_es_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_fr_device_pad_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_fr_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_PledgeContext_NeedsConversion_IsTrue_lang_ja_device_phone4_7inch_LoggedIn@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_NeedsConversion_IsFalse_lang_de_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_NeedsConversion_IsFalse_lang_de_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_NeedsConversion_IsFalse_lang_en_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_NeedsConversion_IsFalse_lang_en_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_NeedsConversion_IsFalse_lang_es_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_NeedsConversion_IsFalse_lang_es_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_NeedsConversion_IsFalse_lang_fr_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_NeedsConversion_IsFalse_lang_fr_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_NeedsConversion_IsFalse_lang_ja_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_NeedsConversion_IsFalse_lang_ja_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_NeedsConversion_IsTrue_lang_de_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_NeedsConversion_IsTrue_lang_de_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_NeedsConversion_IsTrue_lang_en_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_NeedsConversion_IsTrue_lang_en_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_NeedsConversion_IsTrue_lang_es_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_NeedsConversion_IsTrue_lang_es_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_NeedsConversion_IsTrue_lang_fr_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_NeedsConversion_IsTrue_lang_fr_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_NeedsConversion_IsTrue_lang_ja_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_NeedsConversion_IsTrue_lang_ja_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_withConversionLabel_lang_de_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_withConversionLabel_lang_de_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_withConversionLabel_lang_en_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_withConversionLabel_lang_en_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_withConversionLabel_lang_es_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_withConversionLabel_lang_es_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_withConversionLabel_lang_fr_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_withConversionLabel_lang_fr_device_phone4_7inch@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_withConversionLabel_lang_ja_device_pad@2x.png
#	Screenshots/_64/Kickstarter_Framework_iOSTests.PledgeViewControllerTests/testView_UpdateContext_withConversionLabel_lang_ja_device_phone4_7inch@2x.png
Copy link
Contributor

@justinswart justinswart left a comment

Choose a reason for hiding this comment

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

Cool! Good idea to use UILayoutGuide, should remember that in future for tricky layout stuff.

@ifbarrera ifbarrera merged commit b9a29f2 into master Nov 21, 2019
@ifbarrera ifbarrera deleted the NT-574 branch November 21, 2019 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants