From b80dcda680264d0b71f5c4c2e109d2e6975ca70e Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 30 Apr 2024 12:31:55 -0500 Subject: [PATCH] CXTDT-552070 - Text Area - Container heights Signed-off-by: Matt Bruce --- VDS/Components/TextFields/EntryFieldBase.swift | 2 +- VDS/Components/TextFields/TextArea/TextArea.swift | 9 +++++---- VDS/SupportingFiles/ReleaseNotes.txt | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/VDS/Components/TextFields/EntryFieldBase.swift b/VDS/Components/TextFields/EntryFieldBase.swift index a8ad917a..2fae06c0 100644 --- a/VDS/Components/TextFields/EntryFieldBase.swift +++ b/VDS/Components/TextFields/EntryFieldBase.swift @@ -239,7 +239,7 @@ open class EntryFieldBase: Control, Changeable, FormFieldInternalValidatable { //this is the horizontal stack that contains //the left, InputContainer, Icons, Buttons container.addSubview(containerStackView) - containerStackView.pinToSuperView(.uniform(12)) + containerStackView.pinToSuperView(.uniform(VDSLayout.space3X)) //add the view to add input fields containerStackView.addArrangedSubview(controlContainerView) diff --git a/VDS/Components/TextFields/TextArea/TextArea.swift b/VDS/Components/TextFields/TextArea/TextArea.swift index 732ac7ac..83f940bb 100644 --- a/VDS/Components/TextFields/TextArea/TextArea.swift +++ b/VDS/Components/TextFields/TextArea/TextArea.swift @@ -86,15 +86,16 @@ open class TextArea: EntryFieldBase { case twoX = "2X" case fourX = "4X" case eightX = "8X" + var containerVerticalPadding: CGFloat { VDSLayout.space3X * 2 } var value: CGFloat { switch self { case .twoX: - 88 + 88 - containerVerticalPadding case .fourX: - 176 + 176 - containerVerticalPadding case .eightX: - 352 + 352 - containerVerticalPadding } } } @@ -176,7 +177,7 @@ open class TextArea: EntryFieldBase { .pinBottom(0, .defaultHigh) textView.isScrollEnabled = true textView.autocorrectionType = .no - textViewHeightConstraint = textView.heightAnchor.constraint(greaterThanOrEqualToConstant: containerSize.height) + textViewHeightConstraint = textView.heightAnchor.constraint(greaterThanOrEqualToConstant: Height.twoX.value) textViewHeightConstraint?.isActive = true backgroundColorConfiguration.setSurfaceColors(VDSColor.feedbackSuccessBackgroundOnlight, VDSColor.feedbackSuccessBackgroundOndark, forState: .success) borderColorConfiguration.setSurfaceColors(VDSColor.feedbackSuccessOnlight, VDSColor.feedbackSuccessOndark, forState: .success) diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index e09e37c0..1df8f3a6 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -2,7 +2,7 @@ ---------------- - CXTDT-552068 - Text Area - Text padding - CXTDT-552074 - Text Area - Tooltip - +- CXTDT-552070 - Text Area - Container heights 1.0.60 ---------------- - CXTDT-544442 - Button Icon - Selected state needs to allow custom color