From 41e6001746e9659c43f91c8b78f2800be57062c7 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Thu, 11 Apr 2024 15:55:31 -0500 Subject: [PATCH 1/3] fixed layout issue for entryfield base Signed-off-by: Matt Bruce --- VDS/Components/TextFields/EntryFieldBase.swift | 2 +- VDS/Components/TextFields/TextArea/TextArea.swift | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/VDS/Components/TextFields/EntryFieldBase.swift b/VDS/Components/TextFields/EntryFieldBase.swift index d2f3a6c7..a32437d4 100644 --- a/VDS/Components/TextFields/EntryFieldBase.swift +++ b/VDS/Components/TextFields/EntryFieldBase.swift @@ -258,7 +258,7 @@ open class EntryFieldBase: Control, Changeable, FormFieldInternalValidatable { //add bottomContainerStackView //this is the vertical stack that contains error text, helper text - bottomContainer.addSubview(bottomContainerStackView) + bottomContainerView.addSubview(bottomContainerStackView) bottomContainerStackView.pinToSuperView() bottomContainerStackView.addArrangedSubview(errorLabel) bottomContainerStackView.addArrangedSubview(helperLabel) diff --git a/VDS/Components/TextFields/TextArea/TextArea.swift b/VDS/Components/TextFields/TextArea/TextArea.swift index 73a1e67c..2b7a96f0 100644 --- a/VDS/Components/TextFields/TextArea/TextArea.swift +++ b/VDS/Components/TextFields/TextArea/TextArea.swift @@ -45,12 +45,6 @@ open class TextArea: EntryFieldBase { } }() - internal var bottomView: UIView = { - return UIView().with { - $0.translatesAutoresizingMaskIntoConstraints = false - } - }() - internal var bottomStackView: UIStackView = { return UIStackView().with { $0.translatesAutoresizingMaskIntoConstraints = false @@ -238,11 +232,9 @@ open class TextArea: EntryFieldBase { /// Container for the area showing helper text, error text, character count, maximum length value. open override func getBottomContainer() -> UIView { - bottomView.addSubview(bottomStackView) - bottomStackView.pinToSuperView() bottomStackView.addArrangedSubview(bottomContainerView) bottomStackView.addArrangedSubview(characterCounterLabel) - return bottomView + return bottomStackView } /// Used to update any Accessibility properties. From 6adca04f5e158f404a621ac838686cacab3c1d52 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Mon, 15 Apr 2024 13:07:03 -0500 Subject: [PATCH 2/3] removed hardcoded strings Signed-off-by: Matt Bruce --- VDS/Components/BadgeIndicator/BadgeIndicator.swift | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/VDS/Components/BadgeIndicator/BadgeIndicator.swift b/VDS/Components/BadgeIndicator/BadgeIndicator.swift index 23a63e40..89d886c6 100644 --- a/VDS/Components/BadgeIndicator/BadgeIndicator.swift +++ b/VDS/Components/BadgeIndicator/BadgeIndicator.swift @@ -74,11 +74,11 @@ open class BadgeIndicator: View { /// Enum type describing size of Badge Indicator. public enum Size: String, CaseIterable { - case xxlarge = "2XLarge" - case xlarge = "XLarge" - case large = "Large" - case medium = "Medium" - case small = "Small" + case xxlarge + case xlarge + case large + case medium + case small /// Dynamic TextStyle for the size. public var textStyle: TextStyle { From ed9c148578dedf47072a98a921e0b7103d612603 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Mon, 15 Apr 2024 13:07:32 -0500 Subject: [PATCH 3/3] fixed init Signed-off-by: Matt Bruce --- .../Icon/ButtonIcon/ButtonIconBadgeIndicatorModel.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VDS/Components/Icon/ButtonIcon/ButtonIconBadgeIndicatorModel.swift b/VDS/Components/Icon/ButtonIcon/ButtonIconBadgeIndicatorModel.swift index 61b94c12..e1c04b23 100644 --- a/VDS/Components/Icon/ButtonIcon/ButtonIconBadgeIndicatorModel.swift +++ b/VDS/Components/Icon/ButtonIcon/ButtonIconBadgeIndicatorModel.swift @@ -61,7 +61,7 @@ extension ButtonIcon { /// Hide Border that will be used for the badge indicator. public var hideBorder: Bool = false - public init(kind: BadgeIndicator.Kind = .simple, fillColor: BadgeIndicator.FillColor = .red, expandDirection: ExpandDirection = .right, size: BadgeIndicator.Size = .xxlarge, maximumDigits: BadgeIndicator.MaximumDigits = .two, width: CGFloat? = nil, height: CGFloat? = nil, number: Int? = nil, leadingCharacter: String = "", trailingText: String = "", dotSize: CGFloat? = nil, verticalPadding: CGFloat? = nil, horizontalPadding: CGFloat? = nil, hideDot: Bool = false, hideBorder: Bool = false) { + public init(kind: BadgeIndicator.Kind = .simple, fillColor: BadgeIndicator.FillColor = .red, expandDirection: ExpandDirection = .right, size: BadgeIndicator.Size = .xxlarge, maximumDigits: BadgeIndicator.MaximumDigits = .two, width: CGFloat? = nil, height: CGFloat? = nil, number: Int? = nil, leadingCharacter: String? = "", trailingText: String? = "", dotSize: CGFloat? = nil, verticalPadding: CGFloat? = nil, horizontalPadding: CGFloat? = nil, hideDot: Bool = false, hideBorder: Bool = false) { self.kind = kind self.fillColor = fillColor self.expandDirection = expandDirection