Bug 1721584 - reinstate about:preferences icons for various new tab categories, r=andreio,perftest-reviewers,kimberlythegeek

Differential Revision: https://phabricator.services.mozilla.com/D120464
This commit is contained in:
Gijs Kruitbosch
2021-07-21 14:33:38 +00:00
parent 2a5eac7e63
commit 098f5d5a2c
10 changed files with 17 additions and 22 deletions

View File

@@ -80,7 +80,7 @@ const PREFS_AFTER_SECTIONS = ({
? "home-prefs-snippets-description-new"
: "home-prefs-snippets-description",
},
icon: "info",
icon: "chrome://global/skin/icons/info.svg",
eventSource: "SNIPPETS",
},
];

View File

@@ -145,7 +145,7 @@ const PREFS_CONFIG = new Map([
api_key_pref: "extensions.pocket.oAuthConsumerKey",
// Use the opposite value as what default value the feed would have used
hidden: !PREFS_CONFIG.get("feeds.system.topstories").getValue(args),
provider_icon: "pocket",
provider_icon: "chrome://global/skin/icons/pocket.svg",
provider_name: "Pocket",
read_more_endpoint:
"https://getpocket.com/explore/trending?src=fx_new_tab",

View File

@@ -1839,8 +1839,7 @@ getHardcodedLayout = isBasicLayout => ({
id: "newtab-pocket-learn-more",
},
link_url: "https://getpocket.com/firefox/new_tab_learn_more",
icon:
"chrome://activity-stream/content/data/content/assets/glyph-pocket-16.svg",
icon: "chrome://global/skin/icons/pocket.svg",
},
properties: {},
styles: {

View File

@@ -137,7 +137,7 @@ const BUILT_IN_SECTIONS = ({
},
shouldHidePref: false,
eventSource: "HIGHLIGHTS",
icon: "highlights",
icon: "chrome://global/skin/icons/highlights.svg",
title: {
id:
newNewtabExperienceEnabled || customizationMenuEnabled
@@ -149,7 +149,7 @@ const BUILT_IN_SECTIONS = ({
maxRows: 4,
emptyState: {
message: { id: "newtab-empty-section-highlights" },
icon: "highlights",
icon: "chrome://global/skin/icons/highlights.svg",
},
shouldSendImpressionStats: false,
}),

View File

@@ -265,8 +265,7 @@ const MESSAGES = () => [
scene1_button_label: "Continue",
scene1_button_color: "#712b00",
scene1_button_background_color: "#ff9400",
scene1_section_title_icon:
"chrome://activity-stream/content/data/content/assets/glyph-pocket-16.svg",
scene1_section_title_icon: "chrome://global/skin/icons/pocket.svg",
scene1_section_title_text:
"All the Firefox news that's fit to Firefox print!",
scene2_title: "Let's do this!",
@@ -329,8 +328,7 @@ const MESSAGES = () => [
scene1_title_icon: TEST_ICON_16,
scene1_title_icon_dark_theme: TEST_ICON_BW,
scene1_section_title_icon:
"chrome://activity-stream/content/data/content/assets/glyph-pocket-16.svg",
scene1_section_title_icon: "chrome://global/skin/icons/pocket.svg",
scene1_section_title_text: "Firefox Accounts: Receivable benefits",
scene2_text:
@@ -475,8 +473,7 @@ const MESSAGES = () => [
scene1_title: "Full-featured. Customizable. Lightning fast",
scene1_title_icon: TEST_ICON_16,
scene1_title_icon_dark_theme: TEST_ICON_BW,
scene1_section_title_icon:
"chrome://activity-stream/content/data/content/assets/glyph-pocket-16.svg",
scene1_section_title_icon: "chrome://global/skin/icons/pocket.svg",
scene1_section_title_text: "Send Firefox to your mobile device!",
scene2_button_label: "Send",
@@ -578,8 +575,7 @@ const MESSAGES = () => [
syncLink: { url: "https://www.mozilla.org/en-US/firefox/accounts" },
},
block_button_text: "Block",
section_title_icon:
"chrome://activity-stream/content/data/content/assets/glyph-pocket-16.svg",
section_title_icon: "chrome://global/skin/icons/pocket.svg",
section_title_text: "Messages from Mozilla",
},
},
@@ -593,8 +589,7 @@ const MESSAGES = () => [
text:
"Sync it, link it, take it with you. All this and more with a Firefox Account.",
block_button_text: "Block",
section_title_icon:
"chrome://activity-stream/content/data/content/assets/glyph-pocket-16.svg",
section_title_icon: "chrome://global/skin/icons/pocket.svg",
section_title_text: "Messages from Mozilla (click for info)",
section_title_url: "https://www.mozilla.org/about",
},

View File

@@ -20,7 +20,8 @@
"subtitle": "",
"link_text": "How it works",
"link_url": "https://getpocket.com/firefox/new_tab_learn_more",
"icon": "chrome://activity-stream/content/data/content/assets/glyph-pocket-16.svg"
"icon": "chrome://global/skin/icons/pocket.svg"
},
"properties": null,
"styles": {

View File

@@ -24,7 +24,7 @@ describe("<isAllowedCSS>", () => {
assert.isTrue(
isAllowedCSS(
"background-image",
`url("chrome://activity-stream/content/data/content/assets/glyph-info-16.svg")`
`url("chrome://global/skin/icons/info.svg")`
)
);
});

View File

@@ -234,14 +234,14 @@ describe("AboutPreferences Feed", () => {
);
});
it("should use desired glyph icon", () => {
prefStructure = [{ icon: "highlights", pref: { feed: "feed" } }];
prefStructure = [{ icon: "mail", pref: { feed: "feed" } }];
testRender();
assert.calledWith(
node.setAttribute,
"src",
"chrome://activity-stream/content/data/content/assets/glyph-highlights-16.svg"
"chrome://activity-stream/content/data/content/assets/glyph-mail-16.svg"
);
});
it("should use specified chrome icon", () => {

View File

@@ -20,7 +20,7 @@
"subtitle": "",
"link_text": "How it works",
"link_url": "https://getpocket.com/firefox/new_tab_learn_more",
"icon": "chrome://activity-stream/content/data/content/assets/glyph-pocket-16.svg"
"icon": "chrome://global/skin/icons/pocket.svg"
},
"properties": null,
"styles": {