Bug 1883673 - Remove majorRelease2022 Nimbus feature r=aminomancer,omc-reviewers,win-reviewers,gstoll,pbz,firefox-desktop-core-reviewers
This feature is no longer intended for experimentation and some of the things it controls are no longer in product. Differential Revision: https://phabricator.services.mozilla.com/D204514
This commit is contained in:
@@ -823,10 +823,6 @@ pref("browser.privatebrowsing.vpnpromourl", "https://vpn.mozilla.org/?utm_source
|
||||
// Whether the user has opted-in to recommended settings for data features.
|
||||
pref("browser.dataFeatureRecommendations.enabled", false);
|
||||
|
||||
// Temporary pref to control whether or not Private Browsing windows show up
|
||||
// as separate icons in the Windows taskbar.
|
||||
pref("browser.privateWindowSeparation.enabled", true);
|
||||
|
||||
// Use dark theme variant for PBM windows. This is only supported if the theme
|
||||
// sets darkTheme data.
|
||||
pref("browser.theme.dark-private-windows", true);
|
||||
|
||||
@@ -322,12 +322,7 @@ function openBrowserWindow(
|
||||
Ci.nsILoadContext
|
||||
).usePrivateBrowsing = true;
|
||||
|
||||
if (
|
||||
AppConstants.platform == "win" &&
|
||||
lazy.NimbusFeatures.majorRelease2022.getVariable(
|
||||
"feltPrivacyWindowSeparation"
|
||||
)
|
||||
) {
|
||||
if (AppConstants.platform == "win") {
|
||||
lazy.WinTaskbar.setGroupIdForWindow(
|
||||
win,
|
||||
lazy.WinTaskbar.defaultPrivateGroupId
|
||||
|
||||
@@ -2710,12 +2710,6 @@ BrowserGlue.prototype = {
|
||||
name: "ensurePrivateBrowsingShortcutExists",
|
||||
condition:
|
||||
AppConstants.platform == "win" &&
|
||||
// Pref'ed off until Private Browsing window separation is enabled by default
|
||||
// to avoid a situation where a user pins the Private Browsing shortcut to
|
||||
// the Taskbar, which will end up launching into a different Taskbar icon.
|
||||
lazy.NimbusFeatures.majorRelease2022.getVariable(
|
||||
"feltPrivacyWindowSeparation"
|
||||
) &&
|
||||
// We don't want a shortcut if it's been disabled, eg: by enterprise policy.
|
||||
lazy.PrivateBrowsingUtils.enabled &&
|
||||
// Private Browsing shortcuts for packaged builds come with the package,
|
||||
@@ -4534,10 +4528,7 @@ BrowserGlue.prototype = {
|
||||
return "disallow-postUpdate";
|
||||
}
|
||||
|
||||
const useMROnboarding =
|
||||
lazy.NimbusFeatures.majorRelease2022.getVariable("onboarding");
|
||||
const showUpgradeDialog =
|
||||
useMROnboarding ??
|
||||
lazy.NimbusFeatures.upgradeDialog.getVariable("enabled");
|
||||
|
||||
return showUpgradeDialog ? "" : "disabled";
|
||||
|
||||
@@ -34,7 +34,6 @@ Please note that some targeting attributes require stricter controls on the tele
|
||||
* [hasMigratedPasswords](#hasmigratedpasswords)
|
||||
* [hasPinnedTabs](#haspinnedtabs)
|
||||
* [homePageSettings](#homepagesettings)
|
||||
* [inMr2022Holdback](#inmr2022holdback)
|
||||
* [isBackgroundTaskMode](#isbackgroundtaskmode)
|
||||
* [isChinaRepack](#ischinarepack)
|
||||
* [isDefaultBrowser](#isdefaultbrowser)
|
||||
@@ -973,10 +972,6 @@ mode, or `null` if this invocation is not running in background task mode.
|
||||
|
||||
Checks if user prefers reduced motion as indicated by the value of a media query for `prefers-reduced-motion`.
|
||||
|
||||
### `inMr2022Holdback`
|
||||
|
||||
A boolean. `true` when the user is in the Major Release 2022 holdback study.
|
||||
|
||||
### `distributionId`
|
||||
|
||||
A string containing the id of the distribution, or the empty string if there
|
||||
|
||||
@@ -45,7 +45,6 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
||||
ClientEnvironment: "resource://normandy/lib/ClientEnvironment.sys.mjs",
|
||||
CustomizableUI: "resource:///modules/CustomizableUI.sys.mjs",
|
||||
HomePage: "resource:///modules/HomePage.sys.mjs",
|
||||
NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||
ProfileAge: "resource://gre/modules/ProfileAge.sys.mjs",
|
||||
Region: "resource://gre/modules/Region.sys.mjs",
|
||||
TargetingContext: "resource://messaging-system/targeting/Targeting.sys.mjs",
|
||||
@@ -891,15 +890,6 @@ const TargetingGetters = {
|
||||
return window?.matchMedia("(prefers-reduced-motion: reduce)")?.matches;
|
||||
},
|
||||
|
||||
/**
|
||||
* Whether or not the user is in the Major Release 2022 holdback study.
|
||||
*/
|
||||
get inMr2022Holdback() {
|
||||
return (
|
||||
lazy.NimbusFeatures.majorRelease2022.getVariable("onboarding") === false
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* The distribution id, if any.
|
||||
* @return {string}
|
||||
|
||||
@@ -157,7 +157,7 @@ const MESSAGES = () => {
|
||||
// Add the highest possible cap to ensure impressions are recorded while allowing the Spotlight to sync across windows/tabs with Firefox View open
|
||||
lifetime: 100,
|
||||
},
|
||||
targeting: `!inMr2022Holdback && source == "about:firefoxview" &&
|
||||
targeting: `source == "about:firefoxview" &&
|
||||
!'browser.newtabpage.activity-stream.asrouter.providers.cfr'|preferenceIsUserSet &&
|
||||
'browser.newtabpage.activity-stream.asrouter.userprefs.cfr.features'|preferenceValue &&
|
||||
${matchCurrentScreenTargeting(
|
||||
@@ -303,7 +303,7 @@ const MESSAGES = () => {
|
||||
],
|
||||
},
|
||||
priority: 3,
|
||||
targeting: `!inMr2022Holdback && source == "about:firefoxview" && ${matchCurrentScreenTargeting(
|
||||
targeting: `source == "about:firefoxview" && ${matchCurrentScreenTargeting(
|
||||
FIREFOX_VIEW_PREF,
|
||||
"FEATURE_CALLOUT_[0-9]"
|
||||
)} && ${matchIncompleteTargeting(FIREFOX_VIEW_PREF)}`,
|
||||
@@ -376,7 +376,7 @@ const MESSAGES = () => {
|
||||
],
|
||||
},
|
||||
priority: 2,
|
||||
targeting: `!inMr2022Holdback && source == "about:firefoxview" && "browser.firefox-view.view-count" | preferenceValue > 2
|
||||
targeting: `source == "about:firefoxview" && "browser.firefox-view.view-count" | preferenceValue > 2
|
||||
&& (("identity.fxaccounts.enabled" | preferenceValue == false) || !(("services.sync.engine.tabs" | preferenceValue == true) && ("services.sync.username" | preferenceValue))) && (!messageImpressions.FIREFOX_VIEW_SPOTLIGHT[messageImpressions.FIREFOX_VIEW_SPOTLIGHT | length - 1] || messageImpressions.FIREFOX_VIEW_SPOTLIGHT[messageImpressions.FIREFOX_VIEW_SPOTLIGHT | length - 1] < currentDate|date - ${ONE_DAY_IN_MS})`,
|
||||
frequency: {
|
||||
lifetime: 1,
|
||||
|
||||
@@ -24,7 +24,6 @@ const lazy = {};
|
||||
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserUtils: "resource://gre/modules/BrowserUtils.sys.mjs",
|
||||
NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||
ShellService: "resource:///modules/ShellService.sys.mjs",
|
||||
});
|
||||
|
||||
@@ -871,7 +870,7 @@ const BASE_MESSAGES = () => [
|
||||
],
|
||||
lifetime: 12,
|
||||
},
|
||||
targeting: "!inMr2022Holdback && doesAppNeedPrivatePin",
|
||||
targeting: "doesAppNeedPrivatePin",
|
||||
},
|
||||
{
|
||||
id: "PB_NEWTAB_COOKIE_BANNERS_PROMO",
|
||||
@@ -1374,9 +1373,8 @@ export const OnboardingMessageProvider = {
|
||||
return checkDefault && !isDefault;
|
||||
},
|
||||
_shouldShowPrivacySegmentationScreen() {
|
||||
// Fall back to pref: browser.privacySegmentation.preferences.show
|
||||
return lazy.NimbusFeatures.majorRelease2022.getVariable(
|
||||
"feltPrivacyShowPreferencesSection"
|
||||
return Services.prefs.getBoolPref(
|
||||
"browser.privacySegmentation.preferences.show"
|
||||
);
|
||||
},
|
||||
_doesHomepageNeedReset() {
|
||||
|
||||
@@ -1226,47 +1226,6 @@ add_task(async function check_userPrefersReducedMotion() {
|
||||
);
|
||||
});
|
||||
|
||||
add_task(async function test_mr2022Holdback() {
|
||||
await ExperimentAPI.ready();
|
||||
|
||||
ok(
|
||||
!ASRouterTargeting.Environment.inMr2022Holdback,
|
||||
"Should not be in holdback (no experiment)"
|
||||
);
|
||||
|
||||
{
|
||||
const doExperimentCleanup = await ExperimentFakes.enrollWithFeatureConfig({
|
||||
featureId: "majorRelease2022",
|
||||
value: {
|
||||
onboarding: true,
|
||||
},
|
||||
});
|
||||
|
||||
ok(
|
||||
!ASRouterTargeting.Environment.inMr2022Holdback,
|
||||
"Should not be in holdback (onboarding = true)"
|
||||
);
|
||||
|
||||
await doExperimentCleanup();
|
||||
}
|
||||
|
||||
{
|
||||
const doExperimentCleanup = await ExperimentFakes.enrollWithFeatureConfig({
|
||||
featureId: "majorRelease2022",
|
||||
value: {
|
||||
onboarding: false,
|
||||
},
|
||||
});
|
||||
|
||||
ok(
|
||||
ASRouterTargeting.Environment.inMr2022Holdback,
|
||||
"Should be in holdback (onboarding = false)"
|
||||
);
|
||||
|
||||
await doExperimentCleanup();
|
||||
}
|
||||
});
|
||||
|
||||
add_task(async function test_distributionId() {
|
||||
is(
|
||||
ASRouterTargeting.Environment.distributionId,
|
||||
|
||||
@@ -3227,8 +3227,8 @@ var gPrivacyPane = {
|
||||
initDataCollection() {
|
||||
if (
|
||||
!AppConstants.MOZ_DATA_REPORTING &&
|
||||
!NimbusFeatures.majorRelease2022.getVariable(
|
||||
"feltPrivacyShowPreferencesSection"
|
||||
!Services.prefs.getBoolPref(
|
||||
"browser.privacySegmentation.preferences.show"
|
||||
)
|
||||
) {
|
||||
// Nothing to control in the data collection section, remove it.
|
||||
@@ -3255,16 +3255,19 @@ var gPrivacyPane = {
|
||||
// Section visibility
|
||||
let section = document.getElementById("privacySegmentationSection");
|
||||
let updatePrivacySegmentationSectionVisibilityState = () => {
|
||||
section.hidden = !NimbusFeatures.majorRelease2022.getVariable(
|
||||
"feltPrivacyShowPreferencesSection"
|
||||
section.hidden = !Services.prefs.getBoolPref(
|
||||
"browser.privacySegmentation.preferences.show"
|
||||
);
|
||||
};
|
||||
|
||||
NimbusFeatures.majorRelease2022.onUpdate(
|
||||
Services.prefs.addObserver(
|
||||
"browser.privacySegmentation.preferences.show",
|
||||
updatePrivacySegmentationSectionVisibilityState
|
||||
);
|
||||
|
||||
window.addEventListener("unload", () => {
|
||||
NimbusFeatures.majorRelease2022.offUpdate(
|
||||
Services.prefs.removeObserver(
|
||||
"browser.privacySegmentation.preferences.show",
|
||||
updatePrivacySegmentationSectionVisibilityState
|
||||
);
|
||||
});
|
||||
|
||||
@@ -54,57 +54,3 @@ add_task(async function test_pin_promo() {
|
||||
await BrowserTestUtils.closeWindow(win3);
|
||||
await BrowserTestUtils.closeWindow(win4);
|
||||
});
|
||||
|
||||
add_task(async function test_pin_promo_mr2022_holdback() {
|
||||
ASRouter.resetMessageState();
|
||||
// Set majorRelease2022 feature onboarding variable fallback pref
|
||||
// for inMr2022Holdback targeting to evaluate true
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [["browser.majorrelease.onboarding", false]],
|
||||
});
|
||||
await ASRouter.onPrefChange();
|
||||
let { win: win1, tab: tab1 } = await openTabAndWaitForRender();
|
||||
|
||||
await SpecialPowers.spawn(tab1, [], async function () {
|
||||
const promoContainer = content.document.querySelector(".promo");
|
||||
const promoButton = content.document.querySelector(
|
||||
"#private-browsing-promo-link"
|
||||
);
|
||||
|
||||
ok(promoContainer, "Promo is shown");
|
||||
|
||||
Assert.equal(
|
||||
promoButton.getAttribute("data-l10n-id"),
|
||||
"about-private-browsing-focus-promo-cta",
|
||||
"Pin Promo not shown for holdback user"
|
||||
);
|
||||
});
|
||||
|
||||
await BrowserTestUtils.closeWindow(win1);
|
||||
});
|
||||
|
||||
add_task(async function test_pin_promo_mr2022_not_holdback() {
|
||||
ASRouter.resetMessageState();
|
||||
// Set majorRelease2022 feature onboarding variable fallback pref
|
||||
// for inMr2022Holdback targeting to evaluate false
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [["browser.majorrelease.onboarding", true]],
|
||||
});
|
||||
await ASRouter.onPrefChange();
|
||||
let { win: win1, tab: tab1 } = await openTabAndWaitForRender();
|
||||
|
||||
await SpecialPowers.spawn(tab1, [], async function () {
|
||||
const promoContainer = content.document.querySelector(".promo");
|
||||
const promoHeader = content.document.getElementById("promo-header");
|
||||
|
||||
ok(promoContainer, "Promo is shown");
|
||||
|
||||
is(
|
||||
promoHeader.getAttribute("data-l10n-id"),
|
||||
"about-private-browsing-pin-promo-header",
|
||||
"Pin Promo is shown"
|
||||
);
|
||||
});
|
||||
|
||||
await BrowserTestUtils.closeWindow(win1);
|
||||
});
|
||||
|
||||
@@ -122,83 +122,3 @@ add_task(async function show_major_upgrade() {
|
||||
defaultPrefs.setBoolPref(pref, orig);
|
||||
await cleanupUpgrade();
|
||||
});
|
||||
|
||||
add_task(async function test_mr2022_upgradeDialogEnabled() {
|
||||
const FALLBACK_PREF = "browser.startup.upgradeDialog.enabled";
|
||||
|
||||
async function runMajorReleaseTest(
|
||||
{ onboarding = undefined, enabled = undefined, fallbackPref = undefined },
|
||||
expected
|
||||
) {
|
||||
info("Testing upgradeDialog with:");
|
||||
info(` majorRelease2022.onboarding=${onboarding}`);
|
||||
info(` upgradeDialog.enabled=${enabled}`);
|
||||
info(` ${FALLBACK_PREF}=${fallbackPref}`);
|
||||
|
||||
let mr2022Cleanup = async () => {};
|
||||
let upgradeDialogCleanup = async () => {};
|
||||
|
||||
if (typeof onboarding !== "undefined") {
|
||||
mr2022Cleanup = await ExperimentFakes.enrollWithFeatureConfig({
|
||||
featureId: "majorRelease2022",
|
||||
value: { onboarding },
|
||||
});
|
||||
}
|
||||
|
||||
if (typeof enabled !== "undefined") {
|
||||
upgradeDialogCleanup = await ExperimentFakes.enrollWithFeatureConfig({
|
||||
featureId: "upgradeDialog",
|
||||
value: { enabled },
|
||||
});
|
||||
}
|
||||
|
||||
if (typeof fallbackPref !== "undefined") {
|
||||
await SpecialPowers.pushPrefEnv({
|
||||
set: [[FALLBACK_PREF, fallbackPref]],
|
||||
});
|
||||
}
|
||||
|
||||
const cleanupForcedUpgrade = await forceMajorUpgrade();
|
||||
|
||||
try {
|
||||
await BROWSER_GLUE._maybeShowDefaultBrowserPrompt();
|
||||
AssertEvents(`Upgrade dialog ${expected ? "shown" : "not shown"}`, [
|
||||
"trigger",
|
||||
"reason",
|
||||
expected ? "satisfied" : "disabled",
|
||||
]);
|
||||
|
||||
if (expected) {
|
||||
const [win] = await TestUtils.topicObserved("subdialog-loaded");
|
||||
win.close();
|
||||
await BrowserTestUtils.removeTab(gBrowser.selectedTab);
|
||||
}
|
||||
} finally {
|
||||
await cleanupForcedUpgrade();
|
||||
if (typeof fallbackPref !== "undefined") {
|
||||
await SpecialPowers.popPrefEnv();
|
||||
}
|
||||
await upgradeDialogCleanup();
|
||||
await mr2022Cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
await runMajorReleaseTest({ onboarding: true }, true);
|
||||
await runMajorReleaseTest({ onboarding: true, enabled: false }, true);
|
||||
await runMajorReleaseTest({ onboarding: true, fallbackPref: false }, true);
|
||||
|
||||
await runMajorReleaseTest({ onboarding: false }, false);
|
||||
await runMajorReleaseTest({ onboarding: false, enabled: true }, false);
|
||||
await runMajorReleaseTest({ onboarding: false, fallbackPref: true }, false);
|
||||
|
||||
await runMajorReleaseTest({ enabled: true }, true);
|
||||
await runMajorReleaseTest({ enabled: true, fallbackPref: false }, true);
|
||||
await runMajorReleaseTest({ fallbackPref: true }, true);
|
||||
|
||||
await runMajorReleaseTest({ enabled: false }, false);
|
||||
await runMajorReleaseTest({ enabled: false, fallbackPref: true }, false);
|
||||
await runMajorReleaseTest({ fallbackPref: false }, false);
|
||||
|
||||
// Test the default configuration.
|
||||
await runMajorReleaseTest({}, false);
|
||||
});
|
||||
|
||||
@@ -1434,33 +1434,6 @@ gleanInternalSdk:
|
||||
branch: user
|
||||
pref: telemetry.glean.internal.maxPingsPerMinute
|
||||
|
||||
majorRelease2022:
|
||||
description: Major Release 2022
|
||||
owner: firefoxview@mozilla.com
|
||||
hasExposure: false
|
||||
isEarlyStartup: true
|
||||
variables:
|
||||
feltPrivacyPBMDarkTheme:
|
||||
type: boolean
|
||||
fallbackPref: "browser.theme.dark-private-windows"
|
||||
description: "Use dark theme variant for PBM windows. This is only supported if the theme sets darkTheme data."
|
||||
feltPrivacyShowPreferencesSection:
|
||||
type: boolean
|
||||
fallbackPref: "browser.privacySegmentation.preferences.show"
|
||||
description: "Controls visibility of the privacy segmentation preferences section."
|
||||
feltPrivacyWindowSeparation:
|
||||
type: boolean
|
||||
fallbackPref: "browser.privateWindowSeparation.enabled"
|
||||
description: "Whether or not private browsing windows use a separate icon in the Windows taskbar"
|
||||
colorwayCloset:
|
||||
type: boolean
|
||||
fallbackPref: "browser.theme.colorway-closet"
|
||||
description: "Whether or not to show the colorway closet modal"
|
||||
onboarding:
|
||||
type: boolean
|
||||
fallbackPref: "browser.majorrelease.onboarding"
|
||||
description: "Whether or not to use the MR2022 onboarding settings."
|
||||
|
||||
browserLowMemoryPrefs:
|
||||
description: Prefs which control the browser's behaviour under low memory.
|
||||
owner: haftandilian@mozilla.com
|
||||
|
||||
@@ -25,7 +25,6 @@ NIMBUS_FALLBACK_PREFS = (
|
||||
# See https://bugzilla.mozilla.org/show_bug.cgi?id=1875331 for details.
|
||||
ALLOWED_ISEARLYSTARTUP_FEATURE_IDS = {
|
||||
"aboutwelcome",
|
||||
"majorRelease2022",
|
||||
"newtab",
|
||||
"pocketNewtab",
|
||||
"searchConfiguration",
|
||||
|
||||
@@ -8,7 +8,6 @@ const lazy = {};
|
||||
// Get the theme variables from the app resource directory.
|
||||
// This allows per-app variables.
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
NimbusFeatures: "resource://nimbus/ExperimentAPI.sys.mjs",
|
||||
PrivateBrowsingUtils: "resource://gre/modules/PrivateBrowsingUtils.sys.mjs",
|
||||
ThemeContentPropertyList: "resource:///modules/ThemeVariableMap.sys.mjs",
|
||||
ThemeVariableMap: "resource:///modules/ThemeVariableMap.sys.mjs",
|
||||
@@ -255,9 +254,7 @@ LightweightThemeConsumer.prototype = {
|
||||
|
||||
// If enabled, apply the dark theme variant to private browsing windows.
|
||||
if (
|
||||
!lazy.NimbusFeatures.majorRelease2022.getVariable(
|
||||
"feltPrivacyPBMDarkTheme"
|
||||
) ||
|
||||
!Services.prefs.getBoolPref("browser.theme.dark-private-windows") ||
|
||||
!lazy.PrivateBrowsingUtils.isWindowPrivate(this._win) ||
|
||||
lazy.PrivateBrowsingUtils.permanentPrivateBrowsing
|
||||
) {
|
||||
|
||||
@@ -166,7 +166,6 @@
|
||||
#include "mozilla/StaticPrefs_ui.h"
|
||||
#include "mozilla/StaticPrefs_widget.h"
|
||||
#include "nsNativeAppSupportWin.h"
|
||||
#include "mozilla/browser/NimbusFeatures.h"
|
||||
|
||||
#include "nsIGfxInfo.h"
|
||||
#include "nsUXThemeConstants.h"
|
||||
@@ -989,13 +988,11 @@ nsresult nsWindow::Create(nsIWidget* aParent, nsNativeWidget aNativeParent,
|
||||
}
|
||||
|
||||
if (aInitData->mIsPrivate) {
|
||||
if (NimbusFeatures::GetBool("majorRelease2022"_ns,
|
||||
"feltPrivacyWindowSeparation"_ns, true) &&
|
||||
// Although permanent Private Browsing mode is indeed Private Browsing,
|
||||
// we choose to make it look like regular Firefox in terms of the icon
|
||||
// it uses (which also means we shouldn't use the Private Browsing
|
||||
// AUMID).
|
||||
!StaticPrefs::browser_privatebrowsing_autostart()) {
|
||||
if (!StaticPrefs::browser_privatebrowsing_autostart()) {
|
||||
RefPtr<IPropertyStore> pPropStore;
|
||||
if (!FAILED(SHGetPropertyStoreForWindow(mWnd, IID_IPropertyStore,
|
||||
getter_AddRefs(pPropStore)))) {
|
||||
|
||||
Reference in New Issue
Block a user