commit 09a7697eb69d839ef145f169859ca452799ccd7e
parent 43d5b751ad6e6ada756ec4e01c06dbe4f79af2f1
Author: Nina Pypchenko <npypchenko@mozilla.com>
Date: Thu, 13 Nov 2025 22:13:19 +0000
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
Diffstat:
2 files changed, 51 insertions(+), 0 deletions(-)
diff --git a/browser/components/preferences/home.js b/browser/components/preferences/home.js
@@ -65,6 +65,14 @@ if (Services.prefs.getBoolPref("browser.settings-redesign.enabled")) {
type: "bool",
},
{
+ id: "browser.newtabpage.activity-stream.feeds.topsites",
+ type: "bool",
+ },
+ {
+ id: "browser.newtabpage.activity-stream.topSitesRows",
+ type: "int",
+ },
+ {
id: "browser.newtabpage.activity-stream.feeds.section.highlights",
type: "bool",
},
@@ -128,6 +136,16 @@ if (Services.prefs.getBoolPref("browser.settings-redesign.enabled")) {
visible: ({ timerEnabled }) => timerEnabled.value,
});
+ // Shortcuts
+ Preferences.addSetting({
+ id: "shortcuts",
+ pref: "browser.newtabpage.activity-stream.feeds.topsites",
+ });
+ Preferences.addSetting({
+ id: "shortcutsRows",
+ pref: "browser.newtabpage.activity-stream.topSitesRows",
+ });
+
// Recent activity
Preferences.addSetting({
id: "recentActivity",
diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js
@@ -1205,6 +1205,39 @@ let SETTINGS_CONFIG = {
control: "moz-toggle",
},
{
+ id: "shortcuts",
+ l10nId: "home-prefs-shortcuts-header",
+ control: "moz-toggle",
+ items: [
+ {
+ id: "shortcutsRows",
+ control: "moz-select",
+ options: [
+ {
+ value: 1,
+ l10nId: "home-prefs-sections-rows-option",
+ l10nArgs: { num: 1 },
+ },
+ {
+ value: 2,
+ l10nId: "home-prefs-sections-rows-option",
+ l10nArgs: { num: 2 },
+ },
+ {
+ value: 3,
+ l10nId: "home-prefs-sections-rows-option",
+ l10nArgs: { num: 3 },
+ },
+ {
+ value: 4,
+ l10nId: "home-prefs-sections-rows-option",
+ l10nArgs: { num: 4 },
+ },
+ ],
+ },
+ ],
+ },
+ {
id: "recentActivity",
l10nId: "home-prefs-recent-activity-header",
control: "moz-toggle",