Skip to content

Commit 3f56b5c

Browse files
authored
Remove FXIOS-12223 [Toolbar] Remove baseline version (#29592)
* Remove baseline version * Optimize code
1 parent d1be229 commit 3f56b5c

File tree

5 files changed

+8
-31
lines changed

5 files changed

+8
-31
lines changed

firefox-ios/Client/Frontend/Browser/Toolbars/ToolbarLayoutStyle.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ enum ToolbarLayoutStyle: String {
1313
static func style(from type: ToolbarLayoutType?) -> ToolbarLayoutStyle {
1414
guard let type else { return .version1 }
1515
switch type {
16-
case .version1, .baseline: return .version1
16+
case .version1: return .version1
1717
case .version2: return .version2
1818
}
1919
}

firefox-ios/Client/Frontend/Onboarding/Models/OnboardingKitCardInfoModel.swift

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -54,18 +54,7 @@ struct OnboardingKitCardInfoModel: OnboardingKit.OnboardingCardInfoModelProtocol
5454
var defaultSelectedButton: OnboardingKit.OnboardingMultipleChoiceButtonModel<OnboardingMultipleChoiceAction>? {
5555
guard !multipleChoiceButtons.isEmpty else { return nil }
5656

57-
let toolbarLayout = FxNimbus.shared.features
58-
.toolbarRefactorFeature
59-
.value()
60-
.layout
61-
62-
let isVersionedLayout = [.version1, .version2, .baseline].contains(toolbarLayout)
63-
64-
if isVersionedLayout {
65-
return findHighestPriorityButton() ?? multipleChoiceButtons.first
66-
}
67-
68-
return multipleChoiceButtons.first
57+
return findHighestPriorityButton() ?? multipleChoiceButtons.first
6958
}
7059

7160
private func findHighestPriorityButton()

firefox-ios/Client/Frontend/Onboarding/Views/OnboardingMultipleChoiceCardViewController.swift

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -252,21 +252,12 @@ class OnboardingMultipleChoiceCardViewController: OnboardingCardViewController {
252252
private func isSelectedButton<T: OnboardingCardInfoModelProtocol>(
253253
buttonModel: OnboardingMultipleChoiceButtonModel,
254254
viewModel: T) -> Bool {
255-
let toolbarLayout = FxNimbus.shared.features
256-
.toolbarRefactorFeature
257-
.value()
258-
.layout
259-
260-
switch toolbarLayout {
261-
case .version1, .version2, .baseline:
262-
let isToolbarBottomAction = buttonModel.action == .toolbarBottom
263-
let isToolbarTopAction = buttonModel.action == .toolbarTop
264-
if isToolbarBottomAction {
265-
return true
266-
} else {
267-
return !isToolbarTopAction && buttonModel == viewModel.multipleChoiceButtons.first
268-
}
269-
default: return buttonModel == viewModel.multipleChoiceButtons.first
255+
let isToolbarBottomAction = buttonModel.action == .toolbarBottom
256+
let isToolbarTopAction = buttonModel.action == .toolbarTop
257+
if isToolbarBottomAction {
258+
return true
259+
} else {
260+
return !isToolbarTopAction && buttonModel == viewModel.multipleChoiceButtons.first
270261
}
271262
}
272263

firefox-ios/Client/TabManagement/TabWebViewPreviewAppearanceConfiguration.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import Common
77

88
struct TabWebViewPreviewAppearanceConfiguration {
99
private struct UX {
10-
static let baselineAddressBarCornerRadius: CGFloat = 8
1110
static let versionAddressBarCornerRadius: CGFloat = 12
1211
}
1312
let containerStackViewBackgroundColor: UIColor

firefox-ios/nimbus-features/toolbarRefactorFeature.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ enums:
8585
ToolbarLayoutType:
8686
description: The type of toolbar layout.
8787
variants:
88-
baseline:
89-
description: The default layout of the toolbars.
9088
version1:
9189
description: Shows the add new tab, menu and tabs button in the navigation toolbar. The share button is displayed in the address toolbar.
9290
version2:

0 commit comments

Comments
 (0)