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
@@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "onboardingSyncWithIconsBrandRefresh.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"images" : [
{
"filename" : "onboardingTrackersBrandRefresh.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"preserves-vector-representation" : true
}
}
Binary file not shown.
2 changes: 2 additions & 0 deletions firefox-ios/Client/Application/ImageIdentifiers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ struct ImageIdentifiers {
public static let trackers = "onboardingTrackers"
public static let syncWithIconsJapan = "onboardingSyncWithIconsJapan"
public static let trackersJapan = "onboardingTrackersJapan"
public static let syncWithIconsBrandRefresh = "onboardingSyncWithIconsBrandRefresh"
public static let trackersBrandRefresh = "onboardingTrackersBrandRefresh"
}

public struct MultipleChoiceButtonImages {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ enum NimbusFeatureFlagID: String, CaseIterable {
case homepageScrim
case homepageDiscoverMoreButton
case homepageDiscoverMoreExperience
case shouldUseBrandRefreshConfiguration
case shouldUseJapanConfiguration
case menuDefaultBrowserBanner
case menuRefactor
Expand Down Expand Up @@ -167,6 +168,7 @@ struct NimbusFlaggableFeature: HasNimbusSearchBar {
.homepageScrim,
.homepageDiscoverMoreButton,
.homepageDiscoverMoreExperience,
.shouldUseBrandRefreshConfiguration,
.shouldUseJapanConfiguration,
.menuDefaultBrowserBanner,
.menuRefactor,
Expand Down
16 changes: 16 additions & 0 deletions firefox-ios/Client/IntroScreenManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,29 @@ struct IntroScreenManager: FeatureFlaggable, IntroScreenManagerProtocol {
featureFlags.isFeatureEnabled(.modernOnboardingUI, checking: .buildAndUser)
}

var shouldUseBrandRefreshConfiguration: Bool {
featureFlags.isFeatureEnabled(.shouldUseBrandRefreshConfiguration, checking: .buildAndUser)
}

var shouldUseJapanConfiguration: Bool {
featureFlags.isFeatureEnabled(.shouldUseJapanConfiguration, checking: .buildAndUser)
}

/// Determines the onboarding variant based on feature flags.
///
/// Priority order (if multiple flags are enabled):
/// 1. Japan configuration (highest priority)
/// 2. Brand refresh configuration
/// 3. Modern onboarding
/// 4. Legacy onboarding (lowest priority)
///
/// Note: If both `shouldUseJapanConfiguration` and `shouldUseBrandRefreshConfiguration`
/// are enabled, Japan configuration takes precedence.
var onboardingVariant: OnboardingVariant {
if isModernOnboardingEnabled && shouldUseJapanConfiguration {
return .japan
} else if isModernOnboardingEnabled && shouldUseBrandRefreshConfiguration {
return .brandRefresh
} else if isModernOnboardingEnabled {
return .modern
} else {
Expand Down
7 changes: 7 additions & 0 deletions firefox-ios/Client/Nimbus/NimbusFeatureFlagLayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ final class NimbusFeatureFlagLayer: Sendable {
case .homepageDiscoverMoreButton, .homepageDiscoverMoreExperience:
return checkHomepageDiscoverMoreFeature(for: featureID, from: nimbus)

case .shouldUseBrandRefreshConfiguration:
return checkShouldUseBrandRefreshConfigurationFeature(from: nimbus)

case .shouldUseJapanConfiguration:
return checkShouldUseJapanConfigurationFeature(from: nimbus)

Expand Down Expand Up @@ -525,6 +528,10 @@ final class NimbusFeatureFlagLayer: Sendable {
return nimbus.features.webEngineIntegrationRefactor.value().enabled
}

private func checkShouldUseBrandRefreshConfigurationFeature(from nimbus: FxNimbus) -> Bool {
return nimbus.features.onboardingFrameworkFeature.value().shouldUseBrandRefreshConfiguration
}

private func checkShouldUseJapanConfigurationFeature(from nimbus: FxNimbus) -> Bool {
return nimbus.features.onboardingFrameworkFeature.value().shouldUseJapanConfiguration
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ extension NimbusOnboardingFeatureLayerProtocol {
case .trackers: return ImageIdentifiers.Onboarding.HeaderImages.trackers
case .syncWithIconsJapan: return ImageIdentifiers.Onboarding.HeaderImages.syncWithIconsJapan
case .trackersJapan: return ImageIdentifiers.Onboarding.HeaderImages.trackersJapan
case .syncWithIconsBrandRefresh: return ImageIdentifiers.Onboarding.HeaderImages.syncWithIconsBrandRefresh
case .trackersBrandRefresh: return ImageIdentifiers.Onboarding.HeaderImages.trackersBrandRefresh
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ class NimbusOnboardingKitFeatureLayer: NimbusOnboardingFeatureLayerProtocol {
body: String(
format: cardData.body,
AppName.shortName.rawValue,
AppName.shortName.rawValue),
MozillaName.shortName.rawValue),
link: getOnboardingLink(from: cardData.link),
buttons: getOnboardingCardButtons(from: cardData.buttons),
multipleChoiceButtons: getOnboardingMultipleChoiceButtons_(from: cardData.multipleChoiceButtons),
Expand Down
2 changes: 1 addition & 1 deletion firefox-ios/Client/TermsOfServiceManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ struct TermsOfServiceManager: FeatureFlaggable, Sendable {
buttons: OnboardingButtons(
primary: OnboardingButtonInfoModel(
title: String.Onboarding.Modern.BrandRefresh.TermsOfUse.AgreementButtonTitleV2,
action: OnboardingActions.syncSignIn
action: OnboardingActions.endOnboarding
)
),
multipleChoiceButtons: [],
Expand Down
115 changes: 108 additions & 7 deletions firefox-ios/nimbus-features/onboardingFrameworkFeature.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,11 @@ features:
Toggle between standard (false) and Japan-specific (true) assets and content.
type: Boolean
default: false
should-use-brand-refresh-configuration:
description: >
Toggle between standard (false) and brand refresh (true) onboarding content.
type: Boolean
default: false
conditions:
description: >
A collection of out the box conditional expressions to be
Expand All @@ -40,6 +45,7 @@ features:
value:
enable-modern-ui: false
should-use-japan-configuration: false
should-use-brand-refresh-configuration: false
conditions:
ALWAYS: "true"
NEVER: "false"
Expand Down Expand Up @@ -399,6 +405,93 @@ features:
prerequisites:
- ALWAYS
uiVariant: japan
welcome-brand-refresh:
card-type: basic
order: 10
title: Onboarding/Onboarding.Modern.BrandRefresh.Welcome.Title.v148.v2
body: Onboarding/Onboarding.Modern.BrandRefresh.Welcome.Description.v148
image: trackers-brand-refresh
buttons:
primary:
title: Onboarding/Onboarding.Modern.BrandRefresh.Welcome.ActionTreatmentA.v148
action: open-instructions-popup
secondary:
title: Onboarding/Onboarding.Modern.BrandRefresh.Welcome.Skip.v148
action: forward-one-card
instructions-popup:
title: Onboarding/DefaultBrowserPopup.Title.v114
button-title: Onboarding/DefaultBrowserPopup.ButtonTitle.v114
button-action: open-ios-fx-settings
instructions:
- Onboarding/DefaultBrowserPopup.FirstLabel.v114
- Onboarding/DefaultBrowserPopup.SecondLabel.v114
- Onboarding/DefaultBrowserPopup.ThirdLabel.v114
onboarding-type: fresh-install
prerequisites:
- ALWAYS
uiVariant: brandRefresh
customization-toolbar-brand-refresh:
card-type: multiple-choice
order: 20
title: Onboarding/Onboarding.Modern.BrandRefresh.Customization.Toolbar.Title.v148
body: Onboarding/Onboarding.Modern.BrandRefresh.Customization.Toolbar.Description.v148
image: toolbar
buttons:
primary:
title: Onboarding/Onboarding.Modern.BrandRefresh.Customization.Toolbar.Continue.Action.v148
action: forward-one-card
multiple-choice-buttons:
- title: Onboarding/Onboarding.Modern.Customization.Toolbar.Bottom.Action.v140
image: toolbar-bottom-japan
action: toolbar-bottom
- title: Onboarding/Onboarding.Modern.Customization.Toolbar.Top.Action.v140
image: toolbar-top-japan
action: toolbar-top
onboarding-type: fresh-install
prerequisites:
- ALWAYS
uiVariant: brandRefresh
customization-theme-brand-refresh:
card-type: multiple-choice
order: 25
title: Onboarding/Onboarding.Modern.BrandRefresh.Customization.Theme.Title.v148
body: Onboarding/Onboarding.Modern.BrandRefresh.Customization.Theme.Description.v148
image: themeing
buttons:
primary:
title: Onboarding/Onboarding.Modern.BrandRefresh.Customization.Theme.Continue.Action.v148
action: forward-one-card
multiple-choice-buttons:
- title: Onboarding/Onboarding.Modern.BrandRefresh.Customization.Theme.Automatic.v148
image: theme-system-japan
action: theme-system-default
- title: Onboarding/Onboarding.Modern.BrandRefresh.Customization.Theme.Light.v148
image: theme-light-japan
action: theme-light
- title: Onboarding/Onboarding.Modern.BrandRefresh.Customization.Theme.Dark.v148
image: theme-dark-japan
action: theme-dark
onboarding-type: fresh-install
prerequisites:
- ALWAYS
uiVariant: brandRefresh
sign-to-sync-brand-refresh:
card-type: basic
order: 30
title: Onboarding/Onboarding.Modern.BrandRefresh.Sync.Title.v148
body: Onboarding/Onboarding.Modern.BrandRefresh.Sync.Description.v148
image: sync-with-icons-brand-refresh
buttons:
primary:
title: Onboarding/Onboarding.Modern.BrandRefresh.Sync.SignIn.Action.v148
action: sync-sign-in
secondary:
title: Onboarding/Onboarding.Modern.BrandRefresh.Sync.Skip.Action.v148
action: forward-one-card
onboarding-type: fresh-install
prerequisites:
- ALWAYS
uiVariant: brandRefresh
dismissable: true

objects:
Expand Down Expand Up @@ -601,6 +694,8 @@ enums:
description: Use the new (modern) onboarding UI.
japan:
description: Use the Japan-specific onboarding UI with localized assets.
brandRefresh:
description: Use the brand refresh onboarding UI with v148 strings.
OnboardingActions:
description: >
The identifiers for the different actions available for cards in onboarding
Expand Down Expand Up @@ -699,10 +794,16 @@ enums:
Corresponding to the trackers image
sync-with-icons-japan:
description: >
Corresponding to the sync-with-icons image for Japan
Corresponding to the sync-with-icons image for Japan variant
trackers-japan:
description: >
Corresponding to the trackers image for Japan
Corresponding to the trackers image for Japan variant (contains Japanese text)
trackers-brand-refresh:
description: >
Corresponding to the trackers image for Brand Refresh variant (does not contain Japanese text, different from Japan variant)
sync-with-icons-brand-refresh:
description: >
Corresponding to the sync-with-icons image for Brand Refresh variant (different from Japan variant)
OnboardingCardType:
description: >
The identifiers for the different types of onboarding cards.
Expand Down Expand Up @@ -765,16 +866,16 @@ enums:
Corresponding to the toolbar on the bottom
theme-system-japan:
description: >
Corresponding to the system theme for Japan
Corresponding to the system theme image for Japan variant. Also used by Brand Refresh variant as the images are identical.
theme-dark-japan:
description: >
Corresponding to the dark theme for Japan
Corresponding to the dark theme image for Japan variant. Also used by Brand Refresh variant as the images are identical.
theme-light-japan:
description: >
Corresponding to the light theme for Japan
Corresponding to the light theme image for Japan variant. Also used by Brand Refresh variant as the images are identical.
toolbar-top-japan:
description: >
Corresponding to the toolbar on top for Japan
Corresponding to the toolbar on top image for Japan variant. Also used by Brand Refresh variant as the images are identical.
toolbar-bottom-japan:
description: >
Corresponding to the toolbar on the bottom for Japan
Corresponding to the toolbar on the bottom image for Japan variant. Also used by Brand Refresh variant as the images are identical.