From 6ad1c0561e1359ddafad7d03f1926c89b11b0ea9 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Thu, 23 May 2024 11:45:04 -0500 Subject: [PATCH 1/5] updated vars Signed-off-by: Matt Bruce --- .../TextFields/InputField/FieldTypes/SecurityCode.swift | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/VDS/Components/TextFields/InputField/FieldTypes/SecurityCode.swift b/VDS/Components/TextFields/InputField/FieldTypes/SecurityCode.swift index cf60eb9a..d651058c 100644 --- a/VDS/Components/TextFields/InputField/FieldTypes/SecurityCode.swift +++ b/VDS/Components/TextFields/InputField/FieldTypes/SecurityCode.swift @@ -42,21 +42,21 @@ extension InputField { let surface = inputField.surface var contentView: UIView - var code3Label = Label().with { + let code3Label = Label().with { $0.text = "Most credit or debit cards have a 3-digit security code on the back." $0.isEnabled = true $0.surface = surface } - var code4Label = Label().with { + let code4Label = Label().with { $0.text = "American Express cards have a 4-digit code on the front." $0.isEnabled = true $0.surface = surface } - var code3ImageView = UIImageView().with { + let code3ImageView = UIImageView().with { $0.image = BundleManager.shared.image(for: "securityCode\(surface == .dark ? "-inverted": "")") } - var code4ImageView = UIImageView().with { + let code4ImageView = UIImageView().with { $0.image = BundleManager.shared.image(for: "securityCodeAmex\(surface == .dark ? "-inverted": "")") } @@ -84,7 +84,6 @@ extension InputField { } } - let title: String = inputField.cardType.rawValue switch inputField.cardType { case .amex: contentView = view4() From 13396d150182dba4b5a8c8ce603df11be4fa1da9 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Thu, 23 May 2024 11:51:45 -0500 Subject: [PATCH 2/5] updated custom spacing Signed-off-by: Matt Bruce --- VDS/Components/TextFields/EntryFieldBase.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/VDS/Components/TextFields/EntryFieldBase.swift b/VDS/Components/TextFields/EntryFieldBase.swift index 2c2435be..58328966 100644 --- a/VDS/Components/TextFields/EntryFieldBase.swift +++ b/VDS/Components/TextFields/EntryFieldBase.swift @@ -43,7 +43,7 @@ open class EntryFieldBase: Control, Changeable, FormFieldInternalValidatable { internal let mainStackView = UIStackView().with { $0.axis = .vertical $0.alignment = .fill - $0.spacing = 8 + $0.spacing = VDSLayout.space1X $0.translatesAutoresizingMaskIntoConstraints = false } @@ -51,7 +51,7 @@ open class EntryFieldBase: Control, Changeable, FormFieldInternalValidatable { $0.axis = .vertical $0.alignment = .fill $0.distribution = .fill - $0.spacing = 8 + $0.spacing = VDSLayout.space2X $0.translatesAutoresizingMaskIntoConstraints = false } @@ -285,7 +285,7 @@ open class EntryFieldBase: Control, Changeable, FormFieldInternalValidatable { // Add arranged subviews to mainStackView mainStackView.addArrangedSubview(titleLabel) mainStackView.addArrangedSubview(contentStackView) - + // Initial position of the helper label updateHelperTextPosition() From 7953751a89a8088816fd71a2a2bf32acb0a14ab5 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Thu, 23 May 2024 11:59:13 -0500 Subject: [PATCH 3/5] fixed optional text position Signed-off-by: Matt Bruce --- VDS/Components/DropdownSelect/DropdownSelect.swift | 4 ++-- VDS/Components/TextFields/EntryFieldBase.swift | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/VDS/Components/DropdownSelect/DropdownSelect.swift b/VDS/Components/DropdownSelect/DropdownSelect.swift index cf3539fb..f596f725 100644 --- a/VDS/Components/DropdownSelect/DropdownSelect.swift +++ b/VDS/Components/DropdownSelect/DropdownSelect.swift @@ -222,11 +222,11 @@ open class DropdownSelect: EntryFieldBase { updatedLabelText = showInlineLabel ? "" : updatedLabelText if let oldText = updatedLabelText, !isRequired, !oldText.hasSuffix("Optional") { - let optionColorAttr = ColorLabelAttribute(location: oldText.count + 2, + let optionColorAttr = ColorLabelAttribute(location: oldText.count + 1, length: 8, color: secondaryColorConfiguration.getColor(self)) - updatedLabelText = showInlineLabel ? "Optional" : "\(oldText) Optional" + updatedLabelText = showInlineLabel ? "Optional" : "\(oldText) Optional" attributes.append(optionColorAttr) } diff --git a/VDS/Components/TextFields/EntryFieldBase.swift b/VDS/Components/TextFields/EntryFieldBase.swift index 58328966..3f37205e 100644 --- a/VDS/Components/TextFields/EntryFieldBase.swift +++ b/VDS/Components/TextFields/EntryFieldBase.swift @@ -360,13 +360,13 @@ open class EntryFieldBase: Control, Changeable, FormFieldInternalValidatable { //dealing with the "Optional" addition to the text if let oldText = updatedLabelText, !isRequired, !oldText.hasSuffix("Optional") { if isEnabled { - let optionColorAttr = ColorLabelAttribute(location: oldText.count + 2, + let optionColorAttr = ColorLabelAttribute(location: oldText.count + 1, length: 8, color: VDSColor.elementsSecondaryOnlight) attributes.append(optionColorAttr) } - updatedLabelText = "\(oldText) Optional" + updatedLabelText = "\(oldText) Optional" } if let tooltipModel { From fc4206691b20bad09d785ba0fd75622bee6b1f01 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Thu, 23 May 2024 15:55:32 -0500 Subject: [PATCH 4/5] updated release notes Signed-off-by: Matt Bruce --- VDS/SupportingFiles/ReleaseNotes.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index 461efee9..2a558285 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -1,3 +1,8 @@ +1.0.64 +---------------- +- CXTDT-555846 - DropdownSelect - Tooltip Icon Spacing +- CXTDT-555858 - DropdownSSelect - Disabled/required helper text + 1.0.63 ---------------- - CXTDT-555860 - Dropdown Select - Form Elements layout option missing From 55fd348ccc3899b4f842f0697ab4aec13b655056 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Thu, 23 May 2024 15:56:38 -0500 Subject: [PATCH 5/5] updated version Signed-off-by: Matt Bruce --- VDS.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VDS.xcodeproj/project.pbxproj b/VDS.xcodeproj/project.pbxproj index cca7c7f7..2f0fee7c 100644 --- a/VDS.xcodeproj/project.pbxproj +++ b/VDS.xcodeproj/project.pbxproj @@ -1509,7 +1509,7 @@ BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 63; + CURRENT_PROJECT_VERSION = 64; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1; @@ -1546,7 +1546,7 @@ BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 63; + CURRENT_PROJECT_VERSION = 64; DEFINES_MODULE = YES; DEVELOPMENT_TEAM = ""; DYLIB_COMPATIBILITY_VERSION = 1;