diff --git a/Modules/Package.resolved b/Modules/Package.resolved index 0c3a0a72b4ed..2c8dd7a7818f 100644 --- a/Modules/Package.resolved +++ b/Modules/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "e3e823d31b833eca898ce70bd04f75d481070d36c5823cfffae0afc36ad263fc", + "originHash" : "42f8ac89b366ace35f0f0a03b37756e9686dfff9077324712b71128995463b67", "pins" : [ { "identity" : "alamofire", @@ -381,7 +381,7 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/wordpress-mobile/WordPressKit-iOS", "state" : { - "revision" : "2613f213b1a958266f88fa7e99d990292096bffb" + "revision" : "67db92e3ea5ad8574911df592a838b4729ab9ca5" } }, { diff --git a/Modules/Package.swift b/Modules/Package.swift index 7efc5411c3df..bceaa85a6db5 100644 --- a/Modules/Package.swift +++ b/Modules/Package.swift @@ -50,7 +50,7 @@ let package = Package( .package(url: "https://github.com/wordpress-mobile/NSURL-IDN", revision: "b34794c9a3f32312e1593d4a3d120572afa0d010"), .package( url: "https://github.com/wordpress-mobile/WordPressKit-iOS", - revision: "2613f213b1a958266f88fa7e99d990292096bffb" // see wpios-edition branch + revision: "67db92e3ea5ad8574911df592a838b4729ab9ca5" // see wpios-edition branch ), .package(url: "https://github.com/zendesk/support_sdk_ios", from: "8.0.3"), // We can't use wordpress-rs branches nor commits here. Only tags work. diff --git a/Modules/Sources/JetpackStats/Cards/ChartCard.swift b/Modules/Sources/JetpackStats/Cards/ChartCard.swift index 7da30f38bcee..5f9f0009d325 100644 --- a/Modules/Sources/JetpackStats/Cards/ChartCard.swift +++ b/Modules/Sources/JetpackStats/Cards/ChartCard.swift @@ -53,6 +53,13 @@ struct ChartCard: View { .presentationDetents([.medium, .large]) .presentationDragIndicator(.visible) } + .sheet(isPresented: $isShowingRawData) { + if let data = viewModel.chartData[selectedMetric] { + NavigationStack { + ChartDataListView(data: data, dateRange: dateRange) + } + } + } } private func headerView(for metric: SiteMetric) -> some View { @@ -165,15 +172,6 @@ struct ChartCard: View { .frame(width: 56, height: 50) } .tint(Color.primary) - .sheet(isPresented: $isShowingRawData) { - NavigationStack { - ChartDataListView( - chartDataDict: viewModel.chartData, - selectedMetric: selectedMetric, - dateRanges: dateRange - ) - } - } } @ViewBuilder @@ -190,11 +188,6 @@ struct ChartCard: View { } } Section { - Button { - // Not implemented - } label: { - Label(Strings.Buttons.share, systemImage: "square.and.arrow.up") - } Button { isShowingRawData = true } label: { diff --git a/Modules/Sources/JetpackStats/Cards/TopListCard.swift b/Modules/Sources/JetpackStats/Cards/TopListCard.swift index b215aa597f1d..aa870c3a621d 100644 --- a/Modules/Sources/JetpackStats/Cards/TopListCard.swift +++ b/Modules/Sources/JetpackStats/Cards/TopListCard.swift @@ -43,6 +43,9 @@ struct TopListCard: View { moreMenu } .cardStyle() + .onTapGesture { + navigateToTopListScreen() + } .grayscale(viewModel.isStale ? 1 : 0) .opacity(viewModel.isEditing ? 0.6 : 1) .scaleEffect(viewModel.isEditing ? 0.95 : 1) @@ -58,13 +61,6 @@ struct TopListCard: View { .presentationDetents([.medium, .large]) .presentationDragIndicator(.visible) } - .background( - Color.clear - .contentShape(Rectangle()) - .onTapGesture { - navigateToTopListScreen() - } - ) } private var cardHeaderView: some View { @@ -132,7 +128,7 @@ struct TopListCard: View { .environment(\.context, context) .environment(\.router, router) - router.navigate(to: screen) + router.navigate(to: screen, title: viewModel.selection.item.localizedTitle) } private var itemTypePicker: some View { @@ -188,11 +184,6 @@ struct TopListCard: View { @ViewBuilder private var moreMenuContent: some View { Section { - Button { - // Not implemented - } label: { - Label(Strings.Buttons.share, systemImage: "square.and.arrow.up") - } if let documentationURL = viewModel.selection.item.documentationURL { Link(destination: documentationURL) { Label(Strings.Buttons.learnMore, systemImage: "info.circle") @@ -275,9 +266,7 @@ struct TopListCard: View { } #Preview { - NavigationView { - TopListCardPreview(item: .authors) - } + TopListCardPreview(item: .authors) } private struct TopListCardPreview: View { @@ -299,7 +288,6 @@ private struct TopListCardPreview: View { var body: some View { TopListCard(viewModel: viewModel) - .cardStyle() .frame(maxWidth: .infinity, maxHeight: .infinity) .background(Constants.Colors.background) } diff --git a/Modules/Sources/JetpackStats/Extensions/Calendar+Presets.swift b/Modules/Sources/JetpackStats/Extensions/Calendar+Presets.swift index 490260796a1c..ad4487f3c18e 100644 --- a/Modules/Sources/JetpackStats/Extensions/Calendar+Presets.swift +++ b/Modules/Sources/JetpackStats/Extensions/Calendar+Presets.swift @@ -2,7 +2,7 @@ import Foundation /// Represents predefined date range options for stats filtering. /// Each preset defines a specific time period relative to the current date. -enum DateIntervalPreset: CaseIterable, Identifiable { +enum DateIntervalPreset: String, CaseIterable, Identifiable { /// The current calendar day case today /// The current calendar week diff --git a/Modules/Sources/JetpackStats/Resources/interactive-map-template.html b/Modules/Sources/JetpackStats/Resources/interactive-map-template.html index 0268521cc1e7..e9f53d62c553 100644 --- a/Modules/Sources/JetpackStats/Resources/interactive-map-template.html +++ b/Modules/Sources/JetpackStats/Resources/interactive-map-template.html @@ -20,13 +20,8 @@ height: auto; } path { - cursor: pointer; transition: opacity 0.2s ease; } - path:hover { - opacity: 0.8; - stroke-width: 2; - } path.selected { stroke-width: 3; stroke: #007AFF; @@ -34,7 +29,7 @@