commit aa0c7ca1b4325c17a2e25bafd0fc1d5498e14625 parent b5ac7753b2fa5c3b8dc7294acec0b906d995e791 Author: Nina Pypchenko <npypchenko@mozilla.com> Date: Tue, 11 Nov 2025 22:58:47 +0000 Bug 1999162 - Remove "Trending Searches" component from Settings r=home-newtab-reviewers,mconley Differential Revision: https://phabricator.services.mozilla.com/D271916 Diffstat:
4 files changed, 1 insertion(+), 28 deletions(-)
diff --git a/browser/components/preferences/home.inc.xhtml b/browser/components/preferences/home.inc.xhtml @@ -99,7 +99,6 @@ <vbox id="web-search" /> <vbox id="weather" /> - <vbox id="trending-searches" /> <vbox id="topsites" /> <vbox id="topstories" /> <vbox id="support-firefox" /> diff --git a/browser/extensions/newtab/lib/AboutPreferences.sys.mjs b/browser/extensions/newtab/lib/AboutPreferences.sys.mjs @@ -39,28 +39,6 @@ const PREFS_FOR_SETTINGS = () => [ ), }, { - id: "trending-searches", - pref: { - feed: "trendingSearch.enabled", - titleString: "home-prefs-trending-search-header", - descString: "home-prefs-trending-search-description", - }, - eventSource: "TRENDING_SEARCH", - shouldHidePref: - // Hide if Trending Search experiment is not enabled for this user - !Services.prefs.getBoolPref( - "browser.newtabpage.activity-stream.system.trendingSearch.enabled", - false - ) || - // Also hide if it's enabled but the user doesn't have Google as their default search engine - (Services.prefs.getBoolPref( - "browser.newtabpage.activity-stream.system.trendingSearch.enabled", - false - ) && - Services.prefs.getStringPref("browser.urlbar.placeholderName", "") !== - "Google"), - }, - { id: "topsites", pref: { feed: "feeds.topsites", diff --git a/browser/extensions/newtab/test/unit/lib/AboutPreferences.test.js b/browser/extensions/newtab/test/unit/lib/AboutPreferences.test.js @@ -131,7 +131,7 @@ describe("AboutPreferences Feed", () => { await instance.observe(window, PREFERENCES_LOADED_EVENT); // Render all the prefs - assert.callCount(renderPreferenceSection, 7); + assert.callCount(renderPreferenceSection, 6); // Show or hide the "Restore defaults" button depending on prefs assert.calledOnce(toggleRestoreDefaults); diff --git a/browser/locales/en-US/browser/preferences/preferences.ftl b/browser/locales/en-US/browser/preferences/preferences.ftl @@ -788,10 +788,6 @@ home-prefs-weather-header = home-prefs-weather-description = Today’s forecast at a glance home-prefs-weather-learn-more-link = Learn more -home-prefs-trending-search-header = - .label = Trending searches -home-prefs-trending-search-description = Popular and frequently searched topics - # Lists is a widget on New Tab, similar to a to-do widget home-prefs-lists-header = .label = Lists