зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1596118 - Remove fxa accounts badge that has been replaced by Messaging System badging r=eoger,k88hudson
Differential Revision: https://phabricator.services.mozilla.com/D52843 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
109da965cb
Коммит
a06612790c
|
@ -1322,8 +1322,6 @@ pref("trailhead.firstrun.branches", "");
|
|||
|
||||
// The pref that controls if the What's New panel is enabled.
|
||||
pref("browser.messaging-system.whatsNewPanel.enabled", true);
|
||||
// Whether to use Messaging System to add a badge to the FxA toolbar button
|
||||
pref("browser.messaging-system.fxatoolbarbadge.enabled", true);
|
||||
// Used for CFR messages with scores. See Bug 1594422.
|
||||
pref("browser.messaging-system.personalized-cfr.scores", "{}");
|
||||
pref("browser.messaging-system.personalized-cfr.score-threshold", 5000);
|
||||
|
|
|
@ -387,7 +387,6 @@ var gSync = {
|
|||
|
||||
if (!gFxaToolbarAccessed) {
|
||||
Services.prefs.setBoolPref("identity.fxaccounts.toolbar.accessed", true);
|
||||
document.documentElement.removeAttribute("fxa_avatar_badged");
|
||||
}
|
||||
|
||||
this.enableSendTabIfValidTab();
|
||||
|
|
|
@ -493,16 +493,6 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
|||
}
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
this,
|
||||
"gMsgingSystemFxABadge",
|
||||
"browser.messaging-system.fxatoolbarbadge.enabled",
|
||||
true,
|
||||
(aPref, aOldVal, aNewVal) => {
|
||||
updateFxaToolbarMenu(gFxaToolbarEnabled);
|
||||
}
|
||||
);
|
||||
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
this,
|
||||
"gAddonAbuseReportEnabled",
|
||||
|
@ -638,16 +628,6 @@ function updateFxaToolbarMenu(enable, isInitialUpdate = false) {
|
|||
|
||||
Services.telemetry.setEventRecordingEnabled("fxa_avatar_menu", true);
|
||||
|
||||
// We set an attribute here so that we can toggle the custom
|
||||
// badge depending on whether the FxA menu was ever accessed.
|
||||
// If badging is handled by Messaging System we shouldn't set
|
||||
// the attribute.
|
||||
if (!gFxaToolbarAccessed && !gMsgingSystemFxABadge) {
|
||||
mainWindowEl.setAttribute("fxa_avatar_badged", "badged");
|
||||
} else {
|
||||
mainWindowEl.removeAttribute("fxa_avatar_badged");
|
||||
}
|
||||
|
||||
// When the pref for a FxA service is removed, we remove it from
|
||||
// the FxA toolbar menu as well. This is useful when the service
|
||||
// might not be available that browser.
|
||||
|
|
|
@ -22,9 +22,6 @@ add_task(async function test_ui_state_notification_calls_updateAllUI() {
|
|||
});
|
||||
|
||||
add_task(async function test_ui_state_signedin() {
|
||||
const msBadgeEnabled = Services.prefs.getBoolPref(
|
||||
"browser.messaging-system.fxatoolbarbadge.enabled"
|
||||
);
|
||||
const relativeDateAnchor = new Date();
|
||||
let state = {
|
||||
status: UIState.STATUS_SIGNED_IN,
|
||||
|
@ -72,9 +69,7 @@ add_task(async function test_ui_state_signedin() {
|
|||
disabledItems: [],
|
||||
hiddenItems: ["PanelUI-fxa-menu-setup-sync-button"],
|
||||
});
|
||||
if (!msBadgeEnabled) {
|
||||
checkFxAAvatar("signedin");
|
||||
}
|
||||
checkFxAAvatar("signedin");
|
||||
gSync.relativeTimeFormat = origRelativeTimeFormat;
|
||||
});
|
||||
|
||||
|
@ -106,9 +101,6 @@ add_task(async function test_ui_state_syncing() {
|
|||
});
|
||||
|
||||
add_task(async function test_ui_state_unconfigured() {
|
||||
const msBadgeEnabled = Services.prefs.getBoolPref(
|
||||
"browser.messaging-system.fxatoolbarbadge.enabled"
|
||||
);
|
||||
let state = {
|
||||
status: UIState.STATUS_NOT_CONFIGURED,
|
||||
};
|
||||
|
@ -138,15 +130,10 @@ add_task(async function test_ui_state_unconfigured() {
|
|||
"PanelUI-fxa-menu-sync-prefs-button",
|
||||
],
|
||||
});
|
||||
if (!msBadgeEnabled) {
|
||||
checkFxAAvatar("not_configured");
|
||||
}
|
||||
checkFxAAvatar("not_configured");
|
||||
});
|
||||
|
||||
add_task(async function test_ui_state_syncdisabled() {
|
||||
const msBadgeEnabled = Services.prefs.getBoolPref(
|
||||
"browser.messaging-system.fxatoolbarbadge.enabled"
|
||||
);
|
||||
let state = {
|
||||
status: UIState.STATUS_SIGNED_IN,
|
||||
syncEnabled: false,
|
||||
|
@ -184,9 +171,7 @@ add_task(async function test_ui_state_syncdisabled() {
|
|||
"PanelUI-fxa-menu-sync-prefs-button",
|
||||
],
|
||||
});
|
||||
if (!msBadgeEnabled) {
|
||||
checkFxAAvatar("signedin");
|
||||
}
|
||||
checkFxAAvatar("signedin");
|
||||
});
|
||||
|
||||
add_task(async function test_ui_state_unverified() {
|
||||
|
@ -396,8 +381,7 @@ function checkFxAAvatar(fxaStatus) {
|
|||
for (const avatar of avatarContainers) {
|
||||
const avatarURL = getComputedStyle(avatar).listStyleImage;
|
||||
const expected = {
|
||||
not_configured:
|
||||
'url("chrome://browser/skin/fxa/avatar-empty-badged.svg")',
|
||||
not_configured: 'url("chrome://browser/skin/fxa/avatar-empty.svg")',
|
||||
unverified: 'url("chrome://browser/skin/fxa/avatar-confirm.svg")',
|
||||
signedin: 'url("chrome://browser/skin/fxa/avatar.svg")',
|
||||
"login-failed": 'url("chrome://browser/skin/fxa/avatar-alert.svg")',
|
||||
|
|
|
@ -42,12 +42,6 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
|||
"browser.messaging-system.whatsNewPanel.enabled",
|
||||
false
|
||||
);
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
this,
|
||||
"isFxABadgeEnabled",
|
||||
"browser.messaging-system.fxatoolbarbadge.enabled",
|
||||
true
|
||||
);
|
||||
XPCOMUtils.defineLazyPreferenceGetter(
|
||||
this,
|
||||
"hasAccessedFxAPanel",
|
||||
|
@ -483,7 +477,8 @@ const TargetingGetters = {
|
|||
return isWhatsNewPanelEnabled;
|
||||
},
|
||||
get isFxABadgeEnabled() {
|
||||
return isFxABadgeEnabled;
|
||||
// Requires cleanup and update of remote messages. See Bug 1601965.
|
||||
return true;
|
||||
},
|
||||
get userPrefs() {
|
||||
return {
|
||||
|
|
|
@ -840,22 +840,6 @@ add_task(async function check_hasAccessedFxAPanel() {
|
|||
);
|
||||
});
|
||||
|
||||
add_task(async function check_isFxABadgeEnabled() {
|
||||
is(
|
||||
await ASRouterTargeting.Environment.isFxABadgeEnabled,
|
||||
true,
|
||||
"Default pref value is true"
|
||||
);
|
||||
|
||||
await pushPrefs(["browser.messaging-system.fxatoolbarbadge.enabled", false]);
|
||||
|
||||
is(
|
||||
await ASRouterTargeting.Environment.isFxABadgeEnabled,
|
||||
false,
|
||||
"Value should be false according to pref"
|
||||
);
|
||||
});
|
||||
|
||||
add_task(async function check_isWhatsNewPanelEnabled() {
|
||||
is(
|
||||
await ASRouterTargeting.Environment.isWhatsNewPanelEnabled,
|
||||
|
|
|
@ -717,10 +717,6 @@ toolbarbutton[constrain-size="true"][cui-areatype="menu-panel"] > .toolbarbutton
|
|||
--avatar-image-url: url(chrome://browser/skin/fxa/avatar-empty.svg);
|
||||
}
|
||||
|
||||
:root[fxastatus="not_configured"][fxa_avatar_badged="badged"] {
|
||||
--avatar-image-url: url(chrome://browser/skin/fxa/avatar-empty-badged.svg);
|
||||
}
|
||||
|
||||
:root:not([fxatoolbarmenu]) #fxa-toolbar-menu-button {
|
||||
display: none;
|
||||
}
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
<!-- This Source Code Form is subject to the terms of the Mozilla Public
|
||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
|
||||
<path fill="context-fill" fill-opacity="context-fill-opacity" d="M8 9a3 3 0 1 0-3-3 3 3 0 0 0 3 3zm4.05.58C11 8.36 9.52 10 8 10s-3-1.64-4-.42a1 1 0 0 0-.06 1.23 5 5 0 0 0 8.22 0 1 1 0 0 0-.11-1.23z"/>
|
||||
<circle fill="#0A84FF" cx="13.5" cy="2.5" r="2.5"/>
|
||||
<path fill="context-fill" fill-opacity="context-fill-opacity" d="M14.13 5.93a.4.4 0 0 0-.35.48A5.89 5.89 0 0 1 14 8.1 6 6 0 0 1 8 14h-.1A6 6 0 0 1 8 2h.1a6 6 0 0 1 1.42.2.48.48 0 0 0 .56-.38.48.48 0 0 0-.3-.59A7 7 0 1 0 7.89 15H8a7 7 0 0 0 7-6.89 7.09 7.09 0 0 0-.24-1.91c-.04-.14-.22-.36-.63-.27z"/>
|
||||
</svg>
|
До Ширина: | Высота: | Размер: 839 B |
|
@ -149,7 +149,6 @@
|
|||
skin/classic/browser/fxa/avatar-color.svg (../shared/fxa/avatar-color.svg)
|
||||
skin/classic/browser/fxa/avatar-confirm.svg (../shared/fxa/avatar-confirm.svg)
|
||||
skin/classic/browser/fxa/avatar-empty.svg (../shared/fxa/avatar-empty.svg)
|
||||
skin/classic/browser/fxa/avatar-empty-badged.svg (../shared/fxa/avatar-empty-badged.svg)
|
||||
skin/classic/browser/fxa/sync-devices.svg (../shared/fxa/sync-devices.svg)
|
||||
skin/classic/browser/fxa/send.svg (../shared/fxa/send.svg)
|
||||
skin/classic/browser/fxa/monitor.svg (../shared/fxa/monitor.svg)
|
||||
|
|
Загрузка…
Ссылка в новой задаче