Skip to content

Commit e5d81e2

Browse files
authored
iOS 26: Minor visual fixes (#24890)
* Slightly larger spacing between cells * Fix empty space in back bar button in notifications * Remove unwanted back button title in screens shown from My Site * Switch to standard back/confirm buttons in Post Settings * Update ChartDataListView * Update PostCategoryCreateView * Update release notse
1 parent 51d8072 commit e5d81e2

File tree

8 files changed

+22
-28
lines changed

8 files changed

+22
-28
lines changed

Modules/Sources/JetpackStats/Screens/ChartDataListView.swift

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import SwiftUI
2+
import WordPressUI
23
import UniformTypeIdentifiers
34

45
struct ChartDataListView: View {
@@ -33,8 +34,14 @@ struct ChartDataListView: View {
3334
.navigationBarTitleDisplayMode(.inline)
3435
.toolbar {
3536
ToolbarItem(placement: .topBarLeading) {
36-
Button(Strings.Buttons.done) {
37-
dismiss()
37+
if #available(iOS 26, *) {
38+
SwiftUI.Button(role: .close) {
39+
dismiss()
40+
}
41+
} else {
42+
SwiftUI.Button(Strings.Buttons.cancel) {
43+
dismiss()
44+
}
3845
}
3946
}
4047
ToolbarItem(placement: .topBarTrailing) {

RELEASE-NOTES.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
26.4
22
-----
3-
* [*] Fix a few minor visual issues on iOS 26 [#24863], [#24863], [#24865], [#24866], [#24867]
3+
* [*] Fix a few minor visual issues on iOS 26 [#24863], [#24863], [#24865], [#24866], [#24867], [#24890]
44
* [*] [Intelligence] Add support for generating excerpts for posts [#24852]
55
* [*] Fix performance issues with search in Reader Subscriptions [#24841]
66
* [*] Improve performance and animations when showing a full Top List with a large number of items [#24868]

WordPress/Classes/Utility/Button+Extensions.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import SwiftUI
22

33
extension Button where Label == Text {
44
@ViewBuilder
5-
public static func make(role: BackportButtonRole, _ action: @escaping () -> Void) -> some View {
5+
public static func make(role: BackportButtonRole, action: @escaping () -> Void) -> some View {
66
if #available(iOS 26, *) {
77
SwiftUI.Button(role: ButtonRole(role), action: action)
88
} else {

WordPress/Classes/ViewRelated/Blog/Blog Dashboard/BlogDashboardViewController.swift

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,12 @@ extension BlogDashboardViewController {
238238
private enum Constants {
239239
static let estimatedHeight: CGFloat = 44
240240
static let horizontalSectionInset: CGFloat = 12
241-
static let verticalSectionInset: CGFloat = 20
242-
static let cellSpacing: CGFloat = 20
241+
static let verticalSectionInset: CGFloat = verticalInset
242+
static let cellSpacing: CGFloat = verticalInset
243+
244+
static var verticalInset: CGFloat {
245+
if #available(iOS 26, *) { 28 } else { 20 }
246+
}
243247
}
244248
}
245249

WordPress/Classes/ViewRelated/Blog/My Site/MySiteViewController.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,6 @@ final class MySiteViewController: UIViewController, UIScrollViewDelegate, NoSite
289289
private func setupNavigationItem() {
290290
navigationItem.largeTitleDisplayMode = .never
291291
navigationItem.title = Strings.mySite
292-
navigationItem.backButtonTitle = Strings.mySite
293292

294293
// Set the nav bar
295294
navigationController?.navigationBar.accessibilityIdentifier = "my-site-navigation-bar"

WordPress/Classes/ViewRelated/Notifications/Controllers/NotificationsViewController/NotificationsViewController.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -459,11 +459,6 @@ private extension NotificationsViewController {
459459
navigationController?.navigationBar.prefersLargeTitles = false
460460
navigationItem.largeTitleDisplayMode = .never
461461
}
462-
463-
// Don't show 'Notifications' in the next-view back button
464-
// we are using a space character because we need a non-empty string to ensure a smooth
465-
// transition back, with large titles enabled.
466-
navigationItem.backBarButtonItem = UIBarButtonItem(title: " ", style: .plain, target: nil, action: nil)
467462
navigationItem.title = NSLocalizedString("Notifications", comment: "Notifications View Controller title")
468463
}
469464

WordPress/Classes/ViewRelated/Post/Categories/PostCategoryCreateView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ struct PostCategoryCreateView: View {
2020
}
2121
.toolbar {
2222
ToolbarItem(placement: .cancellationAction) {
23-
Button(SharedStrings.Button.cancel) {
23+
Button.make(role: .cancel) {
2424
dismiss()
2525
}
2626
}
2727
ToolbarItem(placement: .confirmationAction) {
2828
if isSaving {
2929
ProgressView()
3030
} else {
31-
Button(SharedStrings.Button.save, action: buttonSaveTapped)
31+
Button.make(role: .confirm, action: buttonSaveTapped)
3232
.disabled(title.trimmingCharacters(in: .whitespaces).isEmpty)
3333
}
3434
}

WordPress/Classes/ViewRelated/Post/PostSettings/PostSettingsView.swift

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ private struct PostSettingsView: View {
8585
}
8686

8787
private var buttonCancel: some View {
88-
Button(SharedStrings.Button.cancel) {
88+
Button.make(role: .cancel) {
8989
if viewModel.hasChanges {
9090
isShowingDiscardChangesAlert = true
9191
} else {
@@ -101,19 +101,8 @@ private struct PostSettingsView: View {
101101
if viewModel.isSaving {
102102
ProgressView()
103103
} else {
104-
Group {
105-
if viewModel.isStandalone {
106-
Button(SharedStrings.Button.save) {
107-
viewModel.buttonSaveTapped()
108-
}
109-
.buttonStyle(.borderedProminent)
110-
.buttonBorderShape(.capsule)
111-
} else {
112-
Button(SharedStrings.Button.done) {
113-
viewModel.buttonSaveTapped()
114-
}
115-
.fontWeight(.medium)
116-
}
104+
Button.make(role: .confirm) {
105+
viewModel.buttonSaveTapped()
117106
}
118107
.accessibilityIdentifier("post_settings_save_button")
119108
.disabled(!viewModel.hasChanges)

0 commit comments

Comments
 (0)