Skip to content

Commit d621615

Browse files
committed
Merge remote-tracking branch 'origin/trunk' into feature/18375-prompts-core-data
2 parents 132465f + 8c4b3ca commit d621615

File tree

155 files changed

+1175
-794
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

155 files changed

+1175
-794
lines changed

Podfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ abstract_target 'Apps' do
169169
## Gutenberg (React Native)
170170
## =====================
171171
##
172-
gutenberg :tag => 'v1.75.0'
172+
gutenberg :tag => 'v1.76.0'
173173

174174
## Third party libraries
175175
## =====================

Podfile.lock

Lines changed: 102 additions & 102 deletions
Large diffs are not rendered by default.

RELEASE-NOTES.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,13 @@
22
-----
33
* [*] Site Settings: we fixed an issue that prevented the site title to be updated when it changed in Site Settings [#18543]
44
* [*] Media Picker: Fixed an issue where the empty state view was being displayed incorrectly. [#18471]
5+
* [*] Quick Start: We are now showing a different set of Quick Start tasks for existing sites and new sites. The existing sites checklist includes new tours such as: "Check your notifications" and "Upload photos or videos". [#18395, #18412, #18443, #18471]
56
* [*] Site Creation: we fixed an issue where the navigation buttons were not scaling when large fonts were selected on the device [#18559]
7+
* [**] Block Editor: Cover Block: Improve color contrast between background and text [https://github.com/wordpress-mobile/gutenberg-mobile/pull/4808]
8+
* [***] Block Editor: Add drag & drop blocks feature [https://github.com/wordpress-mobile/gutenberg-mobile/pull/4832]
9+
* [*] Block Editor: Gallery block: Fix broken "Link To" settings and add "Image Size" settings [https://github.com/wordpress-mobile/gutenberg-mobile/pull/4841]
10+
* [*] Block Editor: Unsupported Block Editor: Prevent WordPress.com tour banner from displaying. [https://github.com/wordpress-mobile/gutenberg-mobile/pull/4820]
11+
* [*] Widgets: we fixed an issue where text appeared flipped in rtl languages [#18567]
612

713
19.8
814
-----

WordPress/Classes/Categories/UIViewController+RemoveQuickStart.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ - (void)removeQuickStartFromBlog:(Blog *)blog sourceView:(UIView *)sourceView so
1515

1616
UIAlertController *removeConfirmation = [UIAlertController alertControllerWithTitle:removeTitle message:removeMessage preferredStyle:UIAlertControllerStyleAlert];
1717
[removeConfirmation addCancelActionWithTitle:cancelTitle handler:^(UIAlertAction * _Nonnull action) {
18-
[WPAnalytics track:WPAnalyticsStatQuickStartRemoveDialogButtonCancelTapped];
18+
[WPAnalytics trackQuickStartStat:WPAnalyticsStatQuickStartRemoveDialogButtonCancelTapped blog: blog];
1919
[NoticesDispatch unlock];
2020
}];
2121
[removeConfirmation addDefaultActionWithTitle:confirmationTitle handler:^(UIAlertAction * _Nonnull action) {
22-
[WPAnalytics track:WPAnalyticsStatQuickStartRemoveDialogButtonRemoveTapped];
22+
[WPAnalytics trackQuickStartStat:WPAnalyticsStatQuickStartRemoveDialogButtonRemoveTapped blog: blog];
2323
[[QuickStartTourGuide shared] removeFrom:blog];
2424
[NoticesDispatch unlock];
2525
}];

WordPress/Classes/Services/BloggingPromptsService.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,18 @@ class BloggingPromptsService {
6565
}, failure: failure)
6666
}
6767

68+
/// Convenience method to fetch the blogging prompts for the Prompts List.
69+
/// Fetches 11 prompts - the current day and 10 previous.
70+
///
71+
/// - Parameters:
72+
/// - success: Closure to be called when the fetch process succeeded.
73+
/// - failure: Closure to be called when the fetch process failed.
74+
func fetchListPrompts(success: @escaping ([BloggingPrompt]) -> Void,
75+
failure: @escaping (Error?) -> Void) {
76+
let fromDate = calendar.date(byAdding: .day, value: -9, to: Date()) ?? Date()
77+
fetchPrompts(from: fromDate, number: 11, success: success, failure: failure)
78+
}
79+
6880
required init?(contextManager: CoreDataStack = ContextManager.shared,
6981
remote: BloggingPromptsServiceRemote? = nil,
7082
blog: Blog? = nil) {
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import Foundation
2+
3+
extension WPAnalytics {
4+
5+
static let WPAppAnalyticsKeyQuickStartSiteType: String = "site_type"
6+
7+
/// Track a Quick Start event
8+
///
9+
/// This will call each registered tracker and fire the given event
10+
/// - Parameter event: a `WPAnalyticsEvent` that represents the Quick Start event to track
11+
/// - Parameter properties: a `Hash` that represents the properties
12+
/// - Parameter blog: a `Blog` to which the Quick Start event relates to. Used to determine the Quick Start Type
13+
///
14+
static func trackQuickStartEvent(_ event: WPAnalyticsEvent, properties: [AnyHashable: Any] = [:], blog: Blog) {
15+
var props = properties
16+
props[WPAppAnalyticsKeyQuickStartSiteType] = blog.quickStartType.key
17+
WPAnalytics.track(event, properties: props)
18+
}
19+
20+
/// Track a Quick Start stat
21+
///
22+
/// This will call each registered tracker and fire the given stat
23+
/// - Parameter stat: a `WPAnalyticsStat` that represents the Quick Start stat to track
24+
/// - Parameter properties: a `Hash` that represents the properties
25+
/// - Parameter blog: a `Blog` to which the Quick Start stat relates to. Used to determine the Quick Start Type
26+
///
27+
static func trackQuickStartStat(_ stat: WPAnalyticsStat, properties: [AnyHashable: Any] = [:], blog: Blog) {
28+
var props = properties
29+
props[WPAppAnalyticsKeyQuickStartSiteType] = blog.quickStartType.key
30+
WPAnalytics.track(stat, withProperties: props)
31+
}
32+
33+
/// Track a Quick Start stat in Obj-C
34+
///
35+
/// This will call each registered tracker and fire the given stat
36+
/// - Parameter stat: a `WPAnalyticsStat` that represents the Quick Start stat to track
37+
/// - Parameter blog: a `Blog` to which the Quick Start stat relates to. Used to determine the Quick Start Type
38+
///
39+
@objc static func trackQuickStartStat(_ stat: WPAnalyticsStat, blog: Blog) {
40+
let props = [WPAppAnalyticsKeyQuickStartSiteType: blog.quickStartType.key]
41+
WPAnalytics.track(stat, withProperties: props)
42+
}
43+
}

WordPress/Classes/Utility/Animator.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class Animator: NSObject {
5858
preamble?()
5959
}
6060

61-
UIView.animate(withDuration: duration, delay: 0, options: .curveEaseOut, animations: animations) { [unowned self] _ in
61+
UIView.animate(withDuration: duration, delay: 0, options: .curveEaseOut, animations: animations) { _ in
6262
self.animationsInProgress -= 1
6363

6464
if self.animationsInProgress == 0 {

WordPress/Classes/Utility/App Configuration/AppConstants.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,9 @@ extension AppConstants {
5959
struct Zendesk {
6060
static let ticketSubject = NSLocalizedString("WordPress for iOS Support", comment: "Subject of new Zendesk ticket.")
6161
}
62+
63+
struct QuickStart {
64+
static let getToKnowTheAppTourTitle = NSLocalizedString("Get to know the WordPress app",
65+
comment: "Name of the Quick Start list that guides users through a few tasks to explore the WordPress app.")
66+
}
6267
}

WordPress/Classes/Utility/BuildInformation/FeatureFlag.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ enum FeatureFlag: Int, CaseIterable, OverrideableFlag {
8888
case .siteName:
8989
return true
9090
case .quickStartForExistingUsers:
91-
return BuildConfiguration.current == .localDeveloper
91+
return true
9292
}
9393
}
9494

WordPress/Classes/Utility/PushNotificationsManager.swift

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -427,17 +427,19 @@ extension PushNotificationsManager {
427427
}
428428
WPTabBarController.sharedInstance()?.showMySitesTab()
429429

430-
if let taskName = userInfo.string(forKey: QuickStartTracking.taskNameKey) {
430+
if let taskName = userInfo.string(forKey: QuickStartTracking.taskNameKey),
431+
let quickStartType = userInfo.string(forKey: QuickStartTracking.quickStartTypeKey) {
431432
WPAnalytics.track(.quickStartNotificationTapped,
432-
withProperties: [QuickStartTracking.taskNameKey: taskName])
433+
withProperties: [QuickStartTracking.taskNameKey: taskName,
434+
WPAnalytics.WPAppAnalyticsKeyQuickStartSiteType: quickStartType])
433435
}
434436

435437
completionHandler?(.newData)
436438

437439
return true
438440
}
439441

440-
func postNotification(for tour: QuickStartTour) {
442+
func postNotification(for tour: QuickStartTour, quickStartType: QuickStartType) {
441443
deletePendingLocalNotifications()
442444

443445
let content = UNMutableNotificationContent()
@@ -459,7 +461,8 @@ extension PushNotificationsManager {
459461
UNUserNotificationCenter.current().add(request)
460462

461463
WPAnalytics.track(.quickStartNotificationStarted,
462-
withProperties: [QuickStartTracking.taskNameKey: tour.analyticsKey])
464+
withProperties: [QuickStartTracking.taskNameKey: tour.analyticsKey,
465+
WPAnalytics.WPAppAnalyticsKeyQuickStartSiteType: quickStartType.key])
463466
}
464467

465468
@objc func deletePendingLocalNotifications() {
@@ -473,6 +476,7 @@ extension PushNotificationsManager {
473476

474477
private enum QuickStartTracking {
475478
static let taskNameKey = "task_name"
479+
static let quickStartTypeKey = "site_type"
476480
}
477481
}
478482

0 commit comments

Comments
 (0)