Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class PrepublishingSheetScreen: ScreenObject {
}

private let publishDateButtonGetter: (XCUIApplication) -> XCUIElement = {
$0.staticTexts["Publish Date"]
$0.staticTexts["Date"]
}

private let closeButtonGetter: (XCUIApplication) -> XCUIElement = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class AccountSettingsServiceTests: CoreDataTestCase {
}

func testCancelGettingSettings() throws {
XCTSkip("Flaky")
throw XCTSkip("Flaky")

// This test performs steps described in the link below to reproduce a crash.
// https://github.com/wordpress-mobile/WordPress-iOS/issues/20379#issuecomment-1481995663
Expand Down
5 changes: 3 additions & 2 deletions WordPress/Classes/Utility/BuildInformation/FeatureFlag.swift
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,12 @@ public enum FeatureFlag: Int, CaseIterable {
case .newStats:
return false
case .newPublishingSheet:
return false
return true
case .mediaQuotaView:
return false
case .intelligence:
return BuildConfiguration.current == .debug
let languageCode = Locale.current.languageCode
return (languageCode ?? "en").hasPrefix("en")
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened a ticket to fix and enable it for more locales https://linear.app/a8c/issue/CMM-762/excerpts-are-created-in-the-system-language-not-the-content-language. It needs more work and testing to ensure it performs as expected.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to make it an experimental feature so that users can enable it if they want?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good idea. Done:

Screenshot 2025-10-01 at 7 04 45 AM

}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ import SwiftUI
class ExperimentalFeaturesDataProvider: ExperimentalFeaturesViewModel.DataProvider {

let flags: [OverridableFlag] = [
FeatureFlag.intelligence,
FeatureFlag.newStats,
FeatureFlag.allowApplicationPasswords,
RemoteFeatureFlag.newGutenberg,
FeatureFlag.newGutenbergThemeStyles,
FeatureFlag.newStats,
FeatureFlag.newGutenbergThemeStyles
]

private let flagStore = FeatureFlagOverrideStore()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ struct PostSettingsFormContentView: View {
@ObservedObject var viewModel: PostSettingsViewModel

var body: some View {
if viewModel.context == .publishing {
publishingOptionsSection
}
featuredImageSection
if viewModel.isPost {
organizationSection
Expand All @@ -149,12 +152,11 @@ struct PostSettingsFormContentView: View {
@ViewBuilder
private var publishingOptionsSection: some View {
Section {
BlogListSiteView(site: .init(blog: viewModel.post.blog))
publishDateRow
visibilityRow
} header: {
BlogListSiteView(site: .init(blog: viewModel.post.blog))
.padding(.bottom, 8)
.foregroundStyle(.primary)
SectionHeader(Strings.readyToPublish)
}
}

Expand Down Expand Up @@ -626,4 +628,10 @@ private enum Strings {
value: "Social Sharing",
comment: "Label for the preview button in Post Settings"
)

static let readyToPublish = NSLocalizedString(
"prepublishing.publishingSectionTitle",
value: "Ready to Publish?",
comment: "The title of the top section that shows the site your are publishing to. Default is 'Ready to Publish?'"
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ extension PrepublishingViewController {
// - warning: Has to be UIKit because some of the `PostSettingsView` rows rely on it.
let navigationVC = UINavigationController(rootViewController: publishVC)
navigationVC.sheetPresentationController?.detents = [
.custom(identifier: .medium, resolver: { context in 460 }),
.custom(identifier: .medium, resolver: { context in 526 }),
.large()
]
presentingViewController.present(navigationVC, animated: true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,20 @@ struct PublishPostView: View {

var body: some View {
Form {
Section {
if let state = uploadsViewModel.uploadingSnackbarState {
NavigationLink {
PostMediaUploadsView(viewModel: uploadsViewModel)
} label: {
PostMediaUploadsSnackbarView(state: state)
}
if let state = uploadsViewModel.uploadingSnackbarState {
NavigationLink {
PostMediaUploadsView(viewModel: uploadsViewModel)
} label: {
PostMediaUploadsSnackbarView(state: state)
}
BlogListSiteView(site: .init(blog: viewModel.post.blog))
} header: {
SectionHeader(Strings.readyToPublish)
}
PostSettingsFormContentView(viewModel: viewModel)
}
.environment(\.defaultMinListHeaderHeight, 0) // Reduces top inset a bit
.navigationBarTitleDisplayMode(.inline)
.onAppear {
viewModel.onAppear()
}
.toolbar {
ToolbarItem(placement: .topBarLeading) {
buttonCancel
Expand All @@ -91,7 +89,6 @@ struct PublishPostView: View {
}
}
ToolbarItemGroup(placement: .topBarTrailing) {
buttonSchedule
buttonPublish
}
}
Expand Down Expand Up @@ -126,15 +123,6 @@ struct PublishPostView: View {
}
}

@ViewBuilder
private var buttonSchedule: some View {
NavigationLink {
PostSettingsPublishDatePicker(viewModel: viewModel)
} label: {
Image(systemName: "calendar")
}
}

@ViewBuilder
private var buttonPublish: some View {
if viewModel.isSaving {
Expand All @@ -150,6 +138,7 @@ struct PublishPostView: View {
.buttonBorderShape(.capsule)
.tint(isDisabled ? Color(.opaqueSeparator) : AppColor.primary)
.disabled(isDisabled)
.accessibilityIdentifier("publish")
}
}
}
Expand Down Expand Up @@ -206,10 +195,4 @@ enum PrepublishingSheetStrings {
value: "Save Changes",
comment: "Button to confirm discarding changes"
)

static let readyToPublish = NSLocalizedString(
"prepublishing.publishingSectionTitle",
value: "Ready to Publish?",
comment: "The title of the top section that shows the site your are publishing to. Default is 'Ready to Publish?'"
)
}