Skip to content

Commit

Permalink
Merge branch 'trunk' of github.com:wordpress-mobile/WordPress-iOS int…
Browse files Browse the repository at this point in the history
…o trunk
  • Loading branch information
salimbraksa committed May 10, 2024
2 parents 3bed34c + 65bed38 commit d4c4612
Show file tree
Hide file tree
Showing 273 changed files with 12,636 additions and 5,365 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dashboard_card_domain": false,
"dashboard_card_free_to_paid_plans": true,
"dashboard_card_pages": true,
"stats_traffic_tab": true
"stats_traffic_subscribers_tabs": true
}
}
}
2 changes: 1 addition & 1 deletion Gutenberg/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
#
# LOCAL_GUTENBERG=../my-gutenberg-fork bundle exec pod install
ref:
tag: v1.117.0
tag: v1.118.0
github_org: wordpress-mobile
repo_name: gutenberg-mobile
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x3C",
"green" : "0x3A",
"red" : "0x3A"
"blue" : "0x2E",
"green" : "0x2C",
"red" : "0x2C"
}
},
"idiom" : "universal"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x2E",
"green" : "0x2C",
"red" : "0x2C"
"blue" : "0x3C",
"green" : "0x3A",
"red" : "0x3A"
}
},
"idiom" : "universal"
Expand Down
1 change: 1 addition & 0 deletions Modules/Sources/DesignSystem/Foundation/IconName.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public enum IconName: String, CaseIterable {
case blockShare = "block.share"
case starFill = "star.fill"
case starOutline = "star.outline"
case vector = "vector"
}

// MARK: - Load Image
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"images" : [
{
"filename" : "Vector.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true,
"template-rendering-intent" : "template"
}
}
Binary file not shown.
8 changes: 4 additions & 4 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ workspace 'WordPress.xcworkspace'
##
def wordpress_shared
pod 'WordPressShared', '~> 2.3', '>= 2.3.1'
# pod 'WordPressShared', git: 'https://github.com/wordpress-mobile/WordPress-iOS-Shared.git', branch: 'trunk'
# pod 'WordPressShared', git: 'https://github.com/wordpress-mobile/WordPress-iOS-Shared.git', branch: ''
# pod 'WordPressShared', git: 'https://github.com/wordpress-mobile/WordPress-iOS-Shared.git', commit: ''
# pod 'WordPressShared', path: '../WordPress-iOS-Shared'
end
Expand Down Expand Up @@ -55,8 +55,8 @@ def gravatar
end

def wordpress_kit
# pod 'WordPressKit', '~> 17.0.0'
pod 'WordPressKit', git: 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', commit: '1c9aa7ec981fd3369199182605797a5ea4d5efc4'
pod 'WordPressKit', '~> 17.1.0'
# pod 'WordPressKit', git: 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', commit: ''
# 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'
Expand All @@ -76,7 +76,7 @@ def shared_with_all_pods
end

def shared_with_networking_pods
pod 'Reachability', '3.2'
pod 'Reachability', '~> 3.7'

wordpress_kit
end
Expand Down
35 changes: 15 additions & 20 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ PODS:
- Gifu (3.3.1)
- Gravatar (1.0.1)
- Gridicons (1.2.0)
- Gutenberg (1.117.0)
- Gutenberg (1.118.0)
- JTAppleCalendar (8.0.5)
- Kanvas (1.4.9):
- CropViewController
Expand All @@ -49,7 +49,7 @@ PODS:
- OHHTTPStubs/OHPathHelpers (9.1.0)
- OHHTTPStubs/Swift (9.1.0):
- OHHTTPStubs/Default
- Reachability (3.2)
- Reachability (3.7.6)
- Sentry (8.21.0):
- Sentry/Core (= 8.21.0)
- SentryPrivate (= 8.21.0)
Expand All @@ -71,12 +71,12 @@ PODS:
- WordPressKit (~> 17.0)
- WordPressShared (~> 2.1-beta)
- WordPressUI (~> 1.7-beta)
- WordPressKit (17.0.0):
- WordPressKit (17.1.1):
- NSObject-SafeExpectations (~> 0.0.4)
- UIDeviceIdentifier (~> 2.0)
- WordPressShared (~> 2.0-beta)
- wpxmlrpc (~> 0.10)
- WordPressShared (2.3.1)
- WordPressShared (2.4.0)
- WordPressUI (1.16.0)
- wpxmlrpc (0.10.0)
- ZendeskCommonUISDK (6.1.4)
Expand Down Expand Up @@ -107,21 +107,21 @@ DEPENDENCIES:
- Gifu (= 3.3.1)
- Gravatar (= 1.0.1)
- Gridicons (~> 1.2)
- Gutenberg (from `https://cdn.a8c-ci.services/gutenberg-mobile/Gutenberg-v1.117.0.podspec`)
- Gutenberg (from `https://cdn.a8c-ci.services/gutenberg-mobile/Gutenberg-v1.118.0.podspec`)
- JTAppleCalendar (~> 8.0.5)
- Kanvas (~> 1.4.4)
- MediaEditor (>= 1.2.2, ~> 1.2)
- NSObject-SafeExpectations (~> 0.0.4)
- "NSURL+IDN (~> 0.4)"
- OCMock (~> 3.4.3)
- OHHTTPStubs/Swift (~> 9.1.0)
- Reachability (= 3.2)
- Reachability (~> 3.7)
- Starscream (~> 4.0)
- SVProgressHUD (= 2.2.5)
- 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 `1c9aa7ec981fd3369199182605797a5ea4d5efc4`)
- WordPressKit (~> 17.1.0)
- WordPressShared (>= 2.3.1, ~> 2.3)
- WordPressUI (~> 1.16)
- ZendeskSupportSDK (= 5.3.0)
Expand All @@ -132,6 +132,8 @@ SPEC REPOS:
- WordPress-Aztec-iOS
- WordPress-Editor-iOS
- WordPressAuthenticator
- WordPressKit
- WordPressShared
trunk:
- Alamofire
- AlamofireImage
Expand Down Expand Up @@ -159,7 +161,6 @@ SPEC REPOS:
- SVProgressHUD
- SwiftLint
- UIDeviceIdentifier
- WordPressShared
- WordPressUI
- wpxmlrpc
- ZendeskCommonUISDK
Expand All @@ -176,18 +177,12 @@ EXTERNAL SOURCES:
:git: https://github.com/wordpress-mobile/FSInteractiveMap.git
:tag: 0.2.0
Gutenberg:
:podspec: https://cdn.a8c-ci.services/gutenberg-mobile/Gutenberg-v1.117.0.podspec
WordPressKit:
:commit: 1c9aa7ec981fd3369199182605797a5ea4d5efc4
:git: https://github.com/wordpress-mobile/WordPressKit-iOS.git
:podspec: https://cdn.a8c-ci.services/gutenberg-mobile/Gutenberg-v1.118.0.podspec

CHECKOUT OPTIONS:
FSInteractiveMap:
:git: https://github.com/wordpress-mobile/FSInteractiveMap.git
:tag: 0.2.0
WordPressKit:
:commit: 1c9aa7ec981fd3369199182605797a5ea4d5efc4
:git: https://github.com/wordpress-mobile/WordPressKit-iOS.git

SPEC CHECKSUMS:
Alamofire: 02b772c9910e8eba1a079227c32fbd9e46c90a24
Expand All @@ -202,15 +197,15 @@ SPEC CHECKSUMS:
Gifu: 416d4e38c4c2fed012f019e0a1d3ffcb58e5b842
Gravatar: 51437de6811c1d8d6f60c52985f2ca00a85cfc8e
Gridicons: 4455b9f366960121430e45997e32112ae49ffe1d
Gutenberg: 2249ee2bdac042ce129297aee696c7926930bc00
Gutenberg: 3117b6fe578fb7f0bb75377ba96f436ee05c30fe
JTAppleCalendar: 16c6501b22cb27520372c28b0a2e0b12c8d0cd73
Kanvas: cc027f8058de881a4ae2b5aa5f05037b6d054d08
MediaEditor: d08314cfcbfac74361071a306b4bc3a39b3356ae
NSObject-SafeExpectations: c01c8881cbd97efad6f668286b913cd0b7d62ab5
"NSURL+IDN": afc873e639c18138a1589697c3add197fe8679ca
OCMock: 43565190abc78977ad44a61c0d20d7f0784d35ab
OHHTTPStubs: 90eac6d8f2c18317baeca36698523dc67c513831
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
Reachability: fd0ecd23705e2599e4cceeb943222ae02296cbc6
Sentry: ebc12276bd17613a114ab359074096b6b3725203
SentryPrivate: d651efb234cf385ec9a1cdd3eff94b5e78a0e0fe
Sodium: 23d11554ecd556196d313cf6130d406dfe7ac6da
Expand All @@ -221,8 +216,8 @@ SPEC CHECKSUMS:
WordPress-Aztec-iOS: 3732c6d865a5c9f35788377bdeda8a80ea10d0a1
WordPress-Editor-iOS: 453345420ced3d3ef20f0051b3df46ff10281e0c
WordPressAuthenticator: 898acaac75c5ade9b900c02622a15b9aef8fde1a
WordPressKit: a71cc550f4b525ab5eef057984c8de071462edd5
WordPressShared: 04c6d51441bb8fa29651075b3a5536c90ae89c76
WordPressKit: a4af3d5d071734aaec75ccecefc7850ece6068fc
WordPressShared: 0160364ed24f4d67fed4e85003fefa837faad84f
WordPressUI: ec5ebcf7e63e797ba51d07513e340c1b14cf45a4
wpxmlrpc: 68db063041e85d186db21f674adf08d9c70627fd
ZendeskCommonUISDK: ba160fe413b491af9e7bfcb9808afcd494dc83a5
Expand All @@ -234,6 +229,6 @@ SPEC CHECKSUMS:
ZendeskSupportSDK: 3a8e508ab1d9dd22dc038df6c694466414e037ba
ZIPFoundation: d170fa8e270b2a32bef9dcdcabff5b8f1a5deced

PODFILE CHECKSUM: 2eafc7ffff1e9a87070b94cfa3e3f8bae4f29bde
PODFILE CHECKSUM: fe8df3e873baa4219a3e9b59632c5d2c7e3d774e

COCOAPODS: 1.15.2
32 changes: 31 additions & 1 deletion RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,36 @@
24.9
-----
* [*] Add "Parent Page" to "Page Settings" [#23136]
* [*] Add "Slug" and "Excerpt" fields to "Page Settings" [#23135]
* [*] Make it easier to "Share" and "Blaze" a published post with an updated success view [##23128]
* [*] Add support for viewing trashed posts and pages and restoring them from the editor [#23142]
* [***] [Jetpack-only] Reorganized Stats to include updated Traffic and Insights tabs, along with a newly added Subscribers tab to improve subscriber metrics analysis [#23159]
* [*] Impove the "Post Settings" screen groups/ordering to better align with Gutenberg [#23164]
* [*] Update the "More" menu in the Editor to use modern iOS design and update copy to match Gutenberg [#23145]
* [*] Update the "Revisions" list design and fix an issue with the footer displaying incorrect "Date Created" for drafts [#23145]
* [***] Fix multiple post sync issues: [#21895], [#22037], [#8111], [#10168], [#17343], [#14221], [#12800], [#12073], [#14572], [#9319], [#21941], [#3070], [#3978], [#9449], [#13023], [#21472]
* [**] Fix [#4870], [#14798], an issue where the app sometimes overwrites the changes made on the remote. The app will now show a new "Conflict Resolution" screen if there is a conflict. It will also no longer try to auto-upload changes to an existing published post or publish a draft, eliminating multiple possible failure points.
* [**] Fix [#12121], [#13724], [#14251], [#18517], [#17086], [#15767], [#16514], [#13654] and other untracked issues with the "Publish Date" field in Post Settings. The app now has a new date picker that makes it easier to pick and remove the selected date. It also makes it clear if the blog is in a different time zones from your local timezone. The "Publish Date" field was also removed from the Post Settings screen for draft posts – the date needs to be selected right before publishing.
* [**] Add a new "Media Uploads" screen to the "Publishing Sheet" where you can see the status of the pending uploads. It also shows error messages for each individual upload (if any) and allows you to cancel the failing uploads.
* [*] Fix [#21940], [#13432], [#11435], issues where "Discard Changes" would sometimes delete the entire draft or appear when no changes were made
* [*] Fix [#12099] by removing the "Status" field from Post Settings that was leading to multiple unexpected and confusing scenarios. The app now manages the transitions between state the same way as Gutenberg, so it should feel more familiar to the users.
* [*] Fix [#10663], an issue with unclear error messages. The messages for "synchronous" operations will not appear as alerts with detailed information about the error. The error for drafts will also appear more clearly.
* [*] Update the "Autosave Available" dialog to work the same way as in Gutenberg and to better represent what this feature is – it can no longer be confused with a "Data Conflict" dialog (fixes [#13093])
* [*] Fix [#22107], [#19540], [#13632] by removing the "Draft Uploaded" snackbar
* [*] Fix editor state restoration in the Jetpack app
* [*] Update the support for pending posts to have clearer flows for both admins and contributors
* [*] Fix [#19886], an issue with a missing error message when selecting a page author that's not eligible to be a page author
* [*] Fix [#22969] an issue where Post List content occasionally stops updating
* [*] Fix [#3862] by adding a "Password Protected" badge in [#23154]
* [*] Fix [#21093], a rare crash in "View Stats for Posts" – [#23155]
* [*] Fix [#22247], a rare crash in Post List
* [*] Update the app to use `wp.createPost` and `wp.editPost` instead of the respective deprecated `metaWeblog.*` methods (closes [#1385])

24.8
-----

* [*] [internal] Update Reachability. [#23030]
* [*] Move "Settings" context menu action in "Pages" from the submenu to a separate section to make it easily discoverable and make it available for unpublished posts [#23065]
* [*] [Jetpack-only] Add "Stats" context menu action to "Pages" [#23065]

24.7
-----
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
import Foundation

extension AbstractPost {
/// If a post is in the failed state it can contain references to local files.
/// When updating the app through the App Store the local paths can change.
/// This will fix any outdated local path with the correct one.
///
/// When updating the app through the App Store or installing a new version
/// of the app from Xcode, the local paths can change. This will fix any
/// outdated local path with the correct one.
func fixLocalMediaURLs() {
guard isFailed,
var content = self.content else {
return
}
guard var content = self.content else { return }

media.forEach { media in
guard !media.hasRemote else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,20 @@ extension UINavigationController {

extension UIViewController {
func configureDefaultNavigationBarAppearance() {
var textAttributes: [NSAttributedString.Key: Any] = [.foregroundColor: UIColor.appBarText]
let largeTitleTextAttributes: [NSAttributedString.Key: Any] = [.font: WPStyleGuide.navigationBarLargeFont]

textAttributes[.font] = WPStyleGuide.navigationBarStandardFont

let standardAppearance = UINavigationBarAppearance()
standardAppearance.configureWithDefaultBackground()
standardAppearance.titleTextAttributes = textAttributes
standardAppearance.largeTitleTextAttributes = largeTitleTextAttributes

let scrollEdgeAppearance = UINavigationBarAppearance()
scrollEdgeAppearance.configureWithTransparentBackground()
scrollEdgeAppearance.titleTextAttributes = textAttributes
scrollEdgeAppearance.largeTitleTextAttributes = largeTitleTextAttributes

navigationItem.standardAppearance = standardAppearance
navigationItem.compactAppearance = standardAppearance
Expand Down
10 changes: 8 additions & 2 deletions WordPress/Classes/Models/AbstractPost+TitleForVisibility.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,15 @@ extension AbstractPost {
static let publicLabel = NSLocalizedString("Public", comment: "Privacy setting for posts set to 'Public' (default). Should be the same as in core WP.")

/// A title describing the status. Ie.: "Public" or "Private" or "Password protected"
///
/// - warning: deprecated (kahu-offline-mode) (use ``PostVisibility``)
@objc var titleForVisibility: String {
guard FeatureFlag.syncPublishing.enabled else {
return _titleForVisibility
}
return PostVisibility(post: self).localizedTitle
}

/// - warning: deprecated (kahu-offline-mode) (use ``PostVisibility``)
@objc private var _titleForVisibility: String {
if password != nil {
return AbstractPost.passwordProtectedLabel
} else if status == .publishPrivate {
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Classes/Models/AbstractPost.m
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ - (void)setDateCreated:(NSDate *)localDate
{
self.date_created_gmt = localDate;

if ([RemoteFeature enabled:RemoteFeatureFlagSyncPublishing]) {
if ([Feature enabled:FeatureFlagSyncPublishing]) {
return;
}

Expand Down
9 changes: 9 additions & 0 deletions WordPress/Classes/Models/AbstractPost.swift
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ extension AbstractPost {
}
}

var localizedPostType: String {
switch self {
case is Page:
return NSLocalizedString("postType.page", value: "page", comment: "Localized post type: `Page`")
default:
return NSLocalizedString("postType.post", value: "post", comment: "Localized post type: `Post`")
}
}

// MARK: - Misc

/// Represent the supported properties used to sort posts.
Expand Down
4 changes: 4 additions & 0 deletions WordPress/Classes/Models/Blog.h
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,10 @@ typedef NS_ENUM(NSInteger, SiteVisibility) {
@property (nonatomic, strong, readwrite, nullable) NSDictionary *capabilities;
@property (nonatomic, strong, readwrite, nullable) NSSet<QuickStartTourState *> *quickStartTours;
@property (nonatomic, strong, readwrite, nullable) NSNumber *quickStartTypeValue;

// Site Switcher Convenience Properties
@property (nonatomic, strong, readwrite, nullable) NSDate *pinnedDate;
@property (nonatomic, strong, readwrite, nullable) NSDate *lastUsed;
/// The blog's user ID for the current user
@property (nonatomic, strong, readwrite, nullable) NSNumber *userID;
/// Disk quota for site, this is only available for WP.com sites
Expand Down
2 changes: 2 additions & 0 deletions WordPress/Classes/Models/Blog.m
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ @implementation Blog
@dynamic quotaSpaceUsed;
@dynamic pageTemplateCategories;
@dynamic publicizeInfo;
@dynamic pinnedDate;
@dynamic lastUsed;

@synthesize isSyncingPosts;
@synthesize isSyncingPages;
Expand Down
8 changes: 4 additions & 4 deletions WordPress/Classes/Models/Notifications/Actions/Follow.swift
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/// Encapsulates logic to follow a blog
final class Follow: DefaultNotificationActionCommand {
static let title = NSLocalizedString("Follow", comment: "Prompt to follow a blog.")
static let hint = NSLocalizedString("Follows the blog.", comment: "VoiceOver accessibility hint, informing the user the button can be used to follow a blog.")
static let selectedTitle = NSLocalizedString("Following", comment: "User is following the blog.")
static let selectedHint = NSLocalizedString("Unfollows the blog.", comment: "VoiceOver accessibility hint, informing the user the button can be used to unfollow a blog.")
static let title = NSLocalizedString("notifications.action.subscribe.title", value: "Subscribe", comment: "Prompt to subscribe to a blog.")
static let hint = NSLocalizedString("notifications.action.subscribe.hint", value: "Subscribe to the blog.", comment: "VoiceOver accessibility hint, informing the user the button can be used to subscribe to a blog.")
static let selectedTitle = NSLocalizedString("notifications.action.subscribe.selectedTitle", value: "Subscribed", comment: "User is subscribed to the blog.")
static let selectedHint = NSLocalizedString("notifications.action.subscribe.selectedHint", value: "Unsubscribe from the blog.", comment: "VoiceOver accessibility hint, informing the user the button can be used to unsubscribe from a blog.")

override var actionTitle: String {
return Follow.title
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,9 @@ open class NotificationSettings {
comment: "Setting: indicates if Comment Likes will be notified"),
postLiked: NSLocalizedString("Likes on my posts",
comment: "Setting: indicates if Replies to your comments will be notified"),
follower: NSLocalizedString("Site follows",
comment: "Setting: indicates if New Follows will be notified"),
follower: NSLocalizedString("notification.settings.description.subscriber",
value: "Site subscriptions",
comment: "Setting: indicates if New Subscriptions will be notified"),
achievement: NSLocalizedString("Site achievements",
comment: "Setting: indicates if Achievements will be notified"),
mention: NSLocalizedString("Username mentions",
Expand Down
Loading

0 comments on commit d4c4612

Please sign in to comment.