Skip to content

Commit f70733d

Browse files
committed
Update Color access control
1 parent 5421c76 commit f70733d

File tree

5 files changed

+31
-39
lines changed

5 files changed

+31
-39
lines changed

WooCommerce/WooCommerce.xcodeproj/project.pbxproj

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,6 @@
328328
02ACD25A2852E11700EC928E /* RemoveAppleIDAccessCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02ACD2592852E11700EC928E /* RemoveAppleIDAccessCoordinator.swift */; };
329329
02ADC7CC239762E0008D4BED /* PaginatedListSelectorViewProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02ADC7CB239762E0008D4BED /* PaginatedListSelectorViewProperties.swift */; };
330330
02ADC7CE23978EAA008D4BED /* PaginatedProductShippingClassListSelectorDataSourceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02ADC7CD23978EAA008D4BED /* PaginatedProductShippingClassListSelectorDataSourceTests.swift */; };
331-
02ADC7D02398C8EB008D4BED /* UIColor+SystemColors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02ADC7CF2398C8EB008D4BED /* UIColor+SystemColors.swift */; };
332331
02B1AFEC24BC5AE5005DB1E3 /* LinkedProductListSelectorDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02B1AFEB24BC5AE5005DB1E3 /* LinkedProductListSelectorDataSource.swift */; };
333332
02B1AFEE24BC5BA9005DB1E3 /* LinkedProductListSelectorDataSourceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02B1AFED24BC5BA9005DB1E3 /* LinkedProductListSelectorDataSourceTests.swift */; };
334333
02B2828E27C35061004A332A /* RefreshableInfiniteScrollList.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02B2828D27C35061004A332A /* RefreshableInfiniteScrollList.swift */; };
@@ -1582,8 +1581,6 @@
15821581
D88FDB4525DD223B00CB0DBD /* Hardware.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D88FDB4425DD223B00CB0DBD /* Hardware.framework */; };
15831582
D88FDB4625DD223B00CB0DBD /* Hardware.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = D88FDB4425DD223B00CB0DBD /* Hardware.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
15841583
D8915DBF23729CFB00F63762 /* ColorPalette.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D8915DBE23729CFB00F63762 /* ColorPalette.xcassets */; };
1585-
D8915DC12372C8AC00F63762 /* ColorStudio.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8915DC02372C8AC00F63762 /* ColorStudio.swift */; };
1586-
D8915DC32372C9EF00F63762 /* UIColor+ColorStudio.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8915DC22372C9EF00F63762 /* UIColor+ColorStudio.swift */; };
15871584
D89C004725B467C7000E4683 /* ULAccountMismatchViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D89C004625B467C7000E4683 /* ULAccountMismatchViewModel.swift */; };
15881585
D89C009425B4E9E2000E4683 /* ULAccountMismatchViewControllerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D89C009325B4E9E2000E4683 /* ULAccountMismatchViewControllerTests.swift */; };
15891586
D89C009A25B4EEA4000E4683 /* WrongAccountErrorViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D89C009925B4EEA4000E4683 /* WrongAccountErrorViewModelTests.swift */; };
@@ -1609,7 +1606,6 @@
16091606
D8C2A28F231BD00500F503E9 /* ReviewsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8C2A28E231BD00500F503E9 /* ReviewsViewModel.swift */; };
16101607
D8C2A291231BD0FD00F503E9 /* ReviewsDataSource.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8C2A290231BD0FD00F503E9 /* ReviewsDataSource.swift */; };
16111608
D8CD0605258B384E00B52D63 /* oauth2_token-error.json in Resources */ = {isa = PBXBuildFile; fileRef = D8CD0604258B384E00B52D63 /* oauth2_token-error.json */; };
1612-
D8CD710F237A49DB007148B9 /* UIColor+SemanticColors.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8CD710E237A49DB007148B9 /* UIColor+SemanticColors.swift */; };
16131609
D8D15F83230A17A000D48B3F /* ServiceLocator.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8D15F82230A17A000D48B3F /* ServiceLocator.swift */; };
16141610
D8D15F85230A18AB00D48B3F /* Analytics.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8D15F84230A18AB00D48B3F /* Analytics.swift */; };
16151611
D8EE9692264D328A0033B2F9 /* ReceiptViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8EE9690264D328A0033B2F9 /* ReceiptViewController.swift */; };
@@ -9337,7 +9333,6 @@
93379333
CE2A9FD023C4F2C8002BEC1C /* RefundedProductsViewController.swift in Sources */,
93389334
0262DA5823A23AC80029AF30 /* ProductShippingSettingsViewController.swift in Sources */,
93399335
451C77732404534000413F73 /* ProductSettingsSections.swift in Sources */,
9340-
D8915DC32372C9EF00F63762 /* UIColor+ColorStudio.swift in Sources */,
93419336
021739A02773F5F60084CD89 /* StoreStatsChartCircleMarker.swift in Sources */,
93429337
024DF31623742BB6006658FE /* AztecStrikethroughFormatBarCommand.swift in Sources */,
93439338
02817B39242B34560050AD8B /* ToolbarView.swift in Sources */,
@@ -9548,7 +9543,6 @@
95489543
B57C5C9221B80E3C00FF82B2 /* APNSDevice+Woo.swift in Sources */,
95499544
174CA86C27D90E8900126524 /* WooAboutScreenConfiguration.swift in Sources */,
95509545
02A652FF246A908D00755A01 /* BottomSheetListSelectorPresenter.swift in Sources */,
9551-
D8CD710F237A49DB007148B9 /* UIColor+SemanticColors.swift in Sources */,
95529546
D82BB3AA26454F3300A82741 /* CardPresentModalProcessing.swift in Sources */,
95539547
0225C42C2477D0D500C5B4F0 /* ProductFormViewModel.swift in Sources */,
95549548
020F41E523163C0100776C4D /* TopBannerViewModel.swift in Sources */,
@@ -9885,7 +9879,6 @@
98859879
DE69C54A27BB715D000BB888 /* CouponRestrictionsViewModel.swift in Sources */,
98869880
CE1EC8EC20B8A3FF009762BF /* LeftImageTableViewCell.swift in Sources */,
98879881
DE8C946E264699B600C94823 /* PluginListViewModel.swift in Sources */,
9888-
02ADC7D02398C8EB008D4BED /* UIColor+SystemColors.swift in Sources */,
98899882
021125992578D9C20075AD2A /* ShippingLabelPrintingInstructionsView.swift in Sources */,
98909883
68E952CC287536010095A23D /* SafariView.swift in Sources */,
98919884
D449C51C26DE6B5000D75B02 /* IconListItem.swift in Sources */,
@@ -10012,7 +10005,6 @@
1001210005
09885C8727C6947A00910A62 /* ProductPriceSettingsValidator.swift in Sources */,
1001310006
A6557218258B7510008AE7CA /* OrderListCellViewModel.swift in Sources */,
1001410007
B9C4AB2527FDE4B6007008B8 /* CardPresentPluginsDataProvider.swift in Sources */,
10015-
D8915DC12372C8AC00F63762 /* ColorStudio.swift in Sources */,
1001610008
F997174523DC068500592D8E /* XLPagerStrip+AccessibilityIdentifier.swift in Sources */,
1001710009
D8C2A28B231931D100F503E9 /* ReviewViewModel.swift in Sources */,
1001810010
B541B223218A29A6008FE7C1 /* NSParagraphStyle+Woo.swift in Sources */,

WooFoundation/WooFoundation/Colors/ColorStudio.swift

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/// Generates the names of the named colors in the ColorPalette.xcasset
2-
enum ColorStudioName: String, CustomStringConvertible {
2+
public enum ColorStudioName: String, CustomStringConvertible {
33
// MARK: - Base colors
44
case blue
55
case celadon
@@ -13,7 +13,7 @@ enum ColorStudioName: String, CustomStringConvertible {
1313
case yellow
1414
case wooCommercePurple
1515

16-
var description: String {
16+
public var description: String {
1717
// can't use .capitalized because it lowercases the C and P in "wooCommercePurple"
1818
return rawValue.prefix(1).uppercased() + rawValue.dropFirst()
1919
}
@@ -23,7 +23,7 @@ enum ColorStudioName: String, CustomStringConvertible {
2323
///
2424
/// Note: There are a finite number of acceptable values. Not just any Int works.
2525
/// Also, enum cases cannot begin with a number, thus the `shade` prefix.
26-
enum ColorStudioShade: Int, CustomStringConvertible {
26+
public enum ColorStudioShade: Int, CustomStringConvertible {
2727
case shade0 = 0
2828
case shade5 = 5
2929
case shade10 = 10
@@ -37,7 +37,7 @@ enum ColorStudioShade: Int, CustomStringConvertible {
3737
case shade90 = 90
3838
case shade100 = 100
3939

40-
var description: String {
40+
public var description: String {
4141
return "\(rawValue)"
4242
}
4343
}
@@ -48,7 +48,7 @@ extension ColorStudioShade: CaseIterable { }
4848

4949

5050
/// A specific color and shade from Color Studio
51-
struct ColorStudio {
51+
public struct ColorStudio {
5252
let name: ColorStudioName
5353
let shade: ColorStudioShade
5454

@@ -63,17 +63,17 @@ struct ColorStudio {
6363
}
6464

6565
// MARK: - Muriel's semantic colors
66-
static let pink = ColorStudio(name: .pink)
67-
static let wooCommercePurple = ColorStudio(name: .wooCommercePurple)
68-
static let brand = ColorStudio(name: .wooCommercePurple, shade: .shade60)
69-
static let red = ColorStudio(name: .red)
70-
static let gray = ColorStudio(name: .gray)
71-
static let blue = ColorStudio(name: .blue)
72-
static let jetpackGreen = ColorStudio(name: .jetpackGreen)
73-
static let green = ColorStudio(name: .green)
74-
static let yellow = ColorStudio(name: .yellow)
75-
static let orange = ColorStudio(name: .orange)
76-
static let celadon = ColorStudio(name: .celadon)
66+
public static let pink = ColorStudio(name: .pink)
67+
public static let wooCommercePurple = ColorStudio(name: .wooCommercePurple)
68+
public static let brand = ColorStudio(name: .wooCommercePurple, shade: .shade60)
69+
public static let red = ColorStudio(name: .red)
70+
public static let gray = ColorStudio(name: .gray)
71+
public static let blue = ColorStudio(name: .blue)
72+
public static let jetpackGreen = ColorStudio(name: .jetpackGreen)
73+
public static let green = ColorStudio(name: .green)
74+
public static let yellow = ColorStudio(name: .yellow)
75+
public static let orange = ColorStudio(name: .orange)
76+
public static let celadon = ColorStudio(name: .celadon)
7777

7878
/// The full name of the color, with required shade value
7979
func assetName() -> String {

WooFoundation/WooFoundation/Colors/UIColor+ColorStudio.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import UIKit
22

3-
extension UIColor {
3+
public extension UIColor {
44
/// Get a UIColor from the Color Studio color palette
55
///
66
/// - Parameters:
@@ -26,7 +26,7 @@ extension UIColor {
2626
}
2727

2828

29-
extension UIColor {
29+
public extension UIColor {
3030
// A way to create dynamic colors that's compatible with iOS 11 & 12
3131
convenience init(light: UIColor, dark: UIColor) {
3232
self.init { traitCollection in
@@ -49,7 +49,7 @@ extension UIColor {
4949
}
5050
}
5151

52-
extension UIColor {
52+
public extension UIColor {
5353
func color(for trait: UITraitCollection?) -> UIColor {
5454
if let trait = trait {
5555
return resolvedColor(with: trait)

WooFoundation/WooFoundation/Colors/UIColor+SemanticColors.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import UIKit
22

33
// MARK: - Base colors.
4-
extension UIColor {
4+
public extension UIColor {
55
/// Accent. Pink-50 (< iOS 13 and Light Mode) and Pink-30 (Dark Mode)
66
///
77
static var accent: UIColor {
@@ -79,7 +79,7 @@ extension UIColor {
7979

8080

8181
// MARK: - Text Colors.
82-
extension UIColor {
82+
public extension UIColor {
8383
/// Text link. Pink-50
8484
///
8585
static var textLink: UIColor {
@@ -146,7 +146,7 @@ extension UIColor {
146146

147147

148148
// MARK: - Image Colors.
149-
extension UIColor {
149+
public extension UIColor {
150150
/// Placeholder image tint color.
151151
///
152152
static var placeholderImage: UIColor {
@@ -155,7 +155,7 @@ extension UIColor {
155155
}
156156

157157
// MARK: - UI elements.
158-
extension UIColor {
158+
public extension UIColor {
159159
/// Basic Background.
160160
///
161161
static var basicBackground: UIColor {
@@ -346,7 +346,7 @@ extension UIColor {
346346
}
347347

348348
// MARK: - UI elements.
349-
extension UIColor {
349+
public extension UIColor {
350350
/// Stats chart data bar color.
351351
///
352352
static var chartDataBar: UIColor {
@@ -362,7 +362,7 @@ extension UIColor {
362362
}
363363

364364
// MARK: - Borders.
365-
extension UIColor {
365+
public extension UIColor {
366366
/// Default border color.
367367
///
368368
static var border: UIColor {
@@ -372,7 +372,7 @@ extension UIColor {
372372

373373

374374
// MARK: - Table Views.
375-
extension UIColor {
375+
public extension UIColor {
376376
/// List Icon.
377377
///
378378
static var listIcon: UIColor {
@@ -400,7 +400,7 @@ extension UIColor {
400400

401401

402402
// MARK: - Login.
403-
extension UIColor {
403+
public extension UIColor {
404404
class var alertHeaderImageBackgroundColor: UIColor {
405405
return UIColor(light: .systemColor(.systemGray6),
406406
dark: .systemColor(.systemGray5))
@@ -416,7 +416,7 @@ extension UIColor {
416416

417417

418418
// MARK: - Grays
419-
extension UIColor {
419+
public extension UIColor {
420420
/// Muriel gray palette
421421
/// - Parameter shade: a MurielColorShade of the desired shade of gray
422422
class func gray(_ shade: ColorStudioShade) -> UIColor {
@@ -456,7 +456,7 @@ extension UIColor {
456456
}
457457

458458
// MARK: - Woo Purples
459-
extension UIColor {
459+
public extension UIColor {
460460
class func wooCommercePurple(_ shade: ColorStudioShade) -> UIColor {
461461
switch shade {
462462
case .shade0:

WooFoundation/WooFoundation/Colors/UIColor+SystemColors.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import UIKit
22

33
/// Represents each iOS system color.
4-
enum SystemColor {
4+
public enum SystemColor {
55
case label
66
case secondaryLabel
77
case tertiaryLabel
@@ -81,7 +81,7 @@ private extension SystemColor {
8181
}
8282
}
8383

84-
extension UIColor {
84+
public extension UIColor {
8585

8686
/// Get a system color.
8787
///

0 commit comments

Comments
 (0)