Skip to content

Commit

Permalink
Merge branch 'trunk' into task/switch-to-can-blaze
Browse files Browse the repository at this point in the history
# Conflicts:
#	Podfile.lock
  • Loading branch information
Momo Ozawa committed Jun 22, 2023
2 parents 34619da + ee2c22f commit ad43ee1
Show file tree
Hide file tree
Showing 74 changed files with 669 additions and 1,081 deletions.
2 changes: 1 addition & 1 deletion Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ abstract_target 'Apps' do
# pod 'WordPressAuthenticator', git: 'https://github.com/wordpress-mobile/WordPressAuthenticator-iOS.git', commit: ''
# pod 'WordPressAuthenticator', path: '../WordPressAuthenticator-iOS'

pod 'MediaEditor', '~> 1.2.1'
pod 'MediaEditor', '~> 1.2', '>= 1.2.2'
# pod 'MediaEditor', git: 'https://github.com/wordpress-mobile/MediaEditor-iOS.git', commit: ''
# pod 'MediaEditor', path: '../MediaEditor-iOS'

Expand Down
21 changes: 8 additions & 13 deletions Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ PODS:
- libwebp/mux (1.2.4):
- libwebp/demux
- libwebp/webp (1.2.4)
- MediaEditor (1.2.1):
- MediaEditor (1.2.2):
- CropViewController (~> 2.5.3)
- MRProgress (0.8.3):
- MRProgress/ActivityIndicator (= 0.8.3)
Expand Down Expand Up @@ -512,7 +512,7 @@ PODS:
- WordPressKit (~> 8.0-beta)
- WordPressShared (~> 2.1-beta)
- WordPressUI (~> 1.7-beta)
- WordPressKit (8.4.0-beta.1):
- WordPressKit (8.3.0):
- Alamofire (~> 4.8.0)
- NSObject-SafeExpectations (~> 0.0.4)
- UIDeviceIdentifier (~> 2.0)
Expand Down Expand Up @@ -559,7 +559,7 @@ DEPENDENCIES:
- Gutenberg (from `https://github.com/wordpress-mobile/gutenberg-mobile.git`, tag `v1.97.1`)
- JTAppleCalendar (~> 8.0.2)
- Kanvas (~> 1.4.4)
- MediaEditor (~> 1.2.1)
- MediaEditor (>= 1.2.2, ~> 1.2)
- MRProgress (= 0.8.3)
- NSObject-SafeExpectations (~> 0.0.4)
- "NSURL+IDN (~> 0.4)"
Expand Down Expand Up @@ -612,7 +612,7 @@ DEPENDENCIES:
- SwiftLint (~> 0.50)
- WordPress-Editor-iOS (~> 1.19.8)
- WordPressAuthenticator (~> 6.1-beta)
- WordPressKit (from `https://github.com/wordpress-mobile/WordPressKit-iOS.git`, branch `task/can_blaze`)
- WordPressKit (~> 8.3-beta)
- WordPressShared (from `https://github.com/wordpress-mobile/WordPress-iOS-Shared.git`, branch `trunk`)
- WordPressUI (~> 1.12.5)
- WPMediaPicker (~> 1.8-beta)
Expand All @@ -623,6 +623,7 @@ DEPENDENCIES:
SPEC REPOS:
https://github.com/wordpress-mobile/cocoapods-specs.git:
- WordPressAuthenticator
- WordPressKit
trunk:
- Alamofire
- AlamofireImage
Expand Down Expand Up @@ -775,9 +776,6 @@ EXTERNAL SOURCES:
:git: https://github.com/wordpress-mobile/gutenberg-mobile.git
:submodules: true
:tag: v1.97.1
WordPressKit:
:branch: task/can_blaze
:git: https://github.com/wordpress-mobile/WordPressKit-iOS.git
WordPressShared:
:branch: trunk
:git: https://github.com/wordpress-mobile/WordPress-iOS-Shared.git
Expand All @@ -796,9 +794,6 @@ CHECKOUT OPTIONS:
:git: https://github.com/wordpress-mobile/gutenberg-mobile.git
:submodules: true
:tag: v1.97.1
WordPressKit:
:commit: 58597b3917ce2f4d206f50464520913a6391faf3
:git: https://github.com/wordpress-mobile/WordPressKit-iOS.git
WordPressShared:
:commit: 9a010fdab8d31f9e1fa0511f231e7068ef0170b1
:git: https://github.com/wordpress-mobile/WordPress-iOS-Shared.git
Expand Down Expand Up @@ -830,7 +825,7 @@ SPEC CHECKSUMS:
JTAppleCalendar: 932cadea40b1051beab10f67843451d48ba16c99
Kanvas: f932eaed3d3f47aae8aafb6c2d27c968bdd49030
libwebp: f62cb61d0a484ba548448a4bd52aabf150ff6eef
MediaEditor: 20cdeb46bdecd040b8bc94467ac85a52b53b193a
MediaEditor: d08314cfcbfac74361071a306b4bc3a39b3356ae
MRProgress: 16de7cc9f347e8846797a770db102a323fe7ef09
NSObject-SafeExpectations: ab8fe623d36b25aa1f150affa324e40a2f3c0374
"NSURL+IDN": afc873e639c18138a1589697c3add197fe8679ca
Expand Down Expand Up @@ -890,7 +885,7 @@ SPEC CHECKSUMS:
WordPress-Aztec-iOS: 7d11d598f14c82c727c08b56bd35fbeb7dafb504
WordPress-Editor-iOS: 9eb9f12f21a5209cb837908d81ffe1e31cb27345
WordPressAuthenticator: b0b900696de5129a215adcd1e9ae6eb89da36ac8
WordPressKit: 45b04f55d471f1edde248b84614d3208b9e2e88a
WordPressKit: a8bf6dd9a4fbbb3bbfc14b4ac64068e4020c83bd
WordPressShared: 87f3ee89b0a3e83106106f13a8b71605fb8eb6d2
WordPressUI: c5be816f6c7b3392224ac21de9e521e89fa108ac
WPMediaPicker: 0d40b8d66b6dfdaa2d6a41e3be51249ff5898775
Expand All @@ -905,6 +900,6 @@ SPEC CHECKSUMS:
ZendeskSupportSDK: 3a8e508ab1d9dd22dc038df6c694466414e037ba
ZIPFoundation: ae5b4b813d216d3bf0a148773267fff14bd51d37

PODFILE CHECKSUM: 632b4861755f278b8b6a210481f6fbe8801720ca
PODFILE CHECKSUM: 3aafe3a791569455de8949833d0cf31de28aee99

COCOAPODS: 1.12.1
5 changes: 4 additions & 1 deletion RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
-----
* [**] [internal] Blaze: Switch to using new canBlaze property to determine Blaze eligiblity. [#20916]
* [**] Fixed crash issue when accessing drafts that are mid-upload from the Home 'Work on a Draft Post' card. [#20872]
* [**] [internal] Make sure a database tidy-up task (null blog property sanitizer) is completed before any other Core Data queries. [#20867]
* [**] [internal] Make sure media-related features function correctly. [#20889], [20887]
* [*] [internal] Posts list: Disable action bar/menu button when a post is being uploaded [#20885]

Expand All @@ -15,7 +14,11 @@
* [**] Block editor: [iOS] Fix dictation regression, in which typing/dictating at the same time caused content loss. [https://github.com/WordPress/gutenberg/pull/49452]
* [*] Block editor: Display lock icon in disabled state of `Cell` component [https://github.com/wordpress-mobile/gutenberg-mobile/pull/5798]
* [*] Block editor: Show "No title"/"No description" placeholder for not belonged videos in VideoPress block [https://github.com/wordpress-mobile/gutenberg-mobile/pull/5840]

22.5.1
-----
* [*] Resolve an issue that was causing the app crash when `CrashLogging.logError` is called from a background thread. [#20846]
* [**] [internal] Make sure a database tidy-up task (null blog property sanitizer) is completed before any other Core Data queries. [#20867]

22.5
-----
Expand Down
26 changes: 0 additions & 26 deletions WordPress/Classes/Extensions/UIEdgeInsets.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,6 @@ extension UIButton {
imageEdgeInsets = imageEdgeInsets.flippedForRightToLeftLayoutDirection()
titleEdgeInsets = titleEdgeInsets.flippedForRightToLeftLayoutDirection()
}

func verticallyAlignImageAndText(padding: CGFloat = 5) {
guard let imageView = imageView,
let titleLabel = titleLabel else {
return
}

let imageSize = imageView.frame.size
let titleSize = titleLabel.frame.size
let totalHeight = imageSize.height + titleSize.height + padding

imageEdgeInsets = UIEdgeInsets(
top: -(totalHeight - imageSize.height),
left: 0,
bottom: 0,
right: -titleSize.width
)

titleEdgeInsets = UIEdgeInsets(
top: 0,
left: -imageSize.width,
bottom: -(totalHeight - titleSize.height),
right: 0
)
}

}

// Hack: Since UIEdgeInsets is a struct in ObjC, you can't have methods on it.
Expand Down
2 changes: 1 addition & 1 deletion WordPress/Classes/System/WordPress-Bridging-Header.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#import "BlogSelectorViewController.h"
#import "BlogListViewController.h"
#import "BlogDetailsViewController.h"
#import "BlogSiteVisibilityHelper.h"

#import "CommentService.h"
#import "CommentsViewController+Network.h"
Expand Down Expand Up @@ -46,6 +45,7 @@
#import "PostCategoryService.h"
#import "PostContentProvider.h"
#import "PostListFooterView.h"
#import "PostMetaButton.h"
#import "PostService.h"
#import "PostServiceOptions.h"
#import "PostSettingsViewController.h"
Expand Down
19 changes: 19 additions & 0 deletions WordPress/Classes/ViewRelated/Blog/Settings/SettingsCell.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import SwiftUI

struct SettingsCell: View {
let title: String
let value: String?
var placeholder: String?

var body: some View {
HStack {
Text(title)
.layoutPriority(1)
.foregroundColor(.primary)
Spacer()
Text(value ?? (placeholder ?? ""))
.foregroundColor(.secondary)
}
.lineLimit(1)
}
}
67 changes: 67 additions & 0 deletions WordPress/Classes/ViewRelated/Blog/Settings/SettingsPicker.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
import SwiftUI

struct SettingsPicker<T: Hashable>: View {
let title: String
@Binding var selection: T
let values: [SettingsPickerValue<T>]

init(title: String, selection: Binding<T>, values: [SettingsPickerValue<T>]) {
self.title = title
self._selection = selection
self.values = values
}

var body: some View {
NavigationLink(destination: {
SettingsPickerListView(selection: $selection, values: values)
.navigationTitle(title)
}, label: {
let value = values.first { $0.id == selection }
SettingsCell(title: title, value: value?.title)
})
}
}

struct SettingsPickerValue<T: Hashable>: Identifiable {
let title: String
let id: T
var hint: String?
}

struct SettingsPickerListView<T: Hashable>: View {
@Binding var selection: T
let values: [SettingsPickerValue<T>]

var body: some View {
List {
Section(content: {
ForEach(values, content: makeRow)
}, footer: {
if let hint = values.first(where: { $0.id == selection })?.hint {
Text(hint)
}
})
}
.listStyle(.insetGrouped)
}

private func makeRow(for value: SettingsPickerValue<T>) -> some View {
Button(action: {
guard selection != value.id else { return }
selection = value.id
}) {
HStack {
Text(value.title)
Spacer()
if value.id == selection {
Image(systemName: "checkmark")
.font(.headline)
.foregroundColor(.accentColor)

}
}
.contentShape(Rectangle())
}
.buttonStyle(.plain)
}
}

This file was deleted.

This file was deleted.

Loading

0 comments on commit ad43ee1

Please sign in to comment.