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
|
// Default layout experimentation
|
||||||
pref("browser.newtabpage.activity-stream.newtabLayouts.variant-a", false);
|
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
|
// Activity Stream prefs that control to which page to redirect
|
||||||
#ifndef RELEASE_OR_BETA
|
#ifndef RELEASE_OR_BETA
|
||||||
|
|||||||
@@ -436,6 +436,7 @@ export class BaseContent extends React.PureComponent {
|
|||||||
const prefs = props.Prefs.values;
|
const prefs = props.Prefs.values;
|
||||||
|
|
||||||
const layoutsVariantAEnabled = prefs["newtabLayouts.variant-a"];
|
const layoutsVariantAEnabled = prefs["newtabLayouts.variant-a"];
|
||||||
|
const layoutsVariantBEnabled = prefs["newtabLayouts.variant-b"];
|
||||||
|
|
||||||
const activeWallpaper =
|
const activeWallpaper =
|
||||||
prefs[`newtabWallpapers.wallpaper-${this.state.colorMode}`];
|
prefs[`newtabWallpapers.wallpaper-${this.state.colorMode}`];
|
||||||
@@ -493,7 +494,8 @@ export class BaseContent extends React.PureComponent {
|
|||||||
const featureClassName = [
|
const featureClassName = [
|
||||||
weatherEnabled && mayHaveWeather && "has-weather", // Show is weather is enabled/visible
|
weatherEnabled && mayHaveWeather && "has-weather", // Show is weather is enabled/visible
|
||||||
prefs.showSearch ? "has-search" : "no-search",
|
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)
|
.filter(v => v)
|
||||||
.join(" ");
|
.join(" ");
|
||||||
|
|||||||
@@ -11389,6 +11389,7 @@ class BaseContent extends (external_React_default()).PureComponent {
|
|||||||
} = App;
|
} = App;
|
||||||
const prefs = props.Prefs.values;
|
const prefs = props.Prefs.values;
|
||||||
const layoutsVariantAEnabled = prefs["newtabLayouts.variant-a"];
|
const layoutsVariantAEnabled = prefs["newtabLayouts.variant-a"];
|
||||||
|
const layoutsVariantBEnabled = prefs["newtabLayouts.variant-b"];
|
||||||
const activeWallpaper = prefs[`newtabWallpapers.wallpaper-${this.state.colorMode}`];
|
const activeWallpaper = prefs[`newtabWallpapers.wallpaper-${this.state.colorMode}`];
|
||||||
const wallpapersEnabled = prefs["newtabWallpapers.enabled"];
|
const wallpapersEnabled = prefs["newtabWallpapers.enabled"];
|
||||||
const wallpapersV2Enabled = prefs["newtabWallpapers.v2.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 hasThumbsUpDown = prefs["discoverystream.thumbsUpDown.enabled"];
|
||||||
const featureClassName = [weatherEnabled && mayHaveWeather && "has-weather",
|
const featureClassName = [weatherEnabled && mayHaveWeather && "has-weather",
|
||||||
// Show is weather is enabled/visible
|
// 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(" ");
|
].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(" ");
|
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) {
|
if (wallpapersEnabled || wallpapersV2Enabled) {
|
||||||
|
|||||||
@@ -356,6 +356,13 @@ export const PREFS_CONFIG = new Map([
|
|||||||
value: false,
|
value: false,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
"newtabLayouts.variant-b",
|
||||||
|
{
|
||||||
|
title: "Boolean flag to turn layout variant B on and off",
|
||||||
|
value: false,
|
||||||
|
},
|
||||||
|
],
|
||||||
[
|
[
|
||||||
"newtabWallpapers.highlightEnabled",
|
"newtabWallpapers.highlightEnabled",
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -734,7 +734,7 @@ newtab:
|
|||||||
|
|
||||||
newtabSpocsCache:
|
newtabSpocsCache:
|
||||||
description: The about:newtab sponsored content cache.
|
description: The about:newtab sponsored content cache.
|
||||||
owner: sdowne@getpocket.com
|
owner: sdowne@mozilla.com
|
||||||
hasExposure: false
|
hasExposure: false
|
||||||
variables:
|
variables:
|
||||||
spocsCacheTimeout:
|
spocsCacheTimeout:
|
||||||
@@ -755,7 +755,7 @@ newtabSpocsCache:
|
|||||||
newtabLayoutExperiment:
|
newtabLayoutExperiment:
|
||||||
description: >-
|
description: >-
|
||||||
Change the default layout of new tab by adjusting sizes and spacing of elements.
|
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
|
hasExposure: false
|
||||||
variables:
|
variables:
|
||||||
variantA:
|
variantA:
|
||||||
@@ -765,6 +765,13 @@ newtabLayoutExperiment:
|
|||||||
pref: browser.newtabpage.activity-stream.newtabLayouts.variant-a
|
pref: browser.newtabpage.activity-stream.newtabLayouts.variant-a
|
||||||
description: >-
|
description: >-
|
||||||
Variant A in layouts experiment.
|
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:
|
newtabTopicSelection:
|
||||||
description: the about:newtab topic selection experience.
|
description: the about:newtab topic selection experience.
|
||||||
@@ -807,7 +814,7 @@ newtabTopicSelection:
|
|||||||
|
|
||||||
pocketNewtab:
|
pocketNewtab:
|
||||||
description: The Pocket section in newtab
|
description: The Pocket section in newtab
|
||||||
owner: sdowne@getpocket.com
|
owner: sdowne@mozilla.com
|
||||||
hasExposure: false
|
hasExposure: false
|
||||||
isEarlyStartup: true
|
isEarlyStartup: true
|
||||||
variables:
|
variables:
|
||||||
@@ -1169,7 +1176,7 @@ pocketNewtab:
|
|||||||
|
|
||||||
saveToPocket:
|
saveToPocket:
|
||||||
description: The save to Pocket feature
|
description: The save to Pocket feature
|
||||||
owner: sdowne@getpocket.com
|
owner: sdowne@mozilla.com
|
||||||
hasExposure: false
|
hasExposure: false
|
||||||
variables:
|
variables:
|
||||||
emailButton:
|
emailButton:
|
||||||
|
|||||||
Reference in New Issue
Block a user