From 19b102348c6833c5246c2031b24122caa89248cd Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 7 Jun 2024 13:33:24 -0500 Subject: [PATCH 1/5] updated release notes for missed tickets Signed-off-by: Matt Bruce --- VDS/SupportingFiles/ReleaseNotes.txt | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index 615f10df..87084f51 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -1,19 +1,25 @@ 1.0.66 ---------------- - ONEAPP-6325 - Table - Development finished -- CXTDT-565087 - InputField - Text - OnDark colors -- CXTDT-565112 - InputField - Credit Card icons -- CXTDT-565117 - InputField - Overflow not clipped -- CXTDT-565105 - InputField - Date - Typeover text not working -- CXTDT-565115 - InputField - CreditCard - China UnionPay does not allow longer numbers -- CXTDT-560823 – TextArea – Accessibility Labels/Error/ReadyOnly/Disabled -- CXTDT-553663 - DropdownSelect – Accessibility - CXTDT-544662 - Breadcrumbs - Text Wrapping - CXTDT-568398 - Calendar - Saturday missing (on smaller screen size devices) - CXTDT-568402 - Calendar - Extra row (on smaller screen size devices) - CXTDT-568409 - Calendar - Width control missing - CXTDT-568419 - Calendar - When hideContainerBorder=true, corner radius disappears - CXTDT-568413 - Calendar - Missing option for Transparent Background +- CXTDT-553663 - DropdownSelect – Accessibility +- CXTDT-565796 - DropdownSelect – Accessibility +- CXTDT-560458 - DropdownSelect - Accessibility +- CXTDT-565087 - InputField - Text - OnDark colors +- CXTDT-565112 - InputField - Credit Card icons +- CXTDT-565117 - InputField - Overflow not clipped +- CXTDT-565105 - InputField - Date - Typeover text not working +- CXTDT-565106 - InputField - CreditCard - Incorrect generic card icon color +- CXTDT-565115 - InputField - CreditCard - China UnionPay does not allow longer numbers +- CXTDT-560823 – TextArea – Accessibility Labels/Error/ReadyOnly/Disabled +- CXTDT-552060 - TextArea - Placeholder text +- CXTDT-565164 – TileContainer – Voiceover reads extra text “Accessible” +- CXTDT-552834 – TileContainer – Voice over is not rendering the information present within the tile container when it receives focus in clickable state. 1.0.65 ---------------- From 15b7e9be62e298a9f45dabc93c461043d67f3611 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 7 Jun 2024 17:19:51 -0500 Subject: [PATCH 2/5] fixed bug in the masked number for credit card. Signed-off-by: Matt Bruce --- .../TextFields/InputField/FieldTypes/CreditCard.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VDS/Components/TextFields/InputField/FieldTypes/CreditCard.swift b/VDS/Components/TextFields/InputField/FieldTypes/CreditCard.swift index bc3a289a..b0e8a165 100644 --- a/VDS/Components/TextFields/InputField/FieldTypes/CreditCard.swift +++ b/VDS/Components/TextFields/InputField/FieldTypes/CreditCard.swift @@ -254,7 +254,7 @@ extension InputField { let rawNumber = number.filter { $0.isNumber } guard rawNumber.count == cardType.maxLength else { return formatCreditCardNumber(cardType, number: number) } let lastFourDigits = rawNumber.suffix(4) - let maskedSection = String(repeating: "•", count: 12) + let maskedSection = String(repeating: "•", count: number.count - lastFourDigits.count) let formattedMaskSection = String.format(maskedSection, indices: cardType.separatorIndices(rawNumber.count), with: " ") return formattedMaskSection + " " + lastFourDigits } From 557bf7d3733f7f4ecb3f0eb824c8663b65c338b7 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Fri, 7 Jun 2024 17:40:15 -0500 Subject: [PATCH 3/5] bug to fix issue of the timing of the value being set Signed-off-by: Matt Bruce --- .../InputField/FieldTypes/CreditCard.swift | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/VDS/Components/TextFields/InputField/FieldTypes/CreditCard.swift b/VDS/Components/TextFields/InputField/FieldTypes/CreditCard.swift index b0e8a165..ed457446 100644 --- a/VDS/Components/TextFields/InputField/FieldTypes/CreditCard.swift +++ b/VDS/Components/TextFields/InputField/FieldTypes/CreditCard.swift @@ -216,9 +216,12 @@ extension InputField { return false } + // Set the value to the rawNumber, if you don't the onChange will trigger + value = rawNumber + // Set the formatted text textField.text = formattedNumber - + // Calculate the new cursor position if let newPosition = textField.cursorPosition(range: range, replacementString: string, @@ -227,9 +230,6 @@ extension InputField { textField.selectedTextRange = textField.textRange(from: newPosition, to: newPosition) } - // if all passes, then set the number1 - value = rawNumber - // Prevent the default behavior return false } @@ -252,11 +252,20 @@ extension InputField { internal func maskCreditCardNumber(_ cardType: CreditCardType, number: String) -> String { // Mask the first 12 characters if the length is 16 let rawNumber = number.filter { $0.isNumber } - guard rawNumber.count == cardType.maxLength else { return formatCreditCardNumber(cardType, number: number) } + let count = rawNumber.count + let min = cardType.minLength + let max = cardType.maxLength + var shouldFormat: Bool = false + if min == max { + shouldFormat = true + } else { + shouldFormat = count >= min && count <= max + } + guard shouldFormat else { return formatCreditCardNumber(cardType, number: number) } let lastFourDigits = rawNumber.suffix(4) let maskedSection = String(repeating: "•", count: number.count - lastFourDigits.count) - let formattedMaskSection = String.format(maskedSection, indices: cardType.separatorIndices(rawNumber.count), with: " ") - return formattedMaskSection + " " + lastFourDigits + let formattedMaskSection = String.format(maskedSection + lastFourDigits, indices: cardType.separatorIndices(rawNumber.count), with: " ") + return formattedMaskSection } } } From 40129d8ce9723c6b43bb94ecdc0788fca9f2f1fe Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 11 Jun 2024 11:04:46 -0500 Subject: [PATCH 4/5] CXTDT-553663 - DropdownSelect - Accessibility - has popup Signed-off-by: Matt Bruce --- VDS/Components/DropdownSelect/DropdownSelect.swift | 2 +- VDS/SupportingFiles/ReleaseNotes.txt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/VDS/Components/DropdownSelect/DropdownSelect.swift b/VDS/Components/DropdownSelect/DropdownSelect.swift index e001d130..ae07d616 100644 --- a/VDS/Components/DropdownSelect/DropdownSelect.swift +++ b/VDS/Components/DropdownSelect/DropdownSelect.swift @@ -279,7 +279,7 @@ open class DropdownSelect: EntryFieldBase { open override func updateAccessibility() { super.updateAccessibility() fieldStackView.accessibilityLabel = "Dropdown Select, \(accessibilityLabelText)" - fieldStackView.accessibilityHint = isReadOnly || !isEnabled ? "" : "Double tap to open." + fieldStackView.accessibilityHint = isReadOnly || !isEnabled ? "" : "has popup, Double tap to open." fieldStackView.accessibilityValue = value } diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index 87084f51..326146fb 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -1,3 +1,7 @@ +1.0.67 +---------------- +- CXTDT-553663 - DropdownSelect - Accessibility - has popup + 1.0.66 ---------------- - ONEAPP-6325 - Table - Development finished From c4b77dfc6383df11db2641aa8113ee52ed5df337 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Wed, 12 Jun 2024 15:13:47 -0500 Subject: [PATCH 5/5] added custom - container size - icon size - badgeIndicator Offset Signed-off-by: Matt Bruce --- .../Icon/ButtonIcon/ButtonIcon.swift | 37 ++++++++++++------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/VDS/Components/Icon/ButtonIcon/ButtonIcon.swift b/VDS/Components/Icon/ButtonIcon/ButtonIcon.swift index 5ba6a9fe..1b18f4ce 100644 --- a/VDS/Components/Icon/ButtonIcon/ButtonIcon.swift +++ b/VDS/Components/Icon/ButtonIcon/ButtonIcon.swift @@ -143,10 +143,7 @@ open class ButtonIcon: Control, Changeable { /// Sets the size of button icon and icon. open var size: Size = .large { didSet { setNeedsUpdate() } } - - /// Sets the size of button icon and icon. - open var customSize: Int? { didSet { setNeedsUpdate() } } - + /// If provided, the button icon will have a box shadow. open var floating: Bool = false { didSet { setNeedsUpdate() } } @@ -169,10 +166,20 @@ open class ButtonIcon: Control, Changeable { setNeedsUpdate() } } - + /// Used to move the icon inside the button in both x and y axis. open var iconOffset: CGPoint = .init(x: 0, y: 0) { didSet { setNeedsUpdate() } } + + /// Sets a custom size of button icon container. + open var customContainerSize: Int? { didSet { setNeedsUpdate() } } + + /// Sets a custom size of the icon. + open var customIconSize: Int? { didSet { setNeedsUpdate() } } + + /// Sets a custom badgeIndicator offset + open var customBadgeIndicatorOffset: CGPoint? { didSet { setNeedsUpdate() } } + //-------------------------------------------------- // MARK: - Configuration //-------------------------------------------------- @@ -444,8 +451,11 @@ open class ButtonIcon: Control, Changeable { icon.name = currentIconName let color = iconColorConfiguration.getColor(self) icon.color = color - icon.size = iconSize - icon.customSize = customSize + if let customIconSize { + icon.customSize = customIconSize + } else { + icon.size = iconSize + } icon.isEnabled = isEnabled } else { icon.reset() @@ -480,8 +490,8 @@ open class ButtonIcon: Control, Changeable { //updating current container size var iconLayoutSize = size.containerSize - if let customSize { - iconLayoutSize = CGFloat(customSize) + if let customContainerSize { + iconLayoutSize = CGFloat(customContainerSize) } // check to see if this is fitToIcon if fitToIcon && kind == .ghost { @@ -503,10 +513,11 @@ open class ButtonIcon: Control, Changeable { layer.borderWidth = 0 } - badgeIndicatorCenterXConstraint?.constant = badgeIndicatorOffset.x + badgeIndicatorDefaultSize.width/2 - badgeIndicatorCenterYConstraint?.constant = badgeIndicatorOffset.y + badgeIndicatorDefaultSize.height/2 - badgeIndicatorLeadingConstraint?.constant = badgeIndicatorOffset.x - badgeIndicatorTrailingConstraint?.constant = badgeIndicatorOffset.x + badgeIndicatorDefaultSize.width + let offSet = customBadgeIndicatorOffset ?? badgeIndicatorOffset + badgeIndicatorCenterXConstraint?.constant = offSet.x + badgeIndicatorDefaultSize.width/2 + badgeIndicatorCenterYConstraint?.constant = offSet.y + badgeIndicatorDefaultSize.height/2 + badgeIndicatorLeadingConstraint?.constant = offSet.x + badgeIndicatorTrailingConstraint?.constant = offSet.x + badgeIndicatorDefaultSize.width if showBadgeIndicator { updateExpandDirectionalConstraints()