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:
@@ -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",
|
||||
},
|
||||
];
|
||||
|
||||
@@ -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",
|
||||
|
||||
@@ -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: {
|
||||
|
||||
@@ -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,
|
||||
}),
|
||||
|
||||
@@ -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",
|
||||
},
|
||||
|
||||
@@ -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": {
|
||||
|
||||
@@ -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")`
|
||||
)
|
||||
);
|
||||
});
|
||||
|
||||
@@ -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", () => {
|
||||
|
||||
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user