-
Notifications
You must be signed in to change notification settings - Fork 996
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 CGColor
s to update on trait collection changes
#4513
base: master
Are you sure you want to change the base?
Conversation
CGColor
s to update on trait collection changes
🚨 New dead code detected in this PR: InstitutionSearchBar.swift:22 warning: Property 'shadowLayer' is unused Please remove the dead code before merging. If this is intentional, you can bypass this check by adding the label ℹ️ 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 |
d4a0ec3
to
4f2556e
Compare
|
Name | Version | Download | Change | Install | Change | Approval |
---|---|---|---|---|---|---|
StripeSize com.stripe.StripeSize |
1.0 (1) | 2.1 MB | ⬇️ 2.3 kB (-0.11%) | 6.9 MB | ⬇️ 1.4 kB (-0.02%) | N/A |
StripePaymentsSize com.stripe.StripePaymentsSize |
1.0 (1) | 1.2 MB | ⬇️ 2.8 kB (-0.23%) | 4.2 MB | ⬇️ 1.4 kB (-0.03%) | N/A |
StripePaymentsUISize com.stripe.StripePaymentsUISize |
1.0 (1) | 1.9 MB | ⬇️ 2.8 kB (-0.15%) | 6.4 MB | ⬇️ 1.4 kB (-0.02%) | N/A |
StripePaymentSheetSize com.stripe.StripePaymentSheetSize |
1.0 (1) | 3.7 MB | ⬇️ 8.4 kB (-0.22%) | 11.1 MB | ⬇️ 21.6 kB (-0.2%) | N/A |
StripeApplePaySize com.stripe.StripeApplePaySize |
1.0 (1) | 486.8 kB | ⬇️ 2.0 kB (-0.42%) | 1.7 MB | ⬇️ 108 B | N/A |
StripeFinancialConnectionsSize com.stripe.StripeFinancialConnectionsSize |
1.0 (1) | 1.5 MB | ⬆️ 1.2 kB (0.08%) | 4.8 MB | ⬆️ 6.4 kB (0.13%) | N/A |
StripeSize 1.0 (1)
com.stripe.StripeSize
⚖️ Compare build
⏱️ Analyze build performance
Total install size change: ⬇️ 1.4 kB (-0.02%)
Total download size change: ⬇️ 2.3 kB (-0.11%)
Largest size changes
Item | Install Size Change |
---|---|
StripeCore.STPAnalyticEvent.init(rawValue) | ⬇️ -4.2 kB |
Other | ⬆️ 2.8 kB |
StripePaymentsSize 1.0 (1)
com.stripe.StripePaymentsSize
⚖️ Compare build
⏱️ Analyze build performance
Total install size change: ⬇️ 1.4 kB (-0.03%)
Total download size change: ⬇️ 2.8 kB (-0.23%)
Largest size changes
Item | Install Size Change |
---|---|
StripeCore.STPAnalyticEvent.init(rawValue) | ⬇️ -4.2 kB |
DYLD.Exports | ⬇️ -720 B |
Other | ⬆️ 3.5 kB |
StripePaymentsUISize 1.0 (1)
com.stripe.StripePaymentsUISize
⚖️ Compare build
⏱️ Analyze build performance
Total install size change: ⬇️ 1.4 kB (-0.02%)
Total download size change: ⬇️ 2.8 kB (-0.15%)
Largest size changes
Item | Install Size Change |
---|---|
StripeCore.STPAnalyticEvent.init(rawValue) | ⬇️ -4.2 kB |
Other | ⬆️ 2.7 kB |
StripePaymentSheetSize 1.0 (1)
com.stripe.StripePaymentSheetSize
⚖️ Compare build
⏱️ Analyze build performance
Total install size change: ⬇️ 21.6 kB (-0.2%)
Total download size change: ⬇️ 8.4 kB (-0.22%)
Largest size changes
Item | Install Size Change |
---|---|
🗑 StripePaymentSheet.EmbeddedPaymentElementViewModel | ⬇️ -5.6 kB |
StripeCore.STPAnalyticEvent.init(rawValue) | ⬇️ -4.2 kB |
DYLD.Exports | ⬇️ -1.6 kB |
DYLD.Fixups | ⬇️ -960 B |
DYLD.String Table | ⬇️ -904 B |
StripeApplePaySize 1.0 (1)
com.stripe.StripeApplePaySize
⚖️ Compare build
⏱️ Analyze build performance
Total install size change: ⬇️ 108 B
Total download size change: ⬇️ 2.0 kB (-0.42%)
Largest size changes
Item | Install Size Change |
---|---|
StripeCore.STPAnalyticEvent.init(rawValue) | ⬇️ -4.2 kB |
Other | ⬆️ 4.1 kB |
StripeFinancialConnectionsSize 1.0 (1)
com.stripe.StripeFinancialConnectionsSize
⚖️ Compare build
⏱️ Analyze build performance
Total install size change: ⬆️ 6.4 kB (0.13%)
Total download size change: ⬆️ 1.2 kB (0.08%)
Largest size changes
Item | Install Size Change |
---|---|
StripeCore.STPAnalyticEvent.init(rawValue) | ⬇️ -4.2 kB |
🗑 StripeFinancialConnections.AccountPickerRowView.isSelected | ⬇️ -1.2 kB |
📝 StripeFinancialConnections.AccountPickerRowView.updateLayer | ⬆️ 1.1 kB |
📝 StripeFinancialConnections.ConsentLogoView.traitCollectionDidChan... | ⬆️ 532 B |
Other | ⬆️ 10.1 kB |
Unsuccessful Builds
Name | Message |
---|---|
StripeIdentitySize com.stripe.StripeIdentitySize |
The diff could not be determined because no build for 847b7cb was uploaded |
StripeConnectSize com.stripe.StripeConnectSize |
The diff could not be determined because no build for 847b7cb was uploaded |
🛸 Powered by Emerge Tools
2 builds increased size, 6 builds had no size change
StripeSize 1.0 (1)
|
Item | Install Size Change |
---|---|
🗑 StripeFinancialConnections.AccountPickerRowView.isSelected | ⬇️ -1.2 kB |
📝 StripeFinancialConnections.AccountPickerRowView.updateLayer | ⬆️ 1.1 kB |
📝 StripeFinancialConnections.ConsentLogoView.traitCollectionDidChan... | ⬆️ 532 B |
Other | ⬆️ 5.7 kB |
StripeConnectSize 1.0 (1)
com.stripe.StripeConnectSize
⚖️ Compare build
⏱️ Analyze build performance
Total install size change: ⬆️ 6.5 kB (0.12%)
Total download size change: ⬆️ 2.5 kB (0.15%)
Largest size changes
Item | Install Size Change |
---|---|
🗑 StripeFinancialConnections.AccountPickerRowView.isSelected | ⬇️ -1.2 kB |
📝 StripeFinancialConnections.AccountPickerRowView.updateLayer | ⬆️ 1.1 kB |
📝 StripeFinancialConnections.ConsentLogoView.traitCollectionDidChan... | ⬆️ 532 B |
Other | ⬆️ 6.1 kB |
🛸 Powered by Emerge Tools
4f2556e
to
74b0a44
Compare
Summary
CGColor
's (which are the underlying color system used for shadows and borders) don't automatically update to their light / dark equivalent when the system theme changes. Because of this, we need to observe those changes (viatraitCollectionDidChange
) and manually update the colors.This is a bit of a tedious change, but is needed for proper dark mode support.
Implementation based on: https://www.jessesquires.com/blog/2020/03/23/implementing-dark-mode-with-cgcolor/
Motivation
Polish dark mode to work correctly with shadows and borders.
Testing
Before:
Screen.Recording.2025-01-29.at.3.45.37.PM.mov
After:
Screen.Recording.2025-01-29.at.3.44.52.PM.mov
Changelog
N/a