Skip to content

Commit 8a0d701

Browse files
authored
Fix constraint conflict in LinkEmailElement (#5822)
## Summary <!-- Simple summary of what was changed. --> This pull request fixes an unsatisfiable constraint in `LinkEmailElement`. ## Motivation <!-- Why are you making this change? If it's for fixing a bug, if possible, please include a code snippet or example project that demonstrates the issue. --> [RUN_MOBILESDK-4562](https://jira.corp.stripe.com/browse/RUN_MOBILESDK-4562) ## Testing <!-- How was the code tested? Be as specific as possible. --> <!-- Ignored Tests: Did you newly ignore a test in this PR? If so, please open an R4 incident so that the test can be re-enabled as soon as possible--> <details><summary>Before</summary> <p> https://github.com/user-attachments/assets/95567b54-ab80-4c00-9b0d-f037dac834d8 </p> </details> <details><summary>After</summary> <p> https://github.com/user-attachments/assets/2dee1416-42b3-4835-807d-8e8e5bc6b2b0 </p> </details> ## Changelog <!-- Is this a notable change that affects users? If so, add a line to `CHANGELOG.md` and prefix the line with one of the following: - [Added] for new features. - [Changed] for changes in existing functionality. - [Deprecated] for soon-to-be removed features. - [Removed] for now removed features. - [Fixed] for any bug fixes. - [Security] in case of vulnerabilities. --> N/A
1 parent 0098a91 commit 8a0d701

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)