Skip to content

Commit e159463

Browse files
committed
Fix constraint conflict in LinkEmailElement
Fixed unsatisfiable constraints between ActivityIndicator and LinkMoreInfoView by replacing manual trailing constraint with UIStackView's setCustomSpacing API. This avoids conflicting with the stack view's internal UISV-spacing constraint. Also removed LinkMoreInfoView from the broken constraints ignore list since the issue is now resolved. Fixes: https://jira.corp.stripe.com/browse/RUN_MOBILESDK-4562 Committed-By-Agent: claude
1 parent daa12c2 commit e159463

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Example/PaymentSheet Example/PaymentSheet Example/AppDelegate+BrokenConstraints.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ extension AppDelegate {
3636
// Ignore broken constraints that existed at the time of writing this - please try to fix newly introduced ones instead of ignoring!
3737
// Sometimes the broken constraint references something that is unique, in which case we can ignore it easily
3838
let ignoredBrokenConstraints = [
39-
"STP_Internal_LinkMoreInfoView", // https://jira.corp.stripe.com/browse/RUN_MOBILESDK-4562
4039
"verticalSeparatorWidth' separator|.width == 0.333333", // Apple broken UIAlert constraint - oddly they never log this either; maybe they also have an ignorelist!
4140
"UISV-spacing' H:[_UIInterfaceActionCustomViewRepresentationView:", // Same as ^
4241
"_UIModernBarButton:", // iOS 26+ keyboard toolbar issue

StripePaymentSheet/StripePaymentSheet/Source/Internal/Link/Elements/LinkEmailElement.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,9 @@ class LinkEmailElement: Element {
4242
trailing: theme.textFieldInsets.trailing
4343
)
4444
if let infoView = infoView {
45+
// Use stack view's custom spacing instead of manual constraints to avoid conflicts
46+
stackView.setCustomSpacing(ElementsUI.contentViewInsets.trailing, after: activityIndicator)
4547
NSLayoutConstraint.activate([
46-
activityIndicator.trailingAnchor.constraint(equalTo: infoView.leadingAnchor, constant: -ElementsUI.contentViewInsets.trailing),
4748
infoView.widthAnchor.constraint(equalToConstant: LinkMoreInfoView.Constants.logoWidth),
4849
])
4950
}

0 commit comments

Comments
 (0)