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

Removes height constraint from the disclaimer button #818

Merged
merged 2 commits into from
Aug 26, 2019

Conversation

dusi
Copy link
Contributor

@dusi dusi commented Aug 26, 2019

📲 What

Removes height constraint form the disclaimer button in order for the label to not have a limited height.

🤔 Why

Limiting the height makes the label cut off some of the text which is not desirable. This happens on smaller devices like iPhone SE or when users set larger font size.

🛠 How

  • By removing the height constraint on Disclaimer Text View (labels define their intrinsic size based on their text)
  • By also setting placeholder width & height (this is necessary to make Interface Builder happy during the design time - the reason for this is that without any text at design time Xcode can't calculate the final height of the top most Scroll View)
Before 🐛 After 🦋
Before After

👀 See

Before 🐛 After 🦋
Screen Shot 2019-08-26 at 12 09 31 PM Screen Shot 2019-08-26 at 12 07 18 PM
Screen Shot 2019-08-26 at 12 09 37 PM Screen Shot 2019-08-26 at 12 07 41 PM
Screen Shot 2019-08-26 at 12 09 42 PM Screen Shot 2019-08-26 at 12 07 48 PM

✅ Acceptance criteria

iPhone SE

  • Disclaimer button does not cut text off when set to default font size
  • Disclaimer button does not cut text off when set to XXL font size
  • Disclaimer button does not cut text off when set to accessibilityXXL font size

iPhone 8

  • Disclaimer button does not cut text off when set to default font size
  • Disclaimer button does not cut text off when set to XXL font size
  • Disclaimer button does not cut text off when set to accessibilityXXL font size

iPhone X

  • Disclaimer button does not cut text off when set to default font size
  • Disclaimer button does not cut text off when set to XXL font size
  • Disclaimer button does not cut text off when set to accessibilityXXL font size

@dusi
Copy link
Contributor Author

dusi commented Aug 26, 2019

Because the label is sized based on its text it does not need whole 60 pts in its default state (which is why there are new screenshots). You can inspect the diff and see that the card is now couple points shorter in height (that's why it was necessary to re-record)

Copy link
Contributor

@Scollaco Scollaco left a comment

Choose a reason for hiding this comment

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

It looked good in all test cases 🚢

@dusi dusi merged commit 9917a63 into master Aug 26, 2019
@dusi dusi deleted the fix-disclaimer-button-layout branch August 26, 2019 20:48
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.

2 participants