From 9856c0a482f987efeedbc58b479fd35e4af29a03 Mon Sep 17 00:00:00 2001 From: Vasavi Kanamarlapudi Date: Mon, 21 Oct 2024 12:39:14 +0530 Subject: [PATCH 1/2] Digital ACT-191 CXTDT-630735 defect: PriceLockup accessibility - to render equivalent information for the strike through price visually represents. --- .../Attributes/LabelAttributeModel.swift | 21 +++++++++++++++++++ VDS/Components/PriceLockup/PriceLockup.swift | 19 +++++++++++++++++ VDS/SupportingFiles/ReleaseNotes.txt | 4 ++++ 3 files changed, 44 insertions(+) diff --git a/VDS/Components/Label/Attributes/LabelAttributeModel.swift b/VDS/Components/Label/Attributes/LabelAttributeModel.swift index 578a9e15..a147a954 100644 --- a/VDS/Components/Label/Attributes/LabelAttributeModel.swift +++ b/VDS/Components/Label/Attributes/LabelAttributeModel.swift @@ -39,6 +39,27 @@ public extension String { func isValid(range: NSRange) -> Bool { range.location >= 0 && range.length > 0 && range.location + range.length <= count } + + func index(from: Int) -> Index { + return self.index(startIndex, offsetBy: from) + } + + func substring(from: Int) -> String { + let fromIndex = index(from: from) + return String(self[fromIndex...]) + } + + func substring(to: Int) -> String { + let toIndex = index(from: to) + return String(self[..) -> String { + let startIndex = index(from: r.lowerBound) + let endIndex = index(from: r.upperBound) + return String(self[startIndex.. 0 { + let preText = text.substring(to: strikethroughLocation) + let postText = text.substring(from: strikethroughLocation) + accessibilityLabels.append(preText) + accessibilityLabels.append(strikethroughAccessibilityText) + accessibilityLabels.append(postText) + } else { + accessibilityLabels.append(text) + } + } + return accessibilityLabels.joined(separator: " ") + } + bold = false hideCurrency = false leadingText = nil diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index 6c854af8..7b460dc3 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -1,3 +1,7 @@ +1.0.76 +---------------- +- CXTDT-630735 - PriceLockup - Accessibility + 1.0.75 ---------------- - CXTDT-624895 - Badge - Custom FillColor and TextColor From 47409d2905d3b60cc58a82581d4982b3be48f142 Mon Sep 17 00:00:00 2001 From: Vasavi Kanamarlapudi Date: Mon, 21 Oct 2024 15:26:58 +0530 Subject: [PATCH 2/2] Digital ACT-191 CXTDT-626164 defect: FootnoteGroup - Text not showing in Dark Mode --- VDS/Components/Footnote/FootnoteGroup.swift | 6 ++++++ VDS/SupportingFiles/ReleaseNotes.txt | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/VDS/Components/Footnote/FootnoteGroup.swift b/VDS/Components/Footnote/FootnoteGroup.swift index 4a2a00c7..9eb6a10d 100644 --- a/VDS/Components/Footnote/FootnoteGroup.swift +++ b/VDS/Components/Footnote/FootnoteGroup.swift @@ -111,6 +111,12 @@ open class FootnoteGroup: View { width = nil footnoteItems = [] } + + /// Used to make changes to the View based off a change events or from local properties. + open override func updateView() { + super.updateView() + updateFootnoteItems() + } internal func updateFootnoteItems() { // symbol containers are as wide as the widest symbol container in the group. diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index 6c854af8..663f0f5b 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -1,3 +1,7 @@ +1.0.76 +---------------- +- CXTDT-626164 - FootnoteGroup - Dark mode + 1.0.75 ---------------- - CXTDT-624895 - Badge - Custom FillColor and TextColor