Skip to content

Commit 079ff41

Browse files
committed
Bug 1724300 - Remove What's New Panel, ToolbarPanelHub components & related tests & references r=desktop-theme-reviewers,omc-reviewers,aminomancer,pdahiya,emilio,devtools-reviewers,firefox-desktop-core-reviewers ,home-newtab-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D201867
1 parent d9fed64 commit 079ff41

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+28
-2162
lines changed

browser/app/profile/firefox.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1705,7 +1705,6 @@ pref("browser.newtabpage.activity-stream.improvesearch.topSiteSearchShortcuts",
17051705

17061706
// ASRouter provider configuration
17071707
pref("browser.newtabpage.activity-stream.asrouter.providers.cfr", "{\"id\":\"cfr\",\"enabled\":true,\"type\":\"remote-settings\",\"collection\":\"cfr\",\"updateCycleInMs\":3600000}");
1708-
pref("browser.newtabpage.activity-stream.asrouter.providers.whats-new-panel", "{\"id\":\"whats-new-panel\",\"enabled\":false,\"type\":\"remote-settings\",\"collection\":\"whats-new-panel\",\"updateCycleInMs\":3600000}");
17091708
pref("browser.newtabpage.activity-stream.asrouter.providers.message-groups", "{\"id\":\"message-groups\",\"enabled\":true,\"type\":\"remote-settings\",\"collection\":\"message-groups\",\"updateCycleInMs\":3600000}");
17101709
pref("browser.newtabpage.activity-stream.asrouter.providers.messaging-experiments", "{\"id\":\"messaging-experiments\",\"enabled\":true,\"type\":\"remote-experiments\",\"updateCycleInMs\":3600000}");
17111710

@@ -1817,9 +1816,6 @@ pref("browser.aboutwelcome.screens", "");
18171816
// Used to enable window modal onboarding
18181817
pref("browser.aboutwelcome.showModal", false);
18191818

1820-
// The pref that controls if the What's New panel is enabled.
1821-
pref("browser.messaging-system.whatsNewPanel.enabled", true);
1822-
18231819
// Experiment Manager
18241820
// See Console.sys.mjs LOG_LEVELS for all possible values
18251821
pref("messaging-system.log", "warn");

browser/base/content/appmenu-viewcache.inc.xhtml

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,6 @@
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44

55
<html:template id="appMenu-viewCache">
6-
<panelview id="appMenu-mainView" class="PanelUI-subView">
7-
<vbox class="panel-subview-body">
8-
<toolbarbutton id="appMenu-whatsnew-button"
9-
class="subviewbutton subviewbutton-iconic subviewbutton-nav"
10-
hidden="true"
11-
closemenu="none"
12-
oncommand="PanelUI.showSubView('PanelUI-whatsNew', this)"/>
13-
</vbox>
14-
</panelview>
15-
166
<!-- This is a placeholder app menu which should be replaced with the "real"
177
Proton app menu before the Proton pref starts getting enabled. -->
188
<panelview id="appMenu-protonMainView" class="PanelUI-subView"
@@ -759,29 +749,6 @@
759749
</vbox>
760750
</panelview>
761751

762-
<panelview id="PanelUI-whatsNew" class="PanelUI-subView" mainview-with-header="true">
763-
<hbox id="PanelUI-whatsNew-title" class="panel-header">
764-
<html:h1>
765-
<html:span data-l10n-id="whatsnew-panel-header"></html:span>
766-
</html:h1>
767-
</hbox>
768-
<toolbarseparator/>
769-
<vbox class="panel-subview-body">
770-
<toolbaritem id="PanelUI-whatsNew-content"
771-
orient="vertical"
772-
smoothscroll="false">
773-
<html:div id="PanelUI-whatsNew-message-container" role="document">
774-
<!-- What's New messages will be rendered here -->
775-
</html:div>
776-
</toolbaritem>
777-
</vbox>
778-
<toolbarseparator/>
779-
<checkbox id="panelMenu-toggleWhatsNew"
780-
class="panelMenu-toggleWhatsNew-checkbox"
781-
onclick="ToolbarPanelHub.toggleWhatsNewPref(event)"
782-
data-l10n-id="whatsnew-panel-footer-checkbox"/>
783-
</panelview>
784-
785752
<panelview id="reset-pbm-panel" class="PanelUI-subView" role="document">
786753
<vbox id="reset-pbm-panel-container" role="alertdialog" aria-labelledby="reset-pbm-panel-header">
787754
<hbox id="reset-pbm-panel-header">

browser/base/content/browser-siteProtections.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2529,12 +2529,12 @@ var gProtectionsHandler = {
25292529
};
25302530

25312531
const doc = event.target.ownerDocument;
2532-
const container = doc.getElementById("messaging-system-message-container");
2532+
const container = doc.getElementById("info-message-container");
25332533
const infoButton = doc.getElementById("protections-popup-info-button");
25342534
const panelContainer = doc.getElementById("protections-popup");
25352535
const toggleMessage = () => {
25362536
const learnMoreLink = doc.querySelector(
2537-
"#messaging-system-message-container .text-link"
2537+
"#info-message-container .text-link"
25382538
);
25392539
if (learnMoreLink) {
25402540
container.toggleAttribute("disabled");

browser/base/content/browser.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,7 @@ toolbar[customizing] > .overflow-button {
250250
display: none;
251251
}
252252

253-
toolbar[customizing] #ion-button,
254-
toolbar[customizing] #whats-new-menu-button {
253+
toolbar[customizing] #ion-button {
255254
display: none;
256255
}
257256

browser/base/content/navigator-toolbox.inc.xhtml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -491,13 +491,6 @@
491491
tooltiptext="Ion"
492492
onmousedown="switchToTabHavingURI('about:ion', true);"
493493
onkeypress="switchToTabHavingURI('about:ion', true);"/>
494-
<toolbarbutton id="whats-new-menu-button"
495-
class="toolbarbutton-1"
496-
delegatesanchor="true"
497-
hidden="true"
498-
badged="true"
499-
onmousedown="PanelUI.showSubView('PanelUI-whatsNew', this, event);"
500-
onkeypress="PanelUI.showSubView('PanelUI-whatsNew', this, event);"/>
501494
<toolbarbutton id="PanelUI-menu-button"
502495
class="toolbarbutton-1"
503496
delegatesanchor="true"

browser/base/content/test/protectionsUI/browser_protectionsUI_info_message.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@ add_task(async function testPanelInfoMessage() {
5151
});
5252

5353
// Test that the info message is displayed when the panel opens
54-
let container = document.getElementById("messaging-system-message-container");
54+
let container = document.getElementById("info-message-container");
5555
let message = document.getElementById("protections-popup-message");
5656
let learnMoreLink = document.querySelector(
57-
"#messaging-system-message-container .text-link"
57+
"#info-message-container .text-link"
5858
);
5959

6060
// Check the visibility of the info message.

browser/components/BrowserGlue.sys.mjs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4462,14 +4462,6 @@ BrowserGlue.prototype = {
44624462

44634463
// Check the default branch as enterprise policies can set prefs there.
44644464
const defaultPrefs = Services.prefs.getDefaultBranch("");
4465-
if (
4466-
!defaultPrefs.getBoolPref(
4467-
"browser.messaging-system.whatsNewPanel.enabled",
4468-
true
4469-
)
4470-
) {
4471-
return "no-whatsNew";
4472-
}
44734465
if (!defaultPrefs.getBoolPref("browser.aboutwelcome.enabled", true)) {
44744466
return "no-welcome";
44754467
}

browser/components/asrouter/actors/ASRouterChild.sys.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ export class ASRouterChild extends JSWindowActorChild {
101101
case msg.DISABLE_PROVIDER:
102102
case msg.ENABLE_PROVIDER:
103103
case msg.EXPIRE_QUERY_CACHE:
104-
case msg.FORCE_WHATSNEW_PANEL:
105-
case msg.CLOSE_WHATSNEW_PANEL:
106104
case msg.FORCE_PRIVATE_BROWSING_WINDOW:
107105
case msg.IMPRESSION:
108106
case msg.RESET_PROVIDER_PREF:

browser/components/asrouter/bin/import-rollouts.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,6 @@ async function getMessageValidators(skipValidation) {
126126
"./content-src/templates/OnboardingMessage/UpdateAction.schema.json",
127127
{ common: true }
128128
),
129-
whatsnew_panel_message: await getValidator(
130-
"./content-src/templates/OnboardingMessage/WhatsNewMessage.schema.json",
131-
{ common: true }
132-
),
133129
feature_callout: await getValidator(
134130
// For now, Feature Callout and Spotlight share a common schema
135131
"./content-src/templates/OnboardingMessage/Spotlight.schema.json",

browser/components/asrouter/content-src/schemas/MessagingExperiment.schema.json

Lines changed: 1 addition & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -982,89 +982,6 @@
982982
},
983983
"required": ["targeting"]
984984
},
985-
"WhatsNewMessage": {
986-
"$schema": "https://json-schema.org/draft/2019-09/schema",
987-
"$id": "file:///WhatsNewMessage.schema.json",
988-
"title": "WhatsNewMessage",
989-
"description": "A template for the messages that appear in the What's New panel.",
990-
"allOf": [
991-
{
992-
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/Message"
993-
}
994-
],
995-
"type": "object",
996-
"properties": {
997-
"content": {
998-
"type": "object",
999-
"properties": {
1000-
"layout": {
1001-
"description": "Different message layouts",
1002-
"enum": ["tracking-protections"]
1003-
},
1004-
"bucket_id": {
1005-
"type": "string",
1006-
"description": "A bucket identifier for the addon. This is used in order to anonymize telemetry for history-sensitive targeting."
1007-
},
1008-
"published_date": {
1009-
"type": "integer",
1010-
"description": "The date/time (number of milliseconds elapsed since January 1, 1970 00:00:00 UTC) the message was published."
1011-
},
1012-
"title": {
1013-
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
1014-
"description": "Id of localized string or message override of What's New message title"
1015-
},
1016-
"subtitle": {
1017-
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
1018-
"description": "Id of localized string or message override of What's New message subtitle"
1019-
},
1020-
"body": {
1021-
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
1022-
"description": "Id of localized string or message override of What's New message body"
1023-
},
1024-
"link_text": {
1025-
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
1026-
"description": "(optional) Id of localized string or message override of What's New message link text"
1027-
},
1028-
"cta_url": {
1029-
"description": "Target URL for the What's New message.",
1030-
"type": "string",
1031-
"format": "moz-url-format"
1032-
},
1033-
"cta_type": {
1034-
"description": "Type of url open action",
1035-
"enum": ["OPEN_URL", "OPEN_ABOUT_PAGE", "OPEN_PROTECTION_REPORT"]
1036-
},
1037-
"cta_where": {
1038-
"description": "How to open the cta: new window, tab, focused, unfocused.",
1039-
"enum": ["current", "tabshifted", "tab", "save", "window"]
1040-
},
1041-
"icon_url": {
1042-
"description": "(optional) URL for the What's New message icon.",
1043-
"type": "string",
1044-
"format": "uri"
1045-
},
1046-
"icon_alt": {
1047-
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/localizableText",
1048-
"description": "Alt text for image."
1049-
}
1050-
},
1051-
"additionalProperties": true,
1052-
"required": [
1053-
"published_date",
1054-
"title",
1055-
"body",
1056-
"cta_url",
1057-
"bucket_id"
1058-
]
1059-
},
1060-
"template": {
1061-
"type": "string",
1062-
"const": "whatsnew_panel_message"
1063-
}
1064-
},
1065-
"required": ["order"],
1066-
"additionalProperties": true
1067-
},
1068985
"Message": {
1069986
"type": "object",
1070987
"properties": {
@@ -1093,8 +1010,7 @@
10931010
"feature_callout",
10941011
"toast_notification",
10951012
"toolbar_badge",
1096-
"update_action",
1097-
"whatsnew_panel_message"
1013+
"update_action"
10981014
]
10991015
},
11001016
"frequency": {
@@ -1326,21 +1242,6 @@
13261242
"then": {
13271243
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/UpdateAction"
13281244
}
1329-
},
1330-
{
1331-
"if": {
1332-
"type": "object",
1333-
"properties": {
1334-
"template": {
1335-
"type": "string",
1336-
"enum": ["whatsnew_panel_message"]
1337-
}
1338-
},
1339-
"required": ["template"]
1340-
},
1341-
"then": {
1342-
"$ref": "chrome://browser/content/asrouter/schemas/MessagingExperiment.schema.json#/$defs/WhatsNewMessage"
1343-
}
13441245
}
13451246
]
13461247
},

0 commit comments

Comments
 (0)