-
Notifications
You must be signed in to change notification settings - Fork 352
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
Fix voucher dialog margins #5152
Fix voucher dialog margins #5152
Conversation
IOS-308 Voucher submission dialog should use the same margins as other info dialogs
https://mullvad.slack.com/archives/C052D9X882U/p1694419482421749 Zeplin should have all the dimensions needed for this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 2 files reviewed, 1 unresolved discussion (waiting on @rablador)
ios/MullvadVPN/UI appearance/UIMetrics.swift
line 41 at r1 (raw file):
static let cornerRadius = 8.0 static let preferredContentSize = CGSize(width: 280, height: 260) static let contentLayoutMargins = NSDirectionalEdgeInsets(top: 16, leading: 16, bottom: 16, trailing: 16)
we have RedeemVoucherViewConfiguration
for having diffrent properties for voucher view appearance in account flow or profile.please addd directionalLayoutMargins
property into RedeemVoucherViewConfiguration
and set different values for them from their coordinators:
**import** Foundation
**import** UIKit
**struct** RedeemVoucherViewConfiguration {
**let** adjustViewWhenKeyboardAppears: Bool
**let** directionalLayoutMargins : NSDirectionalEdgeInsets
}
then in CreateAccountVoucherCoordinator
set UIMetrics.contentLayoutMargins
and in
ProfileVoucherCoordinator
set the custom alert margin
738e9bb
to
c51a2a6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 0 of 5 files reviewed, 1 unresolved discussion (waiting on @mojganii)
ios/MullvadVPN/UI appearance/UIMetrics.swift
line 41 at r1 (raw file):
Previously, mojganii wrote…
we have
RedeemVoucherViewConfiguration
for having diffrent properties for voucher view appearance in account flow or profile.please addddirectionalLayoutMargins
property intoRedeemVoucherViewConfiguration
and set different values for them from their coordinators:**import** Foundation **import** UIKit **struct** RedeemVoucherViewConfiguration { **let** adjustViewWhenKeyboardAppears: Bool **let** directionalLayoutMargins : NSDirectionalEdgeInsets }
then in
CreateAccountVoucherCoordinator
setUIMetrics.contentLayoutMargins
and in
ProfileVoucherCoordinator
set the custom alert margin
Done.
c51a2a6
to
71d4e16
Compare
Voucher submission dialog should use the same margins as other info dialogs.
See: https://mullvad.slack.com/archives/C052D9X882U/p1694419482421749
This change is