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

Remove Sidebar FF and WPSplitViewController with related code #23663

Merged
merged 8 commits into from
Oct 8, 2024
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 @@ -55,4 +55,8 @@ extension UIViewController {
public static var topViewController: UIViewController? {
UIApplication.shared.delegate?.window??.topmostPresentedViewController
}

@objc public var splitViewControllerIsHorizontallyCompact: Bool {
splitViewController?.hasHorizontallyCompactView() ?? hasHorizontallyCompactView()
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,11 @@ extension MySitesCoordinator: RootViewPresenter {
// MARK: Me

var meViewController: MeViewController? {
/// On iPhone, the My Sites root view controller is a navigation controller, and Me is pushed onto the stack
if let navigationController = rootViewController as? UINavigationController,
let controller = navigationController.viewControllers.compactMap({ $0 as? MeViewController }).first {
return controller
}

/// On iPad, the My Sites root view controller is a split view controller, and Me is shown in the detail view controller
if let splitViewController = rootViewController as? WPSplitViewController,
let detailNavigationController = splitViewController.viewControllers.last as? UINavigationController,
let controller = detailNavigationController.viewControllers.compactMap({ $0 as? MeViewController }).first {
return controller
}

return nil
}

Expand Down
2 changes: 1 addition & 1 deletion WordPress/Classes/System/RootViewCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class RootViewCoordinator {
}

private func createPresenter(_ appType: AppUIType) -> RootViewPresenter {
if UIDevice.isPad() && Feature.enabled(.sidebar) {
if UIDevice.isPad() {
return SplitViewRootPresenter()
}
switch appType {
Expand Down
4 changes: 0 additions & 4 deletions WordPress/Classes/Utility/BuildInformation/FeatureFlag.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ enum FeatureFlag: Int, CaseIterable {
case voiceToContent
case authenticateUsingApplicationPassword
case tipKit
case sidebar
case newGutenberg
case newGutenbergThemeStyles
case newGutenbergPlugins
Expand Down Expand Up @@ -48,8 +47,6 @@ enum FeatureFlag: Int, CaseIterable {
return false
case .tipKit:
return true
case .sidebar:
return true
case .newGutenberg:
return false
case .newGutenbergThemeStyles:
Expand Down Expand Up @@ -91,7 +88,6 @@ extension FeatureFlag {
case .voiceToContent: "Voice to Content"
case .authenticateUsingApplicationPassword: "Application Passwords for self-hosted sites"
case .tipKit: "TipKit"
case .sidebar: "Sidebar"
case .newGutenberg: "Experimental Block Editor"
case .newGutenbergThemeStyles: "Experimental Block Editor Styles"
case .newGutenbergPlugins: "Experimental Block Editor Plugins"
Expand Down
Loading