Skip to content

Commit 3cf6c04

Browse files
authored
Add FXIOS-14256 [Toolbar] Update Blur Views - Feature Flag (#31055)
Add feature flag for toolbar translucency refactor
1 parent 35fd932 commit 3cf6c04

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

firefox-ios/Client/FeatureFlags/NimbusFlaggableFeature.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ enum NimbusFeatureFlagID: String, CaseIterable {
6363
case toolbarRefactor
6464
case toolbarSwipingTabs
6565
case toolbarTranslucency
66+
case toolbarTranslucencyRefactor
6667
case toolbarMinimalAddressBar
6768
case toolbarMiddleButtonCustomization
6869
case tosFeature
@@ -196,6 +197,7 @@ struct NimbusFlaggableFeature: HasNimbusSearchBar {
196197
.toolbarRefactor,
197198
.toolbarSwipingTabs,
198199
.toolbarTranslucency,
200+
.toolbarTranslucencyRefactor,
199201
.toolbarMinimalAddressBar,
200202
.toolbarMiddleButtonCustomization,
201203
.tosFeature,

firefox-ios/Client/Nimbus/NimbusFeatureFlagLayer.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ final class NimbusFeatureFlagLayer: Sendable {
166166
case .toolbarTranslucency:
167167
return checkToolbarTranslucencyFeature(from: nimbus)
168168

169+
case .toolbarTranslucencyRefactor:
170+
return checkToolbarTranslucencyRefactorFeature(from: nimbus)
171+
169172
case .toolbarMinimalAddressBar:
170173
return checkToolbarMinimalAddressBarFeature(from: nimbus)
171174

@@ -322,6 +325,11 @@ final class NimbusFeatureFlagLayer: Sendable {
322325
return config.translucency
323326
}
324327

328+
private func checkToolbarTranslucencyRefactorFeature(from nimbus: FxNimbus) -> Bool {
329+
let config = nimbus.features.toolbarRefactorFeature.value()
330+
return config.translucencyRefactor
331+
}
332+
325333
private func checkToolbarMinimalAddressBarFeature(from nimbus: FxNimbus) -> Bool {
326334
let config = nimbus.features.toolbarRefactorFeature.value()
327335
return config.minimalAddressBar

firefox-ios/nimbus-features/toolbarRefactorFeature.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ features:
3939
Enables translucency for toolbars.
4040
type: Boolean
4141
default: true
42+
translucency-refactor:
43+
description: >
44+
Enables translucency refactor for toolbars.
45+
type: Boolean
46+
default: false
4247
minimal_address_bar:
4348
description: >
4449
Enables minimal address bar mode on scroll to ensure the url is always visible.
@@ -65,6 +70,7 @@ features:
6570
toolbar_update_hint: false
6671
swiping_tabs: true
6772
translucency: true
73+
translucency-refactor: false
6874
minimal_address_bar: true
6975
middle_button_customization: true
7076
layout: version1
@@ -77,6 +83,7 @@ features:
7783
toolbar_update_hint: false
7884
swiping_tabs: true
7985
translucency: true
86+
translucency-refactor: false
8087
minimal_address_bar: true
8188
middle_button_customization: true
8289
layout: version1

0 commit comments

Comments
 (0)