Skip to content

Commit

Permalink
Merge pull request #17668 from wordpress-mobile/release/18.8
Browse files Browse the repository at this point in the history
Merge 18.8 changes into `trunk`
  • Loading branch information
jkmassel authored Dec 13, 2021
2 parents 0fea86b + e92a973 commit da81995
Show file tree
Hide file tree
Showing 306 changed files with 9,438 additions and 4,519 deletions.
1 change: 1 addition & 0 deletions .bundle/config
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
BUNDLE_PATH: "vendor/bundle"
BUNDLE_JOBS: "16"
BUNDLE_WITHOUT: "screenshots"
38 changes: 22 additions & 16 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,22 @@
GIT
remote: [email protected]:wordpress-mobile/release-toolkit
revision: eccf5a273276e976cd42c66590af087d1654037f
branch: develop
specs:
fastlane-plugin-wpmreleasetoolkit (2.1.0)
activesupport (~> 5)
bigdecimal (~> 1.4)
chroma (= 0.2.0)
diffy (~> 3.3)
git (~> 1.3)
jsonlint (~> 0.3)
nokogiri (~> 1.11)
octokit (~> 4.18)
parallel (~> 1.14)
progress_bar (~> 1.3)
rake (>= 12.3, < 14.0)
rake-compiler (~> 1.0)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -165,19 +184,6 @@ GEM
trainer
xcodeproj
xctest_list (>= 1.2.1)
fastlane-plugin-wpmreleasetoolkit (2.1.0)
activesupport (~> 5)
bigdecimal (~> 1.4)
chroma (= 0.2.0)
diffy (~> 3.3)
git (~> 1.3)
jsonlint (~> 0.3)
nokogiri (~> 1.11)
octokit (~> 4.18)
parallel (~> 1.14)
progress_bar (~> 1.3)
rake (>= 12.3, < 14.0)
rake-compiler (~> 1.0)
ffi (1.15.0)
fourflusher (2.3.1)
fuzzy_match (2.0.4)
Expand Down Expand Up @@ -226,7 +232,7 @@ GEM
http-cookie (1.0.4)
domain_name (~> 0.5)
httpclient (2.8.3)
i18n (1.8.10)
i18n (1.8.11)
concurrent-ruby (~> 1.0)
jmespath (1.4.0)
json (2.5.1)
Expand Down Expand Up @@ -340,11 +346,11 @@ DEPENDENCIES
fastlane-plugin-appcenter (~> 1.8)
fastlane-plugin-sentry
fastlane-plugin-test_center
fastlane-plugin-wpmreleasetoolkit (~> 2.1)
fastlane-plugin-wpmreleasetoolkit!
octokit (~> 4.0)
rake
rmagick (~> 3.2.0)
xcpretty-travis-formatter

BUNDLED WITH
2.2.27
2.2.31
6 changes: 3 additions & 3 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ workspace 'WordPress.xcworkspace'
## ===================================
##
def wordpress_shared
pod 'WordPressShared', '~> 1.16.2'
pod 'WordPressShared', '~> 1.17.0'
#pod 'WordPressShared', :git => 'https://github.com/wordpress-mobile/WordPress-iOS-Shared.git', :tag => ''
#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 => ''
Expand All @@ -47,7 +47,7 @@ def wordpress_ui
end

def wordpress_kit
pod 'WordPressKit', '~> 4.43.0'
pod 'WordPressKit', '~> 4.44.0'
# pod 'WordPressKit', :git => 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', :tag => ''
# pod 'WordPressKit', :git => 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', :branch => ''
# pod 'WordPressKit', :git => 'https://github.com/wordpress-mobile/WordPressKit-iOS.git', :commit => ''
Expand Down Expand Up @@ -166,7 +166,7 @@ abstract_target 'Apps' do
## Gutenberg (React Native)
## =====================
##
gutenberg :tag => 'v1.66.0'
gutenberg :tag => 'v1.67.0'

## Third party libraries
## =====================
Expand Down
200 changes: 100 additions & 100 deletions Podfile.lock

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
18.9
-----


18.8
-----
* [*] Added a new About screen, with links to rate the app, share it with others, visit our Twitter profile, view our other apps, and more. [https://github.com/orgs/wordpress-mobile/projects/107]
* [*] Editor: Show a compact notice when switching between HTML or Visual mode. [https://github.com/wordpress-mobile/WordPress-iOS/pull/17521]
* [*] Onboarding Improvements: Need a little help after login? We're here for you. We've made a few changes to the login flow that will make it easier for you to start managing your site or create a new one. [#17564]
* [***] Fixed crash where uploading image when offline crashes iOS app. [#17488]
* [***] Fixed crash that was sometimes triggered when deleting media. [#17559]
* [***] Fixes a crasher that was sometimes triggered when seeing the details for like notifications. [#17529]
* [**] Block editor: Add clipboard link suggestion to image block and button block. [https://github.com/WordPress/gutenberg/pull/35972]
* [*] Block editor: Embed block: Include link in block settings. [https://github.com/wordpress-mobile/gutenberg-mobile/pull/4189]
* [**] Block editor: Fix tab titles translation of inserter menu. [https://github.com/wordpress-mobile/gutenberg-mobile/pull/4248]
* [**] Block editor: Gallery block: When a gallery block is added, the media options are auto opened for v2 of the Gallery block. [https://github.com/wordpress-mobile/gutenberg-mobile/pull/4277]
* [*] Block editor: Media & Text block: Fix an issue where the text font size would be bigger than expected in some cases. [https://github.com/wordpress-mobile/gutenberg-mobile/pull/4252]

18.7
-----
Expand Down
158 changes: 0 additions & 158 deletions Scripts/localize.py

This file was deleted.

1 change: 1 addition & 0 deletions WordPress/Classes/Categories/NSObject+Helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@

+ (nonnull NSString *)classNameWithoutNamespaces;

- (void)debounce:(SEL)selector afterDelay:(NSTimeInterval)timeInterval;
@end
10 changes: 10 additions & 0 deletions WordPress/Classes/Categories/NSObject+Helpers.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,14 @@ + (NSString *)classNameWithoutNamespaces
return [[NSStringFromClass(self) componentsSeparatedByString:@"."] lastObject];
}

- (void)debounce:(SEL)selector afterDelay:(NSTimeInterval)timeInterval
{
__weak __typeof(self) weakSelf = self;
[NSObject cancelPreviousPerformRequestsWithTarget:weakSelf
selector:selector
object:nil];
[weakSelf performSelector:selector
withObject:nil
afterDelay:timeInterval];
}
@end
13 changes: 13 additions & 0 deletions WordPress/Classes/Models/Blog+Lookup.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,17 @@ public extension Blog {
// assemble the predicate as in `NSPredicate("blogID == %@")`
try? lookup(withID: id.int64Value, in: context)
}

/// Lookup a Blog by WP.ORG Credentials
///
/// - Parameters:
/// - username: The username associated with the blog.
/// - xmlrpc: The xmlrpc URL address
/// - context: An NSManagedObjectContext containing the `Blog` object with the given `blogID`.
/// - Returns: The `Blog` object associated with the given `username` and `xmlrpc`, if it exists.
static func lookup(username: String, xmlrpc: String, in context: NSManagedObjectContext) -> Blog? {
let service = BlogService(managedObjectContext: context)

return service.findBlog(withXmlrpc: xmlrpc, andUsername: username)
}
}
30 changes: 30 additions & 0 deletions WordPress/Classes/Models/Comment+CoreDataClass.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,42 @@ public class Comment: NSManagedObject {
/// Convenience method to check if the current user can actually moderate.
/// `canModerate` is only applicable when the site is dotcom-related (hosted or atomic). For self-hosted sites, default to true.
func allowsModeration() -> Bool {
if let _ = post as? ReaderPost {
return canModerate
}

guard let blog = blog,
(blog.isHostedAtWPcom || blog.isAtomic()) else {
return true
}
return canModerate
}

func canReply() -> Bool {
if let readerPost = post as? ReaderPost {
return readerPost.commentsOpen && ReaderHelpers.isLoggedIn()
}

return !isReadOnly()
}

// NOTE: Comment Likes could be disabled, but the API doesn't have that info yet. Let's update this once it's available.
func canLike() -> Bool {
if let _ = post as? ReaderPost {
return ReaderHelpers.isLoggedIn()
}

guard let blog = blog else {
// Disable likes feature for self-hosted sites.
return false
}

return !isReadOnly() && blog.supports(.commentLikes)
}

@objc func isTopLevelComment() -> Bool {
return depth == 0
}
}

private extension Comment {
Expand Down
17 changes: 15 additions & 2 deletions WordPress/Classes/Services/CommentService.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,25 @@ extern NSUInteger const WPTopLevelHierarchicalCommentsPerPage;
success:(void (^)(void))success
failure:(void (^)(NSError *error))failure;

// Sync a list of comments sorted by hierarchy
// Sync a list of comments sorted by hierarchy, fetched by page number.
- (void)syncHierarchicalCommentsForPost:(ReaderPost *)post
page:(NSUInteger)page
success:(void (^)(NSInteger count, BOOL hasMore))success
success:(void (^)(BOOL hasMore, NSNumber *totalComments))success
failure:(void (^)(NSError *error))failure;

// Sync a list of comments sorted by hierarchy, restricted by the specified number of _top level_ comments.
// This method is intended to get a small number of comments.
// Therefore it is restricted to page 1 only.
- (void)syncHierarchicalCommentsForPost:(ReaderPost *)post
topLevelComments:(NSUInteger)number
success:(void (^)(BOOL hasMore, NSNumber *totalComments))success
failure:(void (^)(NSError *error))failure;

// Get the specified number of top level comments for the specified post.
// This method is intended to get a small number of comments.
// Therefore it is restricted to page 1 only.
- (NSArray *)topLevelComments:(NSUInteger)number forPost:(ReaderPost *)post;

// Counts and returns the number of full pages of hierarchcial comments synced for a post.
// A partial set does not count toward the total number of pages.
- (NSInteger)numberOfHierarchicalPagesSyncedforPost:(ReaderPost *)post;
Expand Down
Loading

0 comments on commit da81995

Please sign in to comment.