Skip to content

Commit 09a7697

Browse files
committed
Bug 1998828 - Add the "Shortcuts" section to Firefox Home settings r=home-newtab-reviewers,desktop-theme-reviewers,hjones,maxx
Added Shortcuts + Shortcut rows settings to newly redesigned "Firefox Home" section in `about:settings#home`. Differential Revision: https://phabricator.services.mozilla.com/D272189
1 parent 43d5b75 commit 09a7697

File tree

2 files changed

+51
-0
lines changed

2 files changed

+51
-0
lines changed

browser/components/preferences/home.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ if (Services.prefs.getBoolPref("browser.settings-redesign.enabled")) {
6464
id: "browser.newtabpage.activity-stream.widgets.focusTimer.enabled",
6565
type: "bool",
6666
},
67+
{
68+
id: "browser.newtabpage.activity-stream.feeds.topsites",
69+
type: "bool",
70+
},
71+
{
72+
id: "browser.newtabpage.activity-stream.topSitesRows",
73+
type: "int",
74+
},
6775
{
6876
id: "browser.newtabpage.activity-stream.feeds.section.highlights",
6977
type: "bool",
@@ -128,6 +136,16 @@ if (Services.prefs.getBoolPref("browser.settings-redesign.enabled")) {
128136
visible: ({ timerEnabled }) => timerEnabled.value,
129137
});
130138

139+
// Shortcuts
140+
Preferences.addSetting({
141+
id: "shortcuts",
142+
pref: "browser.newtabpage.activity-stream.feeds.topsites",
143+
});
144+
Preferences.addSetting({
145+
id: "shortcutsRows",
146+
pref: "browser.newtabpage.activity-stream.topSitesRows",
147+
});
148+
131149
// Recent activity
132150
Preferences.addSetting({
133151
id: "recentActivity",

browser/components/preferences/main.js

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,6 +1204,39 @@ let SETTINGS_CONFIG = {
12041204
l10nId: "home-prefs-timer-header",
12051205
control: "moz-toggle",
12061206
},
1207+
{
1208+
id: "shortcuts",
1209+
l10nId: "home-prefs-shortcuts-header",
1210+
control: "moz-toggle",
1211+
items: [
1212+
{
1213+
id: "shortcutsRows",
1214+
control: "moz-select",
1215+
options: [
1216+
{
1217+
value: 1,
1218+
l10nId: "home-prefs-sections-rows-option",
1219+
l10nArgs: { num: 1 },
1220+
},
1221+
{
1222+
value: 2,
1223+
l10nId: "home-prefs-sections-rows-option",
1224+
l10nArgs: { num: 2 },
1225+
},
1226+
{
1227+
value: 3,
1228+
l10nId: "home-prefs-sections-rows-option",
1229+
l10nArgs: { num: 3 },
1230+
},
1231+
{
1232+
value: 4,
1233+
l10nId: "home-prefs-sections-rows-option",
1234+
l10nArgs: { num: 4 },
1235+
},
1236+
],
1237+
},
1238+
],
1239+
},
12071240
{
12081241
id: "recentActivity",
12091242
l10nId: "home-prefs-recent-activity-header",

0 commit comments

Comments
 (0)