Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFix #1649 Extending Onboarding UI Below Safe Area #1681
Conversation
| @@ -13,6 +13,7 @@ extension OnboardingAdsCountdownViewController { | |||
| /// A negative spacing is needed to make rounded corners for details view visible. | |||
| static let negativeSpacing: CGFloat = -16 | |||
| static let descriptionContentInset: CGFloat = 32 | |||
| static let descriptionContentBottomInset: CGFloat = 52 | |||
This comment has been minimized.
This comment has been minimized.
| @@ -112,12 +113,13 @@ extension OnboardingAdsCountdownViewController { | |||
| mainStackView.snp.makeConstraints { | |||
This comment has been minimized.
This comment has been minimized.
Brandon-T
Oct 15, 2019
Collaborator
This would change to:
mainStackView.snp.makeConstraints {
$0.leading.trailing.bottom.equalToSuperview()
}
| } | ||
|
|
||
| descriptionView.addSubview(descriptionStackView) | ||
| descriptionStackView.snp.makeConstraints { | ||
| $0.edges.equalToSuperview().inset(UX.descriptionContentInset) | ||
| $0.top.leading.trailing.equalToSuperview().inset(UX.descriptionContentInset) |
This comment has been minimized.
This comment has been minimized.
Brandon-T
Oct 15, 2019
Collaborator
and this would change to:
descriptionStackView.snp.makeConstraints {
$0.edges.equalTo(descriptionView.safeArea.edges).inset(UX.descriptionContentInset)
}
Now you don't have to worry about "52" :). It will automatically calculate how far from the bottom it should be.
|
For this particular ticket, when we change it to extend the safe-area insets, we also have to update the animation in |
|
This will get fixed in #1684, sorry for that. Brandon assigned himself to this task few days ago, for contributors it's usually the best to take tasks without assignments or ask if it can be picked up in case someones is assigned to it. Really appreciate your help, your first PR #1628 should get merged in after one more round of code review :) |
chickdan commentedOct 15, 2019
Summary of Changes
This change sets the bottom of the modal equal to the superview and provides a new content inset for the description stack view to account for the size of the safe area.
Regarding the centering of the button noted in the issue: I noticed the button is off center on all of the onboarding modals and feel like the change(s) could potentially be large enough to be out of scope.
This pull request fixes issue #1649
Submitter Checklist:
NSLocalizableString()Test Plan:
Screenshots:
Reviewer Checklist:
QA/(Yes|No)release-notes/(include|exclude)bug/enhancement