From 5f871976cbb68a7d3418edead1feb54861236f0a Mon Sep 17 00:00:00 2001 From: Povilas Staskus Date: Tue, 23 Apr 2024 15:50:41 +0300 Subject: [PATCH 01/11] Add subscribersList to StatsSubscribersStore Combine DotCom and EmailFollowers into a single list that the store maintains and returns --- .../Subscribers/StatsSubscribersStore.swift | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/WordPress/Classes/ViewRelated/Stats/Subscribers/StatsSubscribersStore.swift b/WordPress/Classes/ViewRelated/Stats/Subscribers/StatsSubscribersStore.swift index 0f570b66c8e8..b71361940548 100644 --- a/WordPress/Classes/ViewRelated/Stats/Subscribers/StatsSubscribersStore.swift +++ b/WordPress/Classes/ViewRelated/Stats/Subscribers/StatsSubscribersStore.swift @@ -4,7 +4,10 @@ import WordPressKit protocol StatsSubscribersStoreProtocol { var emailsSummary: CurrentValueSubject, Never> { get } + var subscribersList: CurrentValueSubject, Never> { get } + func updateEmailsSummary(quantity: Int, sortField: StatsEmailsSummaryData.SortField) + func updateSubscribersList(quantity: Int) } struct StatsSubscribersStore: StatsSubscribersStoreProtocol { @@ -13,6 +16,7 @@ struct StatsSubscribersStore: StatsSubscribersStoreProtocol { private let statsService: StatsServiceRemoteV2 var emailsSummary: CurrentValueSubject, Never> = .init(.idle) + var subscribersList: CurrentValueSubject, Never> = .init(.idle) init() { self.siteID = SiteStatsInformation.sharedInstance.siteID ?? 0 @@ -21,6 +25,8 @@ struct StatsSubscribersStore: StatsSubscribersStoreProtocol { statsService = StatsServiceRemoteV2(wordPressComRestApi: wpApi, siteID: siteID.intValue, siteTimezone: timeZone) } + // MARK: - Emails Summary + func updateEmailsSummary(quantity: Int, sortField: StatsEmailsSummaryData.SortField) { guard emailsSummary.value != .loading else { return } @@ -48,6 +54,67 @@ struct StatsSubscribersStore: StatsSubscribersStoreProtocol { } } } + + // MARK: - Followers + + func updateSubscribersList(quantity: Int) { + let cacheKey = StatsSubscribersCache.CacheKey.subscribersList(quantity: quantity, siteId: siteID) + let cachedData: [StatsFollower]? = cache.getValue(key: cacheKey) + + if let cachedData = cachedData { + self.subscribersList.send(.success(cachedData)) + } else { + subscribersList.send(.loading) + } + + getSubscribers(quantity: quantity) { result in + DispatchQueue.main.async { + switch result { + case .success(let data): + cache.setValue(data, key: cacheKey) + self.subscribersList.send(.success(data)) + case .failure: + if cachedData == nil { + self.subscribersList.send(.error) + } + } + } + } + } + + private func getSubscribers(quantity: Int, completion: @escaping (Result<[StatsFollower], Error>) -> Void) { + let group = DispatchGroup() + var followers: [StatsFollower] = [] + var requestError: Error? + + group.enter() + statsService.getInsight(limit: quantity) { (wpComFollowers: StatsDotComFollowersInsight?, error) in + followers.append(contentsOf: wpComFollowers?.topDotComFollowers ?? []) + requestError = error + group.leave() + } + + group.enter() + statsService.getInsight(limit: quantity) { (wpComFollowers: StatsEmailFollowersInsight?, error) in + followers.append(contentsOf: wpComFollowers?.topEmailFollowers ?? []) + requestError = error + group.leave() + } + + group.notify(queue: .main) { + if let error = requestError { + completion(.failure(error)) + } else { + // Combine both wpcom and email subscribers into a single list + let followers = Array( + followers + .sorted(by: { $0.subscribedDate > $1.subscribedDate }) + .prefix(10) + ) + completion(.success(followers)) + } + } + } } extension StatsSubscribersStore { From 2f1a8d628fd91e3159095e31a44e0ba547e13f31 Mon Sep 17 00:00:00 2001 From: Povilas Staskus Date: Tue, 23 Apr 2024 15:52:43 +0300 Subject: [PATCH 02/11] Add subscribersList Subscribers StatSection --- WordPress/Classes/ViewRelated/Stats/Helpers/StatSection.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/WordPress/Classes/ViewRelated/Stats/Helpers/StatSection.swift b/WordPress/Classes/ViewRelated/Stats/Helpers/StatSection.swift index 092bbf09e044..d1a8d0b945e3 100644 --- a/WordPress/Classes/ViewRelated/Stats/Helpers/StatSection.swift +++ b/WordPress/Classes/ViewRelated/Stats/Helpers/StatSection.swift @@ -35,6 +35,7 @@ case postStatsAverageViews case postStatsRecentWeeks case subscribersEmailsSummary + case subscribersList static let allInsights: [StatSection] = [ .insightsViewsVisitors, @@ -145,6 +146,8 @@ return PostStatsHeaders.recentWeeks case .subscribersEmailsSummary: return SubscribersHeaders.emailsSummaryStats + case .subscribersList: + return SubscribersHeaders.subscribersList default: return "" } @@ -431,6 +434,7 @@ struct SubscribersHeaders { static let emailsSummaryStats = NSLocalizedString("stats.subscribers.emailsSummaryCard.title", value: "Emails", comment: "Stats 'Emails' card header") + static let subscribersList = NSLocalizedString("stats.subscribers.subscribersListCard.title", value: "Subscribers", comment: "Stats 'Subscribers' card header") } struct PostStatsHeaders { From 35f1174334b64f9b457cbb4117372df7b2a0c021 Mon Sep 17 00:00:00 2001 From: Povilas Staskus Date: Tue, 23 Apr 2024 15:54:18 +0300 Subject: [PATCH 03/11] Add SubscribersList card to Subscribers tab - Update subscribersList - Subscribe to subscribersList Store updates - Build subscribersListRows() --- .../Subscribers/StatsSubscribersCache.swift | 4 ++ .../StatsSubscribersViewModel.swift | 55 ++++++++++++++++--- 2 files changed, 50 insertions(+), 9 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Stats/Subscribers/StatsSubscribersCache.swift b/WordPress/Classes/ViewRelated/Stats/Subscribers/StatsSubscribersCache.swift index db11cb0a3c51..850b04af9197 100644 --- a/WordPress/Classes/ViewRelated/Stats/Subscribers/StatsSubscribersCache.swift +++ b/WordPress/Classes/ViewRelated/Stats/Subscribers/StatsSubscribersCache.swift @@ -26,5 +26,9 @@ final class StatsSubscribersCache { static func emailsSummary(quantity: Int, sortField: String, sortOrder: String, siteId: NSNumber) -> CacheKey { return .init(record: .subscribersEmailsSummary, key: "\(quantity) \(sortField) \(sortOrder)", siteID: siteId) } + + static func subscribersList(quantity: Int, siteId: NSNumber) -> CacheKey { + return .init(record: .subscribersList, key: "\(quantity)", siteID: siteId) + } } } diff --git a/WordPress/Classes/ViewRelated/Stats/Subscribers/StatsSubscribersViewModel.swift b/WordPress/Classes/ViewRelated/Stats/Subscribers/StatsSubscribersViewModel.swift index 5d55a741f2bb..244dba0325f5 100644 --- a/WordPress/Classes/ViewRelated/Stats/Subscribers/StatsSubscribersViewModel.swift +++ b/WordPress/Classes/ViewRelated/Stats/Subscribers/StatsSubscribersViewModel.swift @@ -15,17 +15,20 @@ final class StatsSubscribersViewModel { func refreshData() { store.updateEmailsSummary(quantity: 10, sortField: .postId) + store.updateSubscribersList(quantity: 10) } // MARK: - Lifecycle func addObservers() { - Publishers.MergeMany(store.emailsSummary) - .removeDuplicates() - .sink { [weak self] _ in - self?.updateTableViewSnapshot() - } - .store(in: &cancellables) + Publishers.CombineLatest( + store.emailsSummary.removeDuplicates(), + store.subscribersList.removeDuplicates() + ) + .sink { [weak self] _ in + self?.updateTableViewSnapshot() + } + .store(in: &cancellables) } func removeObservers() { @@ -37,9 +40,9 @@ final class StatsSubscribersViewModel { private extension StatsSubscribersViewModel { func updateTableViewSnapshot() { - let snapshot = ImmuTableDiffableDataSourceSnapshot.multiSectionSnapshot( - emailsSummaryRows() - ) + var snapshot = ImmuTableDiffableDataSourceSnapshot() + snapshot.addSection(subscribersListRows()) + snapshot.addSection(emailsSummaryRows()) tableViewSnapshot.send(snapshot) } @@ -88,6 +91,40 @@ private extension StatsSubscribersViewModel { } } +// MARK: - Subscribers List + +private extension StatsSubscribersViewModel { + func subscribersListRows() -> [any StatsHashableImmuTableRow] { + switch store.subscribersList.value { + case .loading, .idle: + return loadingRows(.subscribersList) + case .success(let subscribers): + return [ + TopTotalsPeriodStatsRow( + itemSubtitle: StatSection.ItemSubtitles.follower, + dataSubtitle: StatSection.DataSubtitles.since, + dataRows: subscribersListDataRows(subscribers), + statSection: .subscribersList, + siteStatsPeriodDelegate: viewMoreDelegate + ) + ] + case .error: + return errorRows(.subscribersList) + } + } + + func subscribersListDataRows(_ subscribers: [StatsFollower]) -> [StatsTotalRowData] { + return subscribers.map { + return StatsTotalRowData( + name: $0.name, + data: $0.subscribedDate.relativeStringInPast(), + userIconURL: $0.avatarURL, + statSection: .subscribersList + ) + } + } +} + private extension StatsSubscribersViewModel { struct Strings { static let titleColumn = NSLocalizedString("stats.subscribers.emailsSummary.column.title", value: "Latest emails", comment: "A title for table's column that shows a name of an email") From 7c5cdd19de534af2239762838f75218f45f5d840 Mon Sep 17 00:00:00 2001 From: Povilas Staskus Date: Tue, 23 Apr 2024 16:13:08 +0300 Subject: [PATCH 04/11] Updated StatsSubscribersViewModel tests to include subscribersList --- .../StatsSubscribersViewModelTests.swift | 35 +++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/WordPress/WordPressTest/StatsSubscribersViewModelTests.swift b/WordPress/WordPressTest/StatsSubscribersViewModelTests.swift index 1b3edcc3c382..b31ef5ea41db 100644 --- a/WordPress/WordPressTest/StatsSubscribersViewModelTests.swift +++ b/WordPress/WordPressTest/StatsSubscribersViewModelTests.swift @@ -29,12 +29,37 @@ final class StatsSubscribersViewModelTests: XCTestCase { wait(for: [expectation], timeout: 1) } + func testTableViewSnapshot_subscribersListLoaded() throws { + let expectation = expectation(description: "First section should be TopTotalsPeriodStatsRow") + var subscribersListRow: TopTotalsPeriodStatsRow? + sut.tableViewSnapshot + .sink(receiveValue: { snapshot in + if let row = snapshot.itemIdentifiers[0].immuTableRow as? TopTotalsPeriodStatsRow { + subscribersListRow = row + expectation.fulfill() + } + }) + .store(in: &cancellables) + + let subscribers: [StatsFollower] = [ + .init(name: "First Subscriber", subscribedDate: Date(), avatarURL: nil), + .init(name: "Second Subscriber", subscribedDate: Date(), avatarURL: nil), + .init(name: "Third Subscriber", subscribedDate: Date(), avatarURL: nil) + ] + store.subscribersList.send(.success(subscribers)) + + wait(for: [expectation], timeout: 1) + XCTAssertEqual(subscribersListRow?.dataRows.count, 3) + XCTAssertEqual(subscribersListRow?.dataRows[0].name, "First Subscriber") + XCTAssertEqual(subscribersListRow?.dataRows[2].name, "Third Subscriber") + } + func testTableViewSnapshot_emailsSummaryLoaded() throws { - let expectation = expectation(description: "First section should be loading") + let expectation = expectation(description: "First section should be TopTotalsPeriodStatsRow") var emailsSummaryRow: TopTotalsPeriodStatsRow? sut.tableViewSnapshot .sink(receiveValue: { snapshot in - if let row = snapshot.itemIdentifiers.first?.immuTableRow as? TopTotalsPeriodStatsRow { + if let row = snapshot.itemIdentifiers[1].immuTableRow as? TopTotalsPeriodStatsRow { emailsSummaryRow = row expectation.fulfill() } @@ -57,9 +82,15 @@ final class StatsSubscribersViewModelTests: XCTestCase { private class StatsSubscribersStoreMock: StatsSubscribersStoreProtocol { var emailsSummary: CurrentValueSubject, Never> = .init(.idle) + var subscribersList: CurrentValueSubject, Never> = .init(.idle) var updateEmailsSummaryCalled = false + var updateSubscribersListCalled = false func updateEmailsSummary(quantity: Int, sortField: StatsEmailsSummaryData.SortField) { updateEmailsSummaryCalled = true } + + func updateSubscribersList(quantity: Int) { + updateSubscribersListCalled = true + } } From 9e7b8e3a76860e86def3b5e6b0469c434f8ba601 Mon Sep 17 00:00:00 2001 From: Povilas Staskus Date: Tue, 23 Apr 2024 16:20:10 +0300 Subject: [PATCH 05/11] Update SubscribersList column title to Subscriber --- WordPress/Classes/ViewRelated/Stats/Helpers/StatSection.swift | 1 + .../Stats/Subscribers/StatsSubscribersViewModel.swift | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/WordPress/Classes/ViewRelated/Stats/Helpers/StatSection.swift b/WordPress/Classes/ViewRelated/Stats/Helpers/StatSection.swift index d1a8d0b945e3..5593fc19215d 100644 --- a/WordPress/Classes/ViewRelated/Stats/Helpers/StatSection.swift +++ b/WordPress/Classes/ViewRelated/Stats/Helpers/StatSection.swift @@ -448,6 +448,7 @@ static let title = NSLocalizedString("Title", comment: "Label for list of stats by content title.") static let service = NSLocalizedString("Service", comment: "Label for connected service in Publicize stat.") static let follower = NSLocalizedString("Follower", comment: "Label for list of followers.") + static let subscriber = NSLocalizedString("stats.section.itemSubtitles.subscriber", value: "Subscriber", comment: "Label for list of subscribers.") static let referrer = NSLocalizedString("Referrer", comment: "Label for link title in Referrers stat.") static let link = NSLocalizedString("Link", comment: "Label for link title in Clicks stat.") static let country = NSLocalizedString("Country", comment: "Label for list of countries.") diff --git a/WordPress/Classes/ViewRelated/Stats/Subscribers/StatsSubscribersViewModel.swift b/WordPress/Classes/ViewRelated/Stats/Subscribers/StatsSubscribersViewModel.swift index 244dba0325f5..534c95ec3c6e 100644 --- a/WordPress/Classes/ViewRelated/Stats/Subscribers/StatsSubscribersViewModel.swift +++ b/WordPress/Classes/ViewRelated/Stats/Subscribers/StatsSubscribersViewModel.swift @@ -101,7 +101,7 @@ private extension StatsSubscribersViewModel { case .success(let subscribers): return [ TopTotalsPeriodStatsRow( - itemSubtitle: StatSection.ItemSubtitles.follower, + itemSubtitle: StatSection.ItemSubtitles.subscriber, dataSubtitle: StatSection.DataSubtitles.since, dataRows: subscribersListDataRows(subscribers), statSection: .subscribersList, From f4956facd50187cd2492650d9c7039d92174d3bc Mon Sep 17 00:00:00 2001 From: Povilas Staskus Date: Tue, 23 Apr 2024 16:36:08 +0300 Subject: [PATCH 06/11] Update StatsSubscribersStore.swift --- .../ViewRelated/Stats/Subscribers/StatsSubscribersStore.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/Classes/ViewRelated/Stats/Subscribers/StatsSubscribersStore.swift b/WordPress/Classes/ViewRelated/Stats/Subscribers/StatsSubscribersStore.swift index b71361940548..3a8894251dcc 100644 --- a/WordPress/Classes/ViewRelated/Stats/Subscribers/StatsSubscribersStore.swift +++ b/WordPress/Classes/ViewRelated/Stats/Subscribers/StatsSubscribersStore.swift @@ -55,7 +55,7 @@ struct StatsSubscribersStore: StatsSubscribersStoreProtocol { } } - // MARK: - Followers + // MARK: - Subscribers List func updateSubscribersList(quantity: Int) { let cacheKey = StatsSubscribersCache.CacheKey.subscribersList(quantity: quantity, siteId: siteID) From 57b3add12e4fb2560ec73c8a37a8ddc46245a93f Mon Sep 17 00:00:00 2001 From: Povilas Staskus Date: Tue, 23 Apr 2024 16:38:28 +0300 Subject: [PATCH 07/11] Update StatsSubscribersStore.swift --- .../ViewRelated/Stats/Subscribers/StatsSubscribersStore.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/Classes/ViewRelated/Stats/Subscribers/StatsSubscribersStore.swift b/WordPress/Classes/ViewRelated/Stats/Subscribers/StatsSubscribersStore.swift index 3a8894251dcc..13a7d7d23304 100644 --- a/WordPress/Classes/ViewRelated/Stats/Subscribers/StatsSubscribersStore.swift +++ b/WordPress/Classes/ViewRelated/Stats/Subscribers/StatsSubscribersStore.swift @@ -109,7 +109,7 @@ struct StatsSubscribersStore: StatsSubscribersStoreProtocol { let followers = Array( followers .sorted(by: { $0.subscribedDate > $1.subscribedDate }) - .prefix(10) + .prefix(quantity) ) completion(.success(followers)) } From 719eff7aa83897cf382ad9efea0abb188dbfe90d Mon Sep 17 00:00:00 2001 From: Povilas Staskus Date: Tue, 23 Apr 2024 16:50:50 +0300 Subject: [PATCH 08/11] Update WordPressKit --- Podfile | 2 +- Podfile.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Podfile b/Podfile index e0559c93d398..c0de436e33ff 100644 --- a/Podfile +++ b/Podfile @@ -56,7 +56,7 @@ end def wordpress_kit # pod 'WordPressKit', '~> 17.0.0' - pod 'WordPressKit', git: 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', commit: 'd95c88b8bb8dceada952ecbf9dcb78a8cb03f1f1' + pod 'WordPressKit', git: 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', commit: '3291ab9b60e88b1bc78f50422efd3b38c30c0eb3' # pod 'WordPressKit', git: 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', branch: '' # pod 'WordPressKit', git: 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', tag: '' # pod 'WordPressKit', path: '../WordPressKit-iOS' diff --git a/Podfile.lock b/Podfile.lock index 87177fab462c..7fd73ae3f0b9 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -121,7 +121,7 @@ DEPENDENCIES: - SwiftLint (= 0.54.0) - WordPress-Editor-iOS (~> 1.19.11) - WordPressAuthenticator (>= 9.0.8, ~> 9.0) - - WordPressKit (from `https://github.com/wordpress-mobile/WordPressKit-iOS.git`, commit `d95c88b8bb8dceada952ecbf9dcb78a8cb03f1f1`) + - WordPressKit (from `https://github.com/wordpress-mobile/WordPressKit-iOS.git`, commit `3291ab9b60e88b1bc78f50422efd3b38c30c0eb3`) - WordPressShared (from `https://github.com/wordpress-mobile/WordPress-iOS-Shared.git`, commit `688ee5e4efddc1fc23626626ef17b7e929bdafb0`) - WordPressUI (~> 1.16) - ZendeskSupportSDK (= 5.3.0) @@ -177,7 +177,7 @@ EXTERNAL SOURCES: Gutenberg: :podspec: https://cdn.a8c-ci.services/gutenberg-mobile/Gutenberg-v1.117.0.podspec WordPressKit: - :commit: d95c88b8bb8dceada952ecbf9dcb78a8cb03f1f1 + :commit: 3291ab9b60e88b1bc78f50422efd3b38c30c0eb3 :git: https://github.com/wordpress-mobile/WordPressKit-iOS.git WordPressShared: :commit: 688ee5e4efddc1fc23626626ef17b7e929bdafb0 @@ -188,7 +188,7 @@ CHECKOUT OPTIONS: :git: https://github.com/wordpress-mobile/FSInteractiveMap.git :tag: 0.2.0 WordPressKit: - :commit: d95c88b8bb8dceada952ecbf9dcb78a8cb03f1f1 + :commit: 3291ab9b60e88b1bc78f50422efd3b38c30c0eb3 :git: https://github.com/wordpress-mobile/WordPressKit-iOS.git WordPressShared: :commit: 688ee5e4efddc1fc23626626ef17b7e929bdafb0 @@ -239,6 +239,6 @@ SPEC CHECKSUMS: ZendeskSupportSDK: 3a8e508ab1d9dd22dc038df6c694466414e037ba ZIPFoundation: d170fa8e270b2a32bef9dcdcabff5b8f1a5deced -PODFILE CHECKSUM: 18c2b48ec12b16596b0b5afa5270f3e79bf71faf +PODFILE CHECKSUM: ea834bc9df013ff80d3ac7612985eec7a814dbe6 COCOAPODS: 1.15.2 From 62a94712971db168b83aeb002e85bb49629c7ecd Mon Sep 17 00:00:00 2001 From: Povilas Staskus Date: Wed, 24 Apr 2024 11:43:37 +0300 Subject: [PATCH 09/11] Rename card and column titles required for Subscribers List --- .../ViewRelated/Stats/Helpers/StatSection.swift | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/WordPress/Classes/ViewRelated/Stats/Helpers/StatSection.swift b/WordPress/Classes/ViewRelated/Stats/Helpers/StatSection.swift index 5593fc19215d..1b1175da9a6e 100644 --- a/WordPress/Classes/ViewRelated/Stats/Helpers/StatSection.swift +++ b/WordPress/Classes/ViewRelated/Stats/Helpers/StatSection.swift @@ -109,7 +109,7 @@ return InsightsHeaders.comments } case .insightsFollowersWordPress, .insightsFollowersEmail: - return InsightsHeaders.followers + return InsightsHeaders.subscribers case .insightsTodaysStats: return InsightsHeaders.todaysStats case .insightsPostingActivity: @@ -167,7 +167,7 @@ return ItemSubtitles.service case .insightsFollowersWordPress, .insightsFollowersEmail: - return ItemSubtitles.follower + return ItemSubtitles.subscriber case .periodReferrers: return ItemSubtitles.referrer case .periodClicks: @@ -405,7 +405,7 @@ static let posts = NSLocalizedString("Posts", comment: "Insights 'Posts' header") static let comments = NSLocalizedString("Comments", comment: "Insights 'Comments' header") static let topCommenters = NSLocalizedString("Top Commenters", comment: "Insights 'Top Commenters' header") - static let followers = NSLocalizedString("Followers", comment: "Insights 'Followers' header") + static let subscribers = NSLocalizedString("stats.insights.subscribers.title", value: "Subscribers", comment: "Insights 'Subscribers' header") static let tagsAndCategories = NSLocalizedString("Tags and Categories", comment: "Insights 'Tags and Categories' header") static let annualSiteStats = NSLocalizedString("This Year", comment: "Insights 'This Year' header") static let addCard = NSLocalizedString("Add stats card", comment: "Label for action to add a new Insight.") @@ -447,8 +447,7 @@ static let author = NSLocalizedString("Author", comment: "Label for list of stats by content author.") static let title = NSLocalizedString("Title", comment: "Label for list of stats by content title.") static let service = NSLocalizedString("Service", comment: "Label for connected service in Publicize stat.") - static let follower = NSLocalizedString("Follower", comment: "Label for list of followers.") - static let subscriber = NSLocalizedString("stats.section.itemSubtitles.subscriber", value: "Subscriber", comment: "Label for list of subscribers.") + static let subscriber = NSLocalizedString("stats.section.itemSubtitles.subscriber", value: "Name", comment: "Table column title that shows the names of subscribers.") static let referrer = NSLocalizedString("Referrer", comment: "Label for link title in Referrers stat.") static let link = NSLocalizedString("Link", comment: "Label for link title in Clicks stat.") static let country = NSLocalizedString("Country", comment: "Label for list of countries.") @@ -461,7 +460,7 @@ static let comments = NSLocalizedString("Comments", comment: "Label for number of comments.") static let views = NSLocalizedString("Views", comment: "Label for number of views.") static let followers = NSLocalizedString("Followers", comment: "Label for number of followers.") - static let since = NSLocalizedString("Since", comment: "Label for time period in list of followers.") + static let since = NSLocalizedString("stats.section.dataSubtitles.subscriber since", value: "Subscriber since", comment: "Table column title that shows the date since the user became a subscriber.") static let clicks = NSLocalizedString("Clicks", comment: "Label for number of clicks.") static let downloads = NSLocalizedString("Downloads", comment: "Label for number of file downloads.") } From b38b09383b5c1a13478e621b3e38d5e2e9591dd5 Mon Sep 17 00:00:00 2001 From: Povilas Staskus Date: Thu, 25 Apr 2024 08:25:39 +0300 Subject: [PATCH 10/11] Update podfile --- Podfile | 2 +- Podfile.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Podfile b/Podfile index 4b49e344fa34..a5dda3b97bfc 100644 --- a/Podfile +++ b/Podfile @@ -56,7 +56,7 @@ end def wordpress_kit # pod 'WordPressKit', '~> 17.0.0' - pod 'WordPressKit', git: 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', commit: '3291ab9b60e88b1bc78f50422efd3b38c30c0eb3' + pod 'WordPressKit', git: 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', commit: '14aa53a2e1cfa764e3e9e3e91d1f39f4ef09e098' # pod 'WordPressKit', git: 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', branch: '' # pod 'WordPressKit', git: 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', tag: '' # pod 'WordPressKit', path: '../WordPressKit-iOS' diff --git a/Podfile.lock b/Podfile.lock index fd12483d9fa8..84ba5bea8268 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -121,7 +121,7 @@ DEPENDENCIES: - SwiftLint (= 0.54.0) - WordPress-Editor-iOS (~> 1.19.11) - WordPressAuthenticator (>= 9.0.8, ~> 9.0) - - WordPressKit (from `https://github.com/wordpress-mobile/WordPressKit-iOS.git`, commit `3291ab9b60e88b1bc78f50422efd3b38c30c0eb3`) + - WordPressKit (from `https://github.com/wordpress-mobile/WordPressKit-iOS.git`, commit `14aa53a2e1cfa764e3e9e3e91d1f39f4ef09e098`) - WordPressShared (from `https://github.com/wordpress-mobile/WordPress-iOS-Shared.git`, commit `688ee5e4efddc1fc23626626ef17b7e929bdafb0`) - WordPressUI (~> 1.16) - ZendeskSupportSDK (= 5.3.0) @@ -177,7 +177,7 @@ EXTERNAL SOURCES: Gutenberg: :podspec: https://cdn.a8c-ci.services/gutenberg-mobile/Gutenberg-v1.117.0.podspec WordPressKit: - :commit: 3291ab9b60e88b1bc78f50422efd3b38c30c0eb3 + :commit: 14aa53a2e1cfa764e3e9e3e91d1f39f4ef09e098 :git: https://github.com/wordpress-mobile/WordPressKit-iOS.git WordPressShared: :commit: 688ee5e4efddc1fc23626626ef17b7e929bdafb0 @@ -188,7 +188,7 @@ CHECKOUT OPTIONS: :git: https://github.com/wordpress-mobile/FSInteractiveMap.git :tag: 0.2.0 WordPressKit: - :commit: 3291ab9b60e88b1bc78f50422efd3b38c30c0eb3 + :commit: 14aa53a2e1cfa764e3e9e3e91d1f39f4ef09e098 :git: https://github.com/wordpress-mobile/WordPressKit-iOS.git WordPressShared: :commit: 688ee5e4efddc1fc23626626ef17b7e929bdafb0 @@ -239,6 +239,6 @@ SPEC CHECKSUMS: ZendeskSupportSDK: 3a8e508ab1d9dd22dc038df6c694466414e037ba ZIPFoundation: d170fa8e270b2a32bef9dcdcabff5b8f1a5deced -PODFILE CHECKSUM: d5e8587901ad6400bb90366661ff541a6f27f08a +PODFILE CHECKSUM: 4ac1d35f8415bdc8d4c8e39d6aa7a9f6dab5933d COCOAPODS: 1.15.2 From 579498ebeb6807f98cd44ddcdeed92f32fcdb33d Mon Sep 17 00:00:00 2001 From: Povilas Staskus Date: Thu, 25 Apr 2024 08:56:15 +0300 Subject: [PATCH 11/11] Update WordPress/Classes/ViewRelated/Stats/Helpers/StatSection.swift --- WordPress/Classes/ViewRelated/Stats/Helpers/StatSection.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WordPress/Classes/ViewRelated/Stats/Helpers/StatSection.swift b/WordPress/Classes/ViewRelated/Stats/Helpers/StatSection.swift index 2e22e1470783..6c0c00c7ab24 100644 --- a/WordPress/Classes/ViewRelated/Stats/Helpers/StatSection.swift +++ b/WordPress/Classes/ViewRelated/Stats/Helpers/StatSection.swift @@ -461,7 +461,7 @@ static let comments = NSLocalizedString("Comments", comment: "Label for number of comments.") static let views = NSLocalizedString("Views", comment: "Label for number of views.") static let followers = NSLocalizedString("Followers", comment: "Label for number of followers.") - static let since = NSLocalizedString("stats.section.dataSubtitles.subscriber since", value: "Subscriber since", comment: "Table column title that shows the date since the user became a subscriber.") + static let since = NSLocalizedString("stats.section.dataSubtitles.subscriberSince", value: "Subscriber since", comment: "Table column title that shows the date since the user became a subscriber.") static let clicks = NSLocalizedString("Clicks", comment: "Label for number of clicks.") static let downloads = NSLocalizedString("Downloads", comment: "Label for number of file downloads.") static let emailsSummaryOpens = NSLocalizedString("stats.subscribers.emailsSummary.column.opens", value: "Opens", comment: "A title for table's column that shows a number of email openings")