From f87e2ddc986197f1b41cd4490c4e5fb772f7c516 Mon Sep 17 00:00:00 2001 From: Sumanth Nadigadda Date: Tue, 23 Jul 2024 19:37:58 +0530 Subject: [PATCH 1/8] Adding release notes for Table component fixes --- VDS/SupportingFiles/ReleaseNotes.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index 973e8ed8..414bd6c3 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -2,6 +2,8 @@ ---------------- - CXTDT-581803 - DatePicker - Calendar does not switch to Dark Mode - CXTDT-584278 – InputField - Accessibility +- CXTDT-586375 - Table - Default to compact padding, when striped is selected. +- CXTDT-586497 - Table - Contents alignment based on the row/header 1.0.70 ---------------- From 93b89ee754a918dfe0cf4b021987fc3f9868aba1 Mon Sep 17 00:00:00 2001 From: Sumanth Nadigadda Date: Tue, 20 Aug 2024 18:07:10 +0530 Subject: [PATCH 2/8] Fix for CXTDT-597984, Fixing the padding issue while calculating the itemwidth which is causing the issue. --- VDS/Components/Table/TableFlowLayout.swift | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/VDS/Components/Table/TableFlowLayout.swift b/VDS/Components/Table/TableFlowLayout.swift index 2567f947..7af3621a 100644 --- a/VDS/Components/Table/TableFlowLayout.swift +++ b/VDS/Components/Table/TableFlowLayout.swift @@ -112,8 +112,7 @@ class MatrixFlowLayout : UICollectionViewFlowLayout { /// Fetches estimated height by calling the cell's component estimated height and adding padding private func estimateHeightFor(item: TableItemModel, with width: CGFloat, index: IndexPath) -> CGFloat { - let horizontalPadding = (index.row == 0 && !striped) ? (VDSLayout.space1X + layoutPadding.horizontalValue()) : (2 * layoutPadding.horizontalValue()) - let itemWidth = width - layoutPadding.horizontalValue() - defaultLeadingPadding + let itemWidth = width - layoutPadding.horizontalValue() - (index.row == 0 ? defaultLeadingPadding:layoutPadding.horizontalValue()) let maxSize = CGSize(width: itemWidth, height: CGFloat.greatestFiniteMagnitude) let estItemSize = item.component?.systemLayoutSizeFitting(maxSize, withHorizontalFittingPriority: .required, verticalFittingPriority: .fittingSizeLevel) ?? CGSize(width: itemWidth, height: item.defaultHeight) return estItemSize.height + (2 * layoutPadding.verticalValue()) From 154983264744b186552c7464de753b95df5c3b9c Mon Sep 17 00:00:00 2001 From: Sumanth Nadigadda Date: Tue, 20 Aug 2024 22:28:20 +0530 Subject: [PATCH 3/8] release notes of table component bug fixes. --- VDS/SupportingFiles/ReleaseNotes.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/VDS/SupportingFiles/ReleaseNotes.txt b/VDS/SupportingFiles/ReleaseNotes.txt index ec14a5f7..c201359e 100644 --- a/VDS/SupportingFiles/ReleaseNotes.txt +++ b/VDS/SupportingFiles/ReleaseNotes.txt @@ -1,3 +1,9 @@ +1.0.73 +---------------- +- CXTDT-597984 - Table - Text wrap +- CXTDT-586372 - Table - Stripes defect +- CXTDT-586383 - Table - Line style + 1.0.72 ---------------- - ONEAPP-9311 - InputStepper - Finished From eea54b26ff8d1391845311bd0c3f09a05dbb4217 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 20 Aug 2024 14:00:33 -0500 Subject: [PATCH 4/8] added calendar SVG to assets Signed-off-by: Matt Bruce --- .../calendar.imageset/Contents.json | 15 +++++++++++++++ .../Icons.xcassets/calendar.imageset/calendar.svg | 9 +++++++++ 2 files changed, 24 insertions(+) create mode 100644 VDS/SupportingFiles/Icons.xcassets/calendar.imageset/Contents.json create mode 100644 VDS/SupportingFiles/Icons.xcassets/calendar.imageset/calendar.svg diff --git a/VDS/SupportingFiles/Icons.xcassets/calendar.imageset/Contents.json b/VDS/SupportingFiles/Icons.xcassets/calendar.imageset/Contents.json new file mode 100644 index 00000000..86c7f835 --- /dev/null +++ b/VDS/SupportingFiles/Icons.xcassets/calendar.imageset/Contents.json @@ -0,0 +1,15 @@ +{ + "images" : [ + { + "filename" : "calendar.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true + } +} diff --git a/VDS/SupportingFiles/Icons.xcassets/calendar.imageset/calendar.svg b/VDS/SupportingFiles/Icons.xcassets/calendar.imageset/calendar.svg new file mode 100644 index 00000000..4cf118e3 --- /dev/null +++ b/VDS/SupportingFiles/Icons.xcassets/calendar.imageset/calendar.svg @@ -0,0 +1,9 @@ + + + + + From 940493ef10193eac0ce0c57e5910007c444f64ef Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 20 Aug 2024 14:00:43 -0500 Subject: [PATCH 5/8] allow override Signed-off-by: Matt Bruce --- VDS/Components/Checkbox/CheckboxGroup.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VDS/Components/Checkbox/CheckboxGroup.swift b/VDS/Components/Checkbox/CheckboxGroup.swift index 226083fe..8268f90f 100644 --- a/VDS/Components/Checkbox/CheckboxGroup.swift +++ b/VDS/Components/Checkbox/CheckboxGroup.swift @@ -93,7 +93,7 @@ open class CheckboxGroup: SelectorGroupBase, SelectorGroupMultiSel inputId = nil } - public override func didSelect(_ selectedControl: CheckboxItem) { + open override func didSelect(_ selectedControl: CheckboxItem) { selectedControl.toggle() if selectedControl.isSelected, showError{ showError.toggle() From 99da32947f7acfbf953ac514ec0484142aaee4c1 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 20 Aug 2024 14:00:53 -0500 Subject: [PATCH 6/8] do the selected date Signed-off-by: Matt Bruce --- VDS/Components/DatePicker/DatePicker.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/VDS/Components/DatePicker/DatePicker.swift b/VDS/Components/DatePicker/DatePicker.swift index e8802c69..e9137ad9 100644 --- a/VDS/Components/DatePicker/DatePicker.swift +++ b/VDS/Components/DatePicker/DatePicker.swift @@ -221,6 +221,9 @@ extension DatePicker { } let calendar = CalendarBase() + if let selectedDate, selectedDate != calendar.selectedDate { + calendar.selectedDate = selectedDate + } calendar.activeDates = calendarModel.activeDates calendar.hideContainerBorder = calendarModel.hideContainerBorder calendar.hideCurrentDateIndicator = calendarModel.hideCurrentDateIndicator From 658624aaddeae92daef2557ebf31578ad2711c76 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 20 Aug 2024 14:01:04 -0500 Subject: [PATCH 7/8] set defaults to match the view Signed-off-by: Matt Bruce --- VDS/Components/DatePicker/DatePickerCalendarModel.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/VDS/Components/DatePicker/DatePickerCalendarModel.swift b/VDS/Components/DatePicker/DatePickerCalendarModel.swift index 16a46e61..da18ab2f 100644 --- a/VDS/Components/DatePicker/DatePickerCalendarModel.swift +++ b/VDS/Components/DatePicker/DatePickerCalendarModel.swift @@ -24,6 +24,8 @@ extension DatePicker { /// All other dates will be active. public let inactiveDates: [Date] + public let selectedDate: Date + /// If provided, the calendar will allow a selection to be made from this date forward. Defaults to today. public let minDate: Date @@ -37,13 +39,15 @@ extension DatePicker { hideCurrentDateIndicator: Bool = false, activeDates: [Date] = [], inactiveDates: [Date] = [], - minDate: Date = Date().startOfMonth, - maxDate: Date = Date().endOfMonth, + selectedDate: Date = Date(), + minDate: Date = Date(), + maxDate: Date = Calendar.current.date(byAdding: .year, value: 10, to: Date())!, indicators: [CalendarBase.CalendarIndicatorModel] = []) { self.hideContainerBorder = hideContainerBorder self.hideCurrentDateIndicator = hideCurrentDateIndicator self.activeDates = activeDates self.inactiveDates = inactiveDates + self.selectedDate = selectedDate self.minDate = minDate self.maxDate = maxDate self.indicators = indicators From bd2b1b0de987c14596645f2a74547249c71557b6 Mon Sep 17 00:00:00 2001 From: Matt Bruce Date: Tue, 20 Aug 2024 14:01:20 -0500 Subject: [PATCH 8/8] udpate setDefaults() for the maxDate Signed-off-by: Matt Bruce --- VDS/Components/Calendar/Calendar.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VDS/Components/Calendar/Calendar.swift b/VDS/Components/Calendar/Calendar.swift index 0a6ba18c..bdb5b8a9 100644 --- a/VDS/Components/Calendar/Calendar.swift +++ b/VDS/Components/Calendar/Calendar.swift @@ -160,7 +160,7 @@ open class CalendarBase: Control, Changeable { inactiveDates = [] indicators = [] minDate = Date() - maxDate = Date() + maxDate = Calendar.current.date(byAdding: .year, value: 10, to: Date())! selectedDate = Date() }