diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8dc2e960..a23dac55 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -12,6 +12,7 @@ stages: # - xcode_12_2 download_artifacts: + when: manual stage: download script: - ./Scripts/download_dependencies.sh @@ -27,6 +28,7 @@ download_artifacts: ARTIFACTORY_URL: https://oneartifactoryci.verizon.com/artifactory build_project: + when: manual stage: build script: - ./Scripts/build_aggregate.sh @@ -37,6 +39,7 @@ build_project: - xcode_12_2 deploy_snapshot: + when: manual stage: deploy script: - cd Scripts && ./upload_core_ui_frameworks.sh diff --git a/MVMCoreUI/Atomic/Extensions/VDS-Tilelet+Codable.swift b/MVMCoreUI/Atomic/Extensions/VDS-Tilelet+Codable.swift index 17bca4b5..9d874675 100644 --- a/MVMCoreUI/Atomic/Extensions/VDS-Tilelet+Codable.swift +++ b/MVMCoreUI/Atomic/Extensions/VDS-Tilelet+Codable.swift @@ -35,41 +35,67 @@ extension Tilelet.BadgeModel: Codable { extension Tilelet.DescriptiveIcon: Codable { private enum CodingKeys: String, CodingKey { - case name, size, surface + case name, size, color, accessibleText } public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) let name = try container.decode(Icon.Name.self, forKey: .name) let size = try container.decodeIfPresent(Icon.Size.self, forKey: .size) ?? .medium - let surface = try container.decodeIfPresent(Surface.self, forKey: .surface) ?? .dark - self.init(name: name, size: size, surface: surface) + let color = try container.decodeIfPresent(Color.self, forKey: .color) + let accessibleText = try container.decodeIfPresent(String.self, forKey: .accessibleText) + if let uiColor = color?.uiColor { + self.init(name: name, + colorConfiguration: .init(uiColor, uiColor), + size: size, + accessibleText: accessibleText) + } else { + self.init(name: name, + size: size, + accessibleText: accessibleText) + } } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) try container.encode(name, forKey: .name) try container.encode(size, forKey: .size) - try container.encode(surface, forKey: .surface) + try container.encodeIfPresent(accessibleText, forKey: .accessibleText) + try container.encodeIfPresent(colorConfiguration.lightColor.hexString, forKey: .color) } } +extension Tilelet.DirectionalIcon.IconType : Codable {} +extension Tilelet.DirectionalIcon.IconSize : Codable {} + extension Tilelet.DirectionalIcon: Codable { private enum CodingKeys: String, CodingKey { - case size, surface + case name, size, color, accessibleText } public init(from decoder: Decoder) throws { let container = try decoder.container(keyedBy: CodingKeys.self) - let size = try container.decodeIfPresent(Icon.Size.self, forKey: .size) ?? .medium - let surface = try container.decodeIfPresent(Surface.self, forKey: .surface) ?? .dark - self.init(size: size, surface: surface) + let iconType = try container.decodeIfPresent(IconType.self, forKey: .name) ?? .rightArrow + let size = try container.decodeIfPresent(IconSize.self, forKey: .size) ?? .medium + let color = try container.decodeIfPresent(Color.self, forKey: .color) + let accessibleText = try container.decodeIfPresent(String.self, forKey: .accessibleText) + if let uiColor = color?.uiColor { + self.init(iconType: iconType, + colorConfiguration: .init(uiColor, uiColor), + size: size, + accessibleText: accessibleText) + } else { + self.init(iconType: iconType, + size: size, + accessibleText: accessibleText) + } } public func encode(to encoder: Encoder) throws { var container = encoder.container(keyedBy: CodingKeys.self) + try container.encode(iconType, forKey: .name) try container.encode(size, forKey: .size) - try container.encode(surface, forKey: .surface) + try container.encodeIfPresent(accessibleText, forKey: .accessibleText) + try container.encodeIfPresent(colorConfiguration.lightColor.hexString, forKey: .color) } } - diff --git a/MVMCoreUI/Atomic/Molecules/NavigationBar/Buttons/LabelBarButtonItem.swift b/MVMCoreUI/Atomic/Molecules/NavigationBar/Buttons/LabelBarButtonItem.swift index 1eb4c8a1..5a99d670 100644 --- a/MVMCoreUI/Atomic/Molecules/NavigationBar/Buttons/LabelBarButtonItem.swift +++ b/MVMCoreUI/Atomic/Molecules/NavigationBar/Buttons/LabelBarButtonItem.swift @@ -16,7 +16,7 @@ let actionObject = ActionDelegate() let button = self.init(title: title, style: .plain, target: actionObject, action: #selector(actionObject.callActionBlock(_:))) button.actionDelegate = actionObject - button.setTitleTextAttributes([NSAttributedString.Key.font: Styler.Font.RegularBodySmall.getFont()], for: .normal) + button.setTitleTextAttributes([NSAttributedString.Key.font: Styler.Font.BoldBodySmall.getFont()], for: .normal) return button }