Skip to content

Commit

Permalink
For mozilla-mobile#26414 - Have the Pocket spocs feature as part of t…
Browse files Browse the repository at this point in the history
…he homescreen sections experiments
  • Loading branch information
Mugurell committed Aug 12, 2022
1 parent bbb602a commit 087e40d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 21 deletions.
8 changes: 0 additions & 8 deletions .experimenter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,6 @@ onboarding:
sections-enabled:
type: json
description: This property provides a lookup table of whether or not the given section should be enabled.
pocket-sponsored-stories:
description: A feature showing sponsored stories in between the other Pocket recommended stories on homescreen.
hasExposure: true
exposureDescription: ""
variables:
enabled:
type: boolean
description: "If true, the Pocket stories shown on homescreen should contain sponsored stories also."
search-term-groups:
description: A feature allowing the grouping of URLs around the search term that it came from.
hasExposure: true
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/org/mozilla/fenix/utils/Settings.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,7 @@ class Settings(private val appContext: Context) : PreferencesHolder {
*/
val showPocketSponsoredStories by lazyFeatureFlagPreference(
key = appContext.getPreferenceKey(R.string.pref_key_pocket_sponsored_stories),
default = { FxNimbus.features.pocketSponsoredStories.value(appContext).enabled },
default = { homescreenSections[HomeScreenSection.POCKET_SPONSORED_STORIES] == true },
featureFlag = FeatureFlags.isPocketSponsoredStoriesFeatureEnabled(appContext)
)

Expand Down
21 changes: 9 additions & 12 deletions nimbus.fml.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ features:
"recently-saved": true,
"recent-explorations": true,
"pocket": true,
"pocket-sponsored-stories": false,
"contile-top-sites": false,
}
defaults:
Expand All @@ -33,6 +34,12 @@ features:
"contile-top-sites": false,
}
}
- channel: developer
value: {
"sections-enabled": {
"pocket-sponsored-stories": true,
}
}
onboarding:
description: The homescreen that the user goes to when they press home or new tab.
variables:
Expand Down Expand Up @@ -201,18 +208,6 @@ features:
value:
enabled: false

pocket-sponsored-stories:
description: A feature showing sponsored stories in between the other Pocket recommended stories on homescreen.
variables:
enabled:
description: If true, the Pocket stories shown on homescreen should contain sponsored stories also.
type: Boolean
default: false
defaults:
- channel: developer
value:
enabled: true

engine-settings:
description: Contains a set of settings for controlling the web engine configurations.
variables:
Expand Down Expand Up @@ -311,6 +306,8 @@ types:
description: The tab groups
pocket:
description: The pocket section. This should only be available in the US.
pocket-sponsored-stories:
description: Subsection of the Pocket homescreen section which shows sponsored stories.
contile-top-sites:
description: The sponsored shortcuts in the homescreen.
MessageSurfaceId:
Expand Down

0 comments on commit 087e40d

Please sign in to comment.