commit 43db571e66d81ed58691994e453408607e1ce6c5
parent 679bd10fd984b1790c7c685e973c9df7ece14e4c
Author: Nina Pypchenko <npypchenko@mozilla.com>
Date: Thu, 13 Nov 2025 10:48:31 +0000
Bug 1998832 - Add the "Recent activity" section to Firefox Home settings r=home-newtab-reviewers,akulyk,reemhamz
Added "Recent activity" + related subsettings to newly redesigned "Firefox Home" section in about:settings#home.
Differential Revision: https://phabricator.services.mozilla.com/D272199
Diffstat:
3 files changed, 99 insertions(+), 0 deletions(-)
diff --git a/browser/components/preferences/home.js b/browser/components/preferences/home.js
@@ -64,6 +64,26 @@ if (Services.prefs.getBoolPref("browser.settings-redesign.enabled")) {
id: "browser.newtabpage.activity-stream.widgets.focusTimer.enabled",
type: "bool",
},
+ {
+ id: "browser.newtabpage.activity-stream.feeds.section.highlights",
+ type: "bool",
+ },
+ {
+ id: "browser.newtabpage.activity-stream.section.highlights.rows",
+ type: "int",
+ },
+ {
+ id: "browser.newtabpage.activity-stream.section.highlights.includeVisited",
+ type: "bool",
+ },
+ {
+ id: "browser.newtabpage.activity-stream.section.highlights.includeBookmarks",
+ type: "bool",
+ },
+ {
+ id: "browser.newtabpage.activity-stream.section.highlights.includeDownloads",
+ type: "bool",
+ },
]);
// Search
@@ -107,6 +127,28 @@ if (Services.prefs.getBoolPref("browser.settings-redesign.enabled")) {
deps: ["timerEnabled"],
visible: ({ timerEnabled }) => timerEnabled.value,
});
+
+ // Recent activity
+ Preferences.addSetting({
+ id: "recentActivity",
+ pref: "browser.newtabpage.activity-stream.feeds.section.highlights",
+ });
+ Preferences.addSetting({
+ id: "recentActivityRows",
+ pref: "browser.newtabpage.activity-stream.section.highlights.rows",
+ });
+ Preferences.addSetting({
+ id: "recentActivityVisited",
+ pref: "browser.newtabpage.activity-stream.section.highlights.includeVisited",
+ });
+ Preferences.addSetting({
+ id: "recentActivityBookmarks",
+ pref: "browser.newtabpage.activity-stream.section.highlights.includeBookmarks",
+ });
+ Preferences.addSetting({
+ id: "recentActivityDownloads",
+ pref: "browser.newtabpage.activity-stream.section.highlights.includeDownloads",
+ });
}
var gHomePane = {
diff --git a/browser/components/preferences/main.js b/browser/components/preferences/main.js
@@ -1204,6 +1204,57 @@ let SETTINGS_CONFIG = {
l10nId: "home-prefs-timer-header",
control: "moz-toggle",
},
+ {
+ id: "recentActivity",
+ l10nId: "home-prefs-recent-activity-header",
+ control: "moz-toggle",
+ items: [
+ {
+ id: "recentActivityRows",
+ control: "moz-select",
+ controlAttrs: {
+ class: "newtab-rows-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: "recentActivityVisited",
+ l10nId: "home-prefs-highlights-option-visited-pages",
+ control: "moz-checkbox",
+ },
+ {
+ id: "recentActivityBookmarks",
+ l10nId: "home-prefs-highlights-options-bookmarks",
+ control: "moz-checkbox",
+ },
+ {
+ id: "recentActivityDownloads",
+ l10nId: "home-prefs-highlights-option-most-recent-download",
+ control: "moz-checkbox",
+ },
+ ],
+ },
],
},
zoom: {
diff --git a/browser/themes/shared/preferences/preferences.css b/browser/themes/shared/preferences/preferences.css
@@ -1380,6 +1380,12 @@ richlistitem .text-link:hover {
}
/** SRD web-appearance-chooser control END **/
+/** SRD rows control for New Tab START **/
+setting-group[groupid="home"] {
+ --select-max-width: 17rem;
+}
+/** SRD rows control for New Tab END **/
+
#translations-manage-install-list {
height: 220px;
overflow: auto;