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

Link v3: Assets and component views #4114

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

davidme-stripe
Copy link
Contributor

@davidme-stripe davidme-stripe commented Oct 8, 2024

Summary

Bring back a grab bag of assets, colors, and component views for Link. These are all self-contained and don't change the current functionality, but will be used by the ViewControllers in later PRs.

The black and white Link logo in the snapshot tests is a known issue — we'll have updated logo assets before launch.

This code was all reviewed previously, but we should give it another look as we merge it back in.

Motivation

Link v2

Testing

Resurrected some snapshot tests

Changelog

None

Copy link

emerge-tools bot commented Oct 9, 2024

⚠️ 1 new unused protocol, 3 builds increased size, 3 builds had no size change

Name Version Download Change Install Change Approval
StripeSize
com.stripe.StripeSize
1.0 (1) 2.4 MB ⬆️ 169 B 7.8 MB ⬆️ 320 B N/A
StripeApplePaySize
com.stripe.StripeApplePaySize
1.0 (1) 435.1 kB - 1.5 MB - N/A
StripeFinancialConnectionsSize
com.stripe.StripeFinancialConnectionsSize
1.0 (1) 1.3 MB - 4.3 MB - N/A
StripePaymentsSize
com.stripe.StripePaymentsSize
1.0 (1) 1.1 MB ⬇️ 1 B 4.1 MB - N/A
StripePaymentsUISize
com.stripe.StripePaymentsUISize
1.0 (1) 1.9 MB ⬇️ 75 B 6.3 MB ⬆️ 320 B N/A
StripePaymentSheetSize
com.stripe.StripePaymentSheetSize
1.0 (1) 3.4 MB ⬆️ 8.8 kB (0.26%) 10.2 MB ⬆️ 30.0 kB (0.29%) N/A

StripeSize 1.0 (1)
com.stripe.StripeSize

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬆️ 320 B
Total download size change: ⬆️ 169 B

Largest size changes

Item Install Size Change
📝 StripePaymentsUI.CardBrandView.init(showCVC,centerHorizontally) ⬆️ 1.8 kB
🗑 StripePaymentsUI.CardBrandView.init(showCVC) ⬇️ -1.7 kB
Other ⬆️ 228 B
View Treemap

Image of diff

StripeApplePaySize 1.0 (1)
com.stripe.StripeApplePaySize

No changes to report

StripeFinancialConnectionsSize 1.0 (1)
com.stripe.StripeFinancialConnectionsSize

No changes to report

StripePaymentsSize 1.0 (1)
com.stripe.StripePaymentsSize

No changes to report

StripePaymentsUISize 1.0 (1)
com.stripe.StripePaymentsUISize

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬆️ 320 B
Total download size change: ⬇️ 75 B

Largest size changes

Item Install Size Change
📝 StripePaymentsUI.CardBrandView.init(showCVC,centerHorizontally) ⬆️ 1.8 kB
🗑 StripePaymentsUI.CardBrandView.init(showCVC) ⬇️ -1.7 kB
Other ⬆️ 228 B
View Treemap

Image of diff

StripePaymentSheetSize 1.0 (1)
com.stripe.StripePaymentSheetSize

⚖️ Compare build
⏱️ Analyze build performance

Total install size change: ⬆️ 30.0 kB (0.29%)
Total download size change: ⬆️ 8.8 kB (0.26%)

Largest size changes

Item Install Size Change
Packed Asset ⬆️ 0 B
Other ⬆️ 3.3 kB
📝 StripePaymentSheet.LinkNavigationBar.LinkNavigationBar ⬆️ 3.0 kB
📝 StripePaymentsUI.CardBrandView.init(showCVC,centerHorizontally) ⬆️ 1.8 kB
🗑 StripePaymentsUI.CardBrandView.init(showCVC) ⬇️ -1.7 kB
View Treemap

Image of diff


🛸 Powered by Emerge Tools

Copy link

github-actions bot commented Oct 9, 2024

🚨 New dead code detected in this PR:

LinkBadgeView.swift:15 warning: Class 'LinkBadgeView' is unused
LinkBadgeView.swift:104 warning: Extension 'BadgeType' is unused
LinkNavigationBar.swift:18 warning: Class 'LinkNavigationBar' is unused
LinkNoticeView.swift:17 warning: Class 'LinkNoticeView' is unused
LinkNoticeView.swift:90 warning: Extension 'NoticeType' is unused
LinkToast.swift:11 warning: Imported module 'StripeCore' is unused
LinkToast.swift:17 warning: Class 'LinkToast' is unused
LinkToast.swift:96 warning: Extension 'LinkToast' is unused
LinkToast.swift:171 warning: Extension 'ToastType' is unused
Button+Link.swift:31 warning: Function 'linkSecondary()' is unused
Button+Link.swift:42 warning: Function 'linkPlain()' is unused
Button+Link.swift:52 warning: Function 'linkBordered()' is unused
ConfirmButton+Link.swift:13 warning: Function 'makeLinkButton(callToAction:compact:didTap:)' is unused
UIColor+Link.swift:70 warning: Property 'linkControlHighlight' is unused
UIColor+Link.swift:78 warning: Property 'linkControlLightPlaceholder' is unused
UIColor+Link.swift:84 warning: Property 'linkToastBackground' is unused
UIColor+Link.swift:95 warning: Property 'linkSecondaryButtonForeground' is unused
UIColor+Link.swift:101 warning: Property 'linkSecondaryButtonBackground' is unused
UIColor+Link.swift:107 warning: Property 'linkNeutralBackground' is unused
UIColor+Link.swift:119 warning: Property 'linkDangerBackground' is unused
LinkInstantDebitMandateView.swift:27 warning: Struct 'Constants' is unused
LinkInstantDebitMandateView.swift:32 warning: Property 'links' is unused
LinkInstantDebitMandateView.swift:38 warning: Property 'textView' is unused
LinkInstantDebitMandateView.swift:58 warning: Initializer 'init(delegate:)' is unused
LinkInstantDebitMandateView.swift:68 warning: Function 'formattedLegalText()' is unused
LinkKeyboardAvoidingScrollView.swift:15 warning: Class 'LinkKeyboardAvoidingScrollView' is unused
LinkKeyboardAvoidingScrollView.swift:57 warning: Extension 'LinkKeyboardAvoidingScrollView' is unused

Please remove the dead code before merging.

If this is intentional, you can bypass this check by adding the label skip dead code check to this PR.

ℹ️ If this comment appears to be left in error, double check that the flagged code is actually used and/or make sure your branch is up-to-date with master.

Copy link

github-actions bot commented Oct 9, 2024

⚠️ Public API changes detected:

StripePaymentSheet

- public var disabledBackgroundColor: UIKit.UIColor?
- public var disabledTextColor: UIKit.UIColor?
- public init(mode: StripePaymentSheet.PaymentSheet.IntentConfiguration.Mode, paymentMethodTypes: [Swift.String]? = nil, onBehalfOf: Swift.String? = nil, paymentMethodConfigurationId: Swift.String? = nil, confirmHandler: @escaping StripePaymentSheet.PaymentSheet.IntentConfiguration.ConfirmHandler, requireCVCRecollection: Swift.Bool = false)
+ public init(mode: StripePaymentSheet.PaymentSheet.IntentConfiguration.Mode, paymentMethodTypes: [Swift.String]? = nil, onBehalfOf: Swift.String? = nil, paymentMethodConfigurationId: Swift.String? = nil, confirmHandler: @escaping StripePaymentSheet.PaymentSheet.IntentConfiguration.ConfirmHandler)
- public var requireCVCRecollection: Swift.Bool

If you are adding a new public API consider the following:

  • Do these APIs need to be public or can they be protected with @_spi(STP)?
  • If these APIs need to be public, assess whether they require an API review.

If you are modifying or removing a public API:

  • Does this require a breaking version change?
  • Do these changes require API review?

If you confirm these APIs need to be added/updated and have undergone necessary review, add the label modifies public API to this PR to acknowledge and bypass this check.

ℹ️ If this comment appears to be left in error, make sure your branch is up-to-date with master.

@davidme-stripe davidme-stripe marked this pull request as ready for review October 10, 2024 00:28
@davidme-stripe davidme-stripe requested review from a team as code owners October 10, 2024 00:28
@davidme-stripe davidme-stripe changed the title Link v2: Assets and component views Link v3: Assets and component views Oct 10, 2024
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.

1 participant