Bug 1914047 - Newtab layout variant B prefs r=home-newtab-reviewers,maxx
Differential Revision: https://phabricator.services.mozilla.com/D219922
This commit is contained in:
@@ -1769,6 +1769,7 @@ pref("browser.newtabpage.activity-stream.newNewtabExperience.colors", "#0090ED,#
|
||||
|
||||
// Default layout experimentation
|
||||
pref("browser.newtabpage.activity-stream.newtabLayouts.variant-a", false);
|
||||
pref("browser.newtabpage.activity-stream.newtabLayouts.variant-b", false);
|
||||
|
||||
// Activity Stream prefs that control to which page to redirect
|
||||
#ifndef RELEASE_OR_BETA
|
||||
|
||||
@@ -436,6 +436,7 @@ export class BaseContent extends React.PureComponent {
|
||||
const prefs = props.Prefs.values;
|
||||
|
||||
const layoutsVariantAEnabled = prefs["newtabLayouts.variant-a"];
|
||||
const layoutsVariantBEnabled = prefs["newtabLayouts.variant-b"];
|
||||
|
||||
const activeWallpaper =
|
||||
prefs[`newtabWallpapers.wallpaper-${this.state.colorMode}`];
|
||||
@@ -493,7 +494,8 @@ export class BaseContent extends React.PureComponent {
|
||||
const featureClassName = [
|
||||
weatherEnabled && mayHaveWeather && "has-weather", // Show is weather is enabled/visible
|
||||
prefs.showSearch ? "has-search" : "no-search",
|
||||
layoutsVariantAEnabled ? "layout-variant-a" : "", // Layout experiment variant
|
||||
layoutsVariantAEnabled ? "layout-variant-a" : "", // Layout experiment variant A
|
||||
layoutsVariantBEnabled ? "layout-variant-b" : "", // Layout experiment variant B
|
||||
]
|
||||
.filter(v => v)
|
||||
.join(" ");
|
||||
|
||||
@@ -11389,6 +11389,7 @@ class BaseContent extends (external_React_default()).PureComponent {
|
||||
} = App;
|
||||
const prefs = props.Prefs.values;
|
||||
const layoutsVariantAEnabled = prefs["newtabLayouts.variant-a"];
|
||||
const layoutsVariantBEnabled = prefs["newtabLayouts.variant-b"];
|
||||
const activeWallpaper = prefs[`newtabWallpapers.wallpaper-${this.state.colorMode}`];
|
||||
const wallpapersEnabled = prefs["newtabWallpapers.enabled"];
|
||||
const wallpapersV2Enabled = prefs["newtabWallpapers.v2.enabled"];
|
||||
@@ -11430,7 +11431,9 @@ class BaseContent extends (external_React_default()).PureComponent {
|
||||
const hasThumbsUpDown = prefs["discoverystream.thumbsUpDown.enabled"];
|
||||
const featureClassName = [weatherEnabled && mayHaveWeather && "has-weather",
|
||||
// Show is weather is enabled/visible
|
||||
prefs.showSearch ? "has-search" : "no-search", layoutsVariantAEnabled ? "layout-variant-a" : "" // Layout experiment variant
|
||||
prefs.showSearch ? "has-search" : "no-search", layoutsVariantAEnabled ? "layout-variant-a" : "",
|
||||
// Layout experiment variant A
|
||||
layoutsVariantBEnabled ? "layout-variant-b" : "" // Layout experiment variant B
|
||||
].filter(v => v).join(" ");
|
||||
const outerClassName = ["outer-wrapper", isDiscoveryStream && pocketEnabled && "ds-outer-wrapper-search-alignment", isDiscoveryStream && "ds-outer-wrapper-breakpoint-override", prefs.showSearch && this.state.fixedSearch && !noSectionsEnabled && "fixed-search", prefs.showSearch && noSectionsEnabled && "only-search", prefs["feeds.topsites"] && !pocketEnabled && !prefs.showSearch && "only-topsites", noSectionsEnabled && "no-sections", prefs["logowordmark.alwaysVisible"] && "visible-logo", hasThumbsUpDownLayout && hasThumbsUpDown && "thumbs-ui-compact"].filter(v => v).join(" ");
|
||||
if (wallpapersEnabled || wallpapersV2Enabled) {
|
||||
|
||||
@@ -356,6 +356,13 @@ export const PREFS_CONFIG = new Map([
|
||||
value: false,
|
||||
},
|
||||
],
|
||||
[
|
||||
"newtabLayouts.variant-b",
|
||||
{
|
||||
title: "Boolean flag to turn layout variant B on and off",
|
||||
value: false,
|
||||
},
|
||||
],
|
||||
[
|
||||
"newtabWallpapers.highlightEnabled",
|
||||
{
|
||||
|
||||
@@ -734,7 +734,7 @@ newtab:
|
||||
|
||||
newtabSpocsCache:
|
||||
description: The about:newtab sponsored content cache.
|
||||
owner: sdowne@getpocket.com
|
||||
owner: sdowne@mozilla.com
|
||||
hasExposure: false
|
||||
variables:
|
||||
spocsCacheTimeout:
|
||||
@@ -755,7 +755,7 @@ newtabSpocsCache:
|
||||
newtabLayoutExperiment:
|
||||
description: >-
|
||||
Change the default layout of new tab by adjusting sizes and spacing of elements.
|
||||
owner: achurchwell@mozilla.com
|
||||
owner: achurchwell@mozilla.com, sdowne@mozilla.com
|
||||
hasExposure: false
|
||||
variables:
|
||||
variantA:
|
||||
@@ -765,6 +765,13 @@ newtabLayoutExperiment:
|
||||
pref: browser.newtabpage.activity-stream.newtabLayouts.variant-a
|
||||
description: >-
|
||||
Variant A in layouts experiment.
|
||||
variantB:
|
||||
type: boolean
|
||||
setPref:
|
||||
branch: user
|
||||
pref: browser.newtabpage.activity-stream.newtabLayouts.variant-b
|
||||
description: >-
|
||||
Variant B in layouts experiment.
|
||||
|
||||
newtabTopicSelection:
|
||||
description: the about:newtab topic selection experience.
|
||||
@@ -807,7 +814,7 @@ newtabTopicSelection:
|
||||
|
||||
pocketNewtab:
|
||||
description: The Pocket section in newtab
|
||||
owner: sdowne@getpocket.com
|
||||
owner: sdowne@mozilla.com
|
||||
hasExposure: false
|
||||
isEarlyStartup: true
|
||||
variables:
|
||||
@@ -1169,7 +1176,7 @@ pocketNewtab:
|
||||
|
||||
saveToPocket:
|
||||
description: The save to Pocket feature
|
||||
owner: sdowne@getpocket.com
|
||||
owner: sdowne@mozilla.com
|
||||
hasExposure: false
|
||||
variables:
|
||||
emailButton:
|
||||
|
||||
Reference in New Issue
Block a user