Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

11.7
-----
- [**] Analytics Hub: Now you can select custom date ranges. [https://github.com/woocommerce/woocommerce-ios/pull/8414]


11.6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,24 +162,5 @@ extension AnalyticsTimeRangeCard {
case monthToDate
case quarterToDate
case yearToDate

/// Wee need to provide a custom `allCases` in order to evict `.custom` while the feature flag is active.
/// We should delete this once the feature flag has been removed.
///
static var allCases: [Range] {
[
ServiceLocator.featureFlagService.isFeatureFlagEnabled(.analyticsHub) ? .custom : nil,
.today,
.yesterday,
.lastWeek,
.lastMonth,
.lastQuarter,
.lastYear,
.weekToDate,
.monthToDate,
.quarterToDate,
yearToDate
].compactMap { $0 }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ struct RangedDatePicker: View {
DatePicker("", selection: $startDate, in: ...Date(), displayedComponents: [.date])
.datePickerStyle(.graphical)
.accentColor(Color(.brand))
.padding(.horizontal, Layout.calendarPadding)

// End Picker
Text(Localization.endDate)
Expand All @@ -54,6 +55,7 @@ struct RangedDatePicker: View {
DatePicker("", selection: $endDate, in: ...Date(), displayedComponents: [.date])
.datePickerStyle(.graphical)
.accentColor(Color(.brand))
.padding(.horizontal, Layout.calendarPadding)
}
.padding()
}
Expand Down Expand Up @@ -103,6 +105,7 @@ private extension RangedDatePicker {
}
enum Layout {
static let titleSpacing: CGFloat = 4.0
static let calendarPadding: CGFloat = -8.0
}
}

Expand Down