Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge bugfixes in 25.6 release branch #23921

Closed
wants to merge 21 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
67a3534
Merge release/25.6 into trunk (#23899)
wpmobilebot Dec 16, 2024
bb5191d
Bump Gravatar to 3.1.0 (#23868)
pinarol Dec 17, 2024
79cbec0
Refactor: Rework PostCompactCell (#23893)
kean Dec 17, 2024
738620c
Bump fastlane from 2.225.0 to 2.226.0 (#23903)
dependabot[bot] Dec 17, 2024
3cff8fc
Bump fastlane-plugin-wpmreleasetoolkit from 12.3.4 to 12.4.0 (#23901)
dependabot[bot] Dec 17, 2024
f035b18
Reader: Enhance cover image (#23897)
kean Dec 17, 2024
4dc1ad5
Bump rubocop from 1.69.1 to 1.69.2 (#23902)
dependabot[bot] Dec 17, 2024
3937a09
Refactor: Add WordPressMedia (#23890)
kean Dec 18, 2024
5912208
Remove TipKit FF (#23906)
kean Dec 18, 2024
0e5b61f
Show Notifications Bell in more places in Reader (#23904)
kean Dec 18, 2024
2f334e2
Move FaviconService (#23905)
kean Dec 18, 2024
171c27c
Fix crash when pushing the same VC twice in Reader
kean Dec 18, 2024
b00da1e
Add release note
kean Dec 18, 2024
ba8b320
Use the `xcode-16.2-macos-14.7.1-v1` CI image (#23894)
spencertransier Dec 19, 2024
046a6c6
Add Image Playground Support (#23688)
jkmassel Dec 19, 2024
fbf817b
Fix crash when pushing the same VC twice in Reader (#23907)
kean Dec 19, 2024
de3bf0b
Five improvements for ReaderDetailHeaderView (#23909)
kean Dec 19, 2024
ecb0a5a
Fix order in Stats / Subsribers / Emails (#23913)
kean Dec 19, 2024
d634ed4
Fix off-by-one error in post likes (#23912)
kean Dec 19, 2024
cc26fec
Fix crash in Reader stream empty state views (#23908)
kean Dec 19, 2024
24b36d3
Merge branch 'release/25.6' into task/merge-bugfixes-release-25-6
kean Dec 23, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .buildkite/shared-pipeline-vars
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
XCODE_VERSION=$(sed -E 's/^~> ?//' .xcode-version)
CI_TOOLKIT_PLUGIN_VERSION="3.7.1"

# Note: `-v4` suffix was added to use xcode-16.1-v4 image; remember to remove that suffix during the next Xcode update
export IMAGE_ID="xcode-$XCODE_VERSION-v4"
export IMAGE_ID="xcode-$XCODE_VERSION-macos-14.7.1-v1"
export CI_TOOLKIT_PLUGIN="automattic/a8c-ci-toolkit#$CI_TOOLKIT_PLUGIN_VERSION"
2 changes: 1 addition & 1 deletion .xcode-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.1
16.2
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ gem 'dotenv'
#
# See failures like https://buildkite.com/automattic/wordpress-ios/builds/24053#019234f2-80a5-40f6-b55e-2f420e6483a8/3840-3915
# and https://github.com/fastlane/fastlane/pull/22256
gem 'fastlane', '~> 2.225'
gem 'fastlane', '~> 2.226'
gem 'fastlane-plugin-appcenter', '~> 2.1'
gem 'fastlane-plugin-sentry'
# This comment avoids typing to switch to a development version for testing.
#
# gem 'fastlane-plugin-wpmreleasetoolkit', git: 'https://github.com/wordpress-mobile/release-toolkit', ref: ''
gem 'fastlane-plugin-wpmreleasetoolkit', '~> 12.3'
gem 'fastlane-plugin-wpmreleasetoolkit', '~> 12.4'
gem 'rake'
gem 'rubocop', '~> 1.69'
gem 'rubocop-rake', '~> 0.6'
Expand Down
38 changes: 19 additions & 19 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ GEM
base64
nkf
rexml
activesupport (7.2.2)
activesupport (7.2.2.1)
base64
benchmark (>= 0.3)
bigdecimal
Expand All @@ -26,7 +26,7 @@ GEM
ast (2.4.2)
atomos (0.1.3)
aws-eventstream (1.3.0)
aws-partitions (1.1015.0)
aws-partitions (1.1023.0)
aws-sdk-core (3.214.0)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
Expand All @@ -35,7 +35,7 @@ GEM
aws-sdk-kms (1.96.0)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sigv4 (~> 1.5)
aws-sdk-s3 (1.175.0)
aws-sdk-s3 (1.176.1)
aws-sdk-core (~> 3, >= 3.210.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.5)
Expand Down Expand Up @@ -165,7 +165,7 @@ GEM
faraday_middleware (1.2.1)
faraday (~> 1.0)
fastimage (2.3.1)
fastlane (2.225.0)
fastlane (2.226.0)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.8, < 3.0.0)
artifactory (~> 3.0)
Expand Down Expand Up @@ -205,12 +205,12 @@ GEM
tty-spinner (>= 0.8.0, < 1.0.0)
word_wrap (~> 1.0.0)
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.3.0)
xcpretty (~> 0.4.0)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
fastlane-plugin-appcenter (2.1.2)
fastlane-plugin-sentry (1.25.1)
os (~> 1.1, >= 1.1.4)
fastlane-plugin-wpmreleasetoolkit (12.3.4)
fastlane-plugin-wpmreleasetoolkit (12.4.0)
activesupport (>= 6.1.7.1)
buildkit (~> 1.5)
chroma (= 0.2.0)
Expand Down Expand Up @@ -273,7 +273,7 @@ GEM
os (>= 0.9, < 2.0)
signet (>= 0.16, < 2.a)
highline (2.0.3)
http-cookie (1.0.7)
http-cookie (1.0.8)
domain_name (~> 0.5)
httpclient (2.8.3)
i18n (1.14.6)
Expand All @@ -288,11 +288,11 @@ GEM
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
language_server-protocol (3.17.0.3)
logger (1.6.2)
logger (1.6.3)
mini_magick (4.13.2)
mini_mime (1.1.5)
mini_portile2 (2.8.8)
minitest (5.25.2)
minitest (5.25.4)
molinillo (0.8.0)
multi_json (1.15.0)
multipart-post (2.4.1)
Expand All @@ -301,7 +301,7 @@ GEM
naturally (2.2.1)
netrc (0.11.0)
nkf (0.2.0)
nokogiri (1.16.8)
nokogiri (1.17.2)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
octokit (6.1.1)
Expand Down Expand Up @@ -334,11 +334,11 @@ GEM
trailblazer-option (>= 0.1.1, < 0.2.0)
uber (< 0.2.0)
retriable (3.1.2)
rexml (3.3.9)
rexml (3.4.0)
rmagick (5.3.0)
pkg-config (~> 1.4)
rouge (2.0.7)
rubocop (1.69.1)
rouge (3.28.0)
rubocop (1.69.2)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
Expand All @@ -348,7 +348,7 @@ GEM
rubocop-ast (>= 1.36.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.36.2)
rubocop-ast (1.37.0)
parser (>= 3.3.1.0)
rubocop-rake (0.6.0)
rubocop (~> 1.0)
Expand All @@ -359,7 +359,7 @@ GEM
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
securerandom (0.4.0)
securerandom (0.4.1)
security (0.1.5)
signet (0.19.0)
addressable (~> 2.8)
Expand Down Expand Up @@ -392,8 +392,8 @@ GEM
colored2 (~> 3.1)
nanaimo (~> 0.4.0)
rexml (>= 3.3.6, < 4.0)
xcpretty (0.3.0)
rouge (~> 2.0.7)
xcpretty (0.4.0)
rouge (~> 3.28.0)
xcpretty-travis-formatter (1.0.1)
xcpretty (~> 0.2, >= 0.0.7)

Expand All @@ -404,10 +404,10 @@ DEPENDENCIES
cocoapods (~> 1.16)
danger-dangermattic (~> 1.2)
dotenv
fastlane (~> 2.225)
fastlane (~> 2.226)
fastlane-plugin-appcenter (~> 2.1)
fastlane-plugin-sentry
fastlane-plugin-wpmreleasetoolkit (~> 12.3)
fastlane-plugin-wpmreleasetoolkit (~> 12.4)
rake
rmagick (~> 5.3.0)
rubocop (~> 1.69)
Expand Down
15 changes: 12 additions & 3 deletions Modules/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ let package = Package(
.library(name: "JetpackStatsWidgetsCore", targets: ["JetpackStatsWidgetsCore"]),
.library(name: "DesignSystem", targets: ["DesignSystem"]),
.library(name: "WordPressFlux", targets: ["WordPressFlux"]),
.library(name: "WordPressMedia", targets: ["WordPressMedia"]),
.library(name: "WordPressShared", targets: ["WordPressShared"]),
.library(name: "WordPressUI", targets: ["WordPressUI"]),
],
Expand All @@ -21,7 +22,7 @@ let package = Package(
.package(url: "https://github.com/AliSoftware/OHHTTPStubs", from: "9.1.0"),
.package(url: "https://github.com/Automattic/Automattic-Tracks-iOS", from: "3.4.2"),
.package(url: "https://github.com/Automattic/AutomatticAbout-swift", from: "1.1.4"),
.package(url: "https://github.com/Automattic/Gravatar-SDK-iOS", from: "3.0.0"),
.package(url: "https://github.com/Automattic/Gravatar-SDK-iOS", from: "3.1.0"),
.package(url: "https://github.com/Automattic/Gridicons-iOS", branch: "develop"),
.package(url: "https://github.com/Automattic/ScreenObject", from: "0.2.3"),
.package(url: "https://github.com/Automattic/XCUITestHelpers", from: "0.4.0"),
Expand All @@ -43,7 +44,7 @@ let package = Package(
.package(url: "https://github.com/wordpress-mobile/MediaEditor-iOS", branch: "task/spm-support"),
.package(url: "https://github.com/wordpress-mobile/NSObject-SafeExpectations", from: "0.0.6"),
.package(url: "https://github.com/wordpress-mobile/NSURL-IDN", branch: "trunk"),
.package(url: "https://github.com/wordpress-mobile/WordPressKit-iOS", branch: "task/reader-discover"),
.package(url: "https://github.com/wordpress-mobile/WordPressKit-iOS", branch: "wpios-edition"),
.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.
.package(url: "https://github.com/Automattic/wordpress-rs", revision: "alpha-20241116"),
Expand All @@ -58,14 +59,21 @@ let package = Package(
.product(name: "XCUITestHelpers", package: "XCUITestHelpers"),
], swiftSettings: [.swiftLanguageMode(.v5)]),
.target(name: "WordPressFlux", swiftSettings: [.swiftLanguageMode(.v5)]),
.target(name: "WordPressMedia"),
.target(name: "WordPressSharedObjC", resources: [.process("Resources")], swiftSettings: [.swiftLanguageMode(.v5)]),
.target(name: "WordPressShared", dependencies: [.target(name: "WordPressSharedObjC")], resources: [.process("Resources")], swiftSettings: [.swiftLanguageMode(.v5)]),
.target(name: "WordPressTesting", resources: [.process("Resources")]),
.target(name: "WordPressUI", dependencies: [.target(name: "WordPressShared")], resources: [.process("Resources")], swiftSettings: [.swiftLanguageMode(.v5)]),
.testTarget(name: "JetpackStatsWidgetsCoreTests", dependencies: [.target(name: "JetpackStatsWidgetsCore")], swiftSettings: [.swiftLanguageMode(.v5)]),
.testTarget(name: "DesignSystemTests", dependencies: [.target(name: "DesignSystem")], swiftSettings: [.swiftLanguageMode(.v5)]),
.testTarget(name: "WordPressFluxTests", dependencies: ["WordPressFlux"], swiftSettings: [.swiftLanguageMode(.v5)]),
.testTarget(name: "WordPressMediaTests", dependencies: [
.target(name: "WordPressMedia"),
.target(name: "WordPressTesting"),
.product(name: "OHHTTPStubsSwift", package: "OHHTTPStubs")
]),
.testTarget(name: "WordPressSharedTests", dependencies: [.target(name: "WordPressShared")], swiftSettings: [.swiftLanguageMode(.v5)]),
.testTarget(name: "WordPressSharedObjCTests", dependencies: [.target(name: "WordPressShared")], resources: [.process("Resources")], swiftSettings: [.swiftLanguageMode(.v5)]),
.testTarget(name: "WordPressSharedObjCTests", dependencies: [.target(name: "WordPressShared"), .target(name: "WordPressTesting")], swiftSettings: [.swiftLanguageMode(.v5)]),
.testTarget(name: "WordPressUITests", dependencies: [.target(name: "WordPressUI")], swiftSettings: [.swiftLanguageMode(.v5)]),
]
)
Expand Down Expand Up @@ -135,6 +143,7 @@ enum XcodeSupport {
"JetpackStatsWidgetsCore",
"WordPressFlux",
"WordPressShared",
"WordPressMedia",
"WordPressUI",
.product(name: "Alamofire", package: "Alamofire"),
.product(name: "AlamofireImage", package: "AlamofireImage"),
Expand Down
18 changes: 18 additions & 0 deletions Modules/Sources/WordPressMedia/AnimagedImage.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import UIKit

public final class AnimatedImage: UIImage, @unchecked Sendable {
public private(set) var gifData: Data?
public var targetSize: CGSize?

static let maximumAllowedSize = 30_000_000

public convenience init?(gifData: Data) {
self.init(data: gifData, scale: 1)

guard gifData.count < AnimatedImage.maximumAllowedSize else {
return // The image is too large to store in memory and play
}

self.gifData = gifData
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import UIKit

// Fetches URLs for favicons for sites.
actor FaviconService {
static let shared = FaviconService()
/// Fetches URLs for favicons for sites.
public actor FaviconService {
public static let shared = FaviconService()

private nonisolated let cache = FaviconCache()

Expand All @@ -14,12 +14,12 @@ actor FaviconService {

private var tasks: [URL: FaviconTask] = [:]

nonisolated func cachedFavicon(forURL siteURL: URL) -> URL? {
nonisolated public func cachedFavicon(forURL siteURL: URL) -> URL? {
cache.cachedFavicon(forURL: siteURL)
}

/// Returns a favicon URL for the given site.
func favicon(forURL siteURL: URL) async throws -> URL {
public func favicon(forURL siteURL: URL) async throws -> URL {
if let faviconURL = cache.cachedFavicon(forURL: siteURL) {
return faviconURL
}
Expand Down Expand Up @@ -57,7 +57,7 @@ actor FaviconService {
}
}

enum FaviconError: Error {
public enum FaviconError: Error, Sendable {
case unacceptableStatusCode(_ code: Int)
}

Expand Down Expand Up @@ -105,7 +105,7 @@ private final class FaviconTask {
var isCancelled = false
var task: Task<URL, Error>

init(_ closure: @escaping () async throws -> URL) {
init(_ closure: @escaping @Sendable () async throws -> URL) {
self.task = Task { try await closure() }
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import Foundation
import UIKit

enum ImageDecoder {
public enum ImageDecoder {
/// Returns an image created from the given URL. The image is decompressed.
/// Returns ``AnimatedImage`` the image is a GIF.
static func makeImage(from fileURL: URL) async throws -> UIImage {
public static func makeImage(from fileURL: URL) async throws -> UIImage {
let data = try Data(contentsOf: fileURL)
return try _makeImage(from: data, size: nil)
}
Expand All @@ -12,7 +12,7 @@ enum ImageDecoder {
/// Returns ``AnimatedImage`` the image is a GIF.
///
/// - parameter size: The desired size of the thumbnail in pixels.
static func makeImage(from data: Data, size: CGSize? = nil) async throws -> UIImage {
public static func makeImage(from data: Data, size: CGSize? = nil) async throws -> UIImage {
try _makeImage(from: data, size: size)
}
}
Expand Down Expand Up @@ -69,3 +69,13 @@ private extension Data {
}
}
}

private extension CGSize {
func scaled(by scale: CGFloat) -> CGSize {
CGSize(width: width * scale, height: height * scale)
}

func rounded() -> CGSize {
CGSize(width: width.rounded(), height: height.rounded())
}
}
Loading