Commit Graph

3670 Commits

Author SHA1 Message Date
Punam Dahiya
9bdd1e1bb4 Bug 1937178 - Move ShortURL.sys.mjs and SearchShortcuts.sys.mjs functionality outside of newtab r=search-reviewers,home-newtab-reviewers,urlbar-reviewers,scunnane,jteow,mconley
Differential Revision: https://phabricator.services.mozilla.com/D235828
2025-01-30 18:20:22 +00:00
Daisuke Akatsuka
b4ba8024cc Bug 1481157: Prioritize native edit command over content access key r=adw,masayuki
Differential Revision: https://phabricator.services.mozilla.com/D235607
2025-01-30 06:18:54 +00:00
Drew Willcoxon
6a9635076a Bug 1944441 - Move AMP timestamp template handling into AmpSuggestions. r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D235901
2025-01-30 00:17:35 +00:00
Yazan Al Macki
0801b78851 Bug 1942623 - Add support for exponentiation operation in urlbar calculator. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D234837
2025-01-28 14:29:20 +00:00
Yazan Al Macki
0b1aec3a3d Bug 1943272 - Update support icon protocol list in UrlbarUtils to match places. r=mak,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D235285
2025-01-28 14:25:51 +00:00
Drew Willcoxon
d384f73795 Bug 1943795 - Add BlockedSuggestions.blockResult() and don't set originalUrl unnecessarily. r=daisuke
Depends on D235389

Differential Revision: https://phabricator.services.mozilla.com/D235549
2025-01-27 23:24:43 +00:00
Drew Willcoxon
d7e7109d75 Bug 1943473 - Always set isSponsored on Suggest results and refactor "can add suggestion?" logic. r=daisuke
This makes a few changes:

Make sure we always set `result.payload.isSponsored` and base it on
`SuggestProvider.isSuggestionSponsored()` so that it's really clear. With that
change, we don't need to set `suggestion.is_sponsored` anymore. (I'm trying to
stop modifying suggestion objects so much because it's hard to follow.)

Don't call `feature.makeResult()` if the feature is disabled. I'm kind of
surprised we don't do this already, but it's always worked out in the end due to
a few reasons: (1) Some `feature.makeResult()` implementations return null if
their prefs are disabled (effectively duplicating their `shouldEnable` logic),
(2) we don't query the Rust component for disabled suggestions, and (3)
`#canAddSuggestion()` returns null if sponsored/nonsponsored suggestions are
disabled.

Replace `#canAddSuggestion()` with `#canAddResult()`. The logic can be
simplified and is easier to follow if we always deal with results instead of
suggestions. Examples: (1) We can check `result.payload.isSponsored` instead of
having to also set and check `suggestion.is_sponsored`. (2) When checking for
blocked suggestions, we can check `result.payload.originalUrl` instead of
leaking `suggestion.rawUrl` from the Rust component.

Differential Revision: https://phabricator.services.mozilla.com/D235389
2025-01-27 23:24:41 +00:00
Punam Dahiya
f04cd402d9 Bug 1942898 - Decouple UrlbarProviderTopSites.sys.mjs from Reducers.sys.mjs r=home-newtab-reviewers,urlbar-reviewers,mconley,jteow
Differential Revision: https://phabricator.services.mozilla.com/D235645
2025-01-27 22:36:27 +00:00
Marco Bonardo
c00a7f33e3 Bug 1943946 - Set deduplication days threshold to zero. r=mbeier
Differential Revision: https://phabricator.services.mozilla.com/D235609
2025-01-27 16:04:12 +00:00
Sylvestre Ledru
b588c53a93 Bug 1943936 - codespell 2.4.0: typo fixes r=linter-reviewers,profiler-reviewers,canaltinova,ahal
Differential Revision: https://phabricator.services.mozilla.com/D235601
2025-01-27 15:28:31 +00:00
Mike Conley
e9c91b99ec Bug 1941026 - Decouple tippytop from the newtab codebase and move under the topsites component. r=pdahiya,jteow,home-newtab-reviewers,urlbar-reviewers,nbarrett
Differential Revision: https://phabricator.services.mozilla.com/D235316
2025-01-24 15:16:59 +00:00
Alexandru Marc
9596ea4d17 Backed out changeset a2f2005b8637 (bug 1943272) for causing xpcshell failures @ test_autofill_originsAndQueries.js CLOSED TREE 2025-01-24 09:37:55 +02:00
Yazan Al Macki
f5edb7966f Bug 1908929 - Change the heuristic search result icon to the search glass. r=urlbar-reviewers,mak
Differential Revision: https://phabricator.services.mozilla.com/D235264
2025-01-24 06:47:37 +00:00
Yazan Al Macki
80518491a8 Bug 1943272 - Update support icon protocol list in UrlbarUtils to match places. r=mak,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D235285
2025-01-24 06:45:38 +00:00
Drew Willcoxon
80d78f6a5b Bug 1943460 - Document ml_yelp in metrics.yaml. r=daisuke,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D235374
2025-01-23 23:21:04 +00:00
Drew Willcoxon
44aeb0a311 Bug 1943211 - Make SuggestFeature.shouldEnable check enablingPreferences. r=daisuke
This patch makes it unnecessary for most features to have to override
`shouldEnable`. Instead, the Suggest framework will check `enablingPreferences`
plus a new property called `additionalEnablingPredicate`. Summary:

* Include Nimbus variables in `enablingPreferences`
* Add a new property to `SuggestFeature` called `additionalEnablingPredicate`
* Make `shouldEnable` call `enablingPreferences` and
  `additionalEnablingPredicate`
* Remove `shouldEnable` implementations on most features

Differential Revision: https://phabricator.services.mozilla.com/D235251
2025-01-23 21:53:29 +00:00
Mark Banner
99ef8eb766 Bug 1942099 - Clean up search entries in Nimbus' FeatureManifest.yml. r=search-reviewers,scunnane
Differential Revision: https://phabricator.services.mozilla.com/D234535
2025-01-23 16:37:40 +00:00
Alexandru Marc
c501a4a8b0 Bug 1883249 - Disable browser_search_continuation.js on windows opt for frequent failures r=intermittent-reviewers,urlbar-reviewers,jmaher,jteow DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D235093
2025-01-23 06:55:07 +00:00
Drew Willcoxon
7cdc4133bf Bug 1942222 - Hook up the AMP-suggestion-matching strategy and add a Nimbus variable for it. r=daisuke
Depends on D233983, D234787

Differential Revision: https://phabricator.services.mozilla.com/D234637
2025-01-21 02:29:15 +00:00
Drew Willcoxon
92fbc49d02 Bug 1942435 - Fix dismissals for Merino suggestions that aren't managed by a Suggest feature. r=daisuke
I don't think we have any tests specifically for Merino suggestions that don't
correspond to Suggest features, i.e., suggestions with a Merino provider that is
technically unrecognized by Firefox. Dynamic Wikipedia suggestions and
navigational suggestions (a.k.a. top sites) are two examples. So I added tasks
for both sponsored and nonsponsored suggestions to make sure they're disabled
when the relevant pref is disabled, in addition to testing this bug itself.

Differential Revision: https://phabricator.services.mozilla.com/D234787
2025-01-21 02:29:14 +00:00
Gijs Kruitbosch
5de5c03cf0 Bug 1915402 - use 127.0.0.1 for 0.0.0.0 access from the address bar to make life easier for web devs, r=valentin,mak,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D224116
2025-01-20 13:57:21 +00:00
Aristide Tossou
4e136c6b12 Bug 1941704 - Align Performance and End-to-End Tests for the ML Engine with Production Behavior - r=tarek,urlbar-reviewers,cgopal,credential-management-reviewers,dimi
Differential Revision: https://phabricator.services.mozilla.com/D234266
2025-01-20 13:27:11 +00:00
Marco Bonardo
4df8ef3f30 Bug 1939597 - Search open tabs feature doesn't find ERROR pages. r=adw,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D234470
2025-01-18 13:06:06 +00:00
Butkovits Atila
62de37b9ee Backed out changeset 0784e5fc89cd (bug 1941704) for causing failures at browser_ml_model.js. CLOSED TREE 2025-01-17 17:02:40 +02:00
Aristide Tossou
10aaecc9fb Bug 1941704 - Align Performance and End-to-End Tests for the ML Engine with Production Behavior - r=tarek,urlbar-reviewers,cgopal
Differential Revision: https://phabricator.services.mozilla.com/D234266
2025-01-17 13:13:39 +00:00
Drew Willcoxon
467f411aef Bug 1941161 - Add a quick-suggest-deletion-request ping. r=daisuke,TravisLong,nanj
This builds on D233752 and submits a deletion-request ping when either AMP
suggestions or the entire Suggest feature becomes disabled.

`context_id` is sent in this new ping just like the `quick-suggest` ping.

Depends on D233752

Differential Revision: https://phabricator.services.mozilla.com/D233983
2025-01-17 02:34:39 +00:00
Drew Willcoxon
184df61911 Bug 1940808 - Condition the quick-suggest ping on AMP suggestions being enabled. r=daisuke,TravisLong,nanj,data-stewards
Differential Revision: https://phabricator.services.mozilla.com/D233752
2025-01-17 02:34:39 +00:00
Drew Willcoxon
31209ed783 Bug 1941990 - Allow SuggestProvider to manage at most one Rust suggestion type. r=daisuke
With D234449 fixed, we can change `SuggestProvider.rustSuggestionTypes` (plural)
to `rustSuggestionType` (singular). We can remove `isRustSuggestionTypeEnabled`
too because it's assumed that if the feature itself is enabled then its Rust
suggestions are too. I don't expect we'll ever need to break that assumption,
but if we do, we can just add back `isRustSuggestionTypeEnabled` at that time.

Depends on D234449

Differential Revision: https://phabricator.services.mozilla.com/D234450
2025-01-17 02:34:38 +00:00
Drew Willcoxon
5f4b628014 Bug 1941989 - Split AdmWikipedia into two modules and send the quick-suggest ping only for AMP suggestions. r=daisuke
This makes two major changes:

Split `AdmWikipedia` into `AmpSuggestions` and `OfflineWikipediaSuggestions`. I
included "offline" in the name because Merino also serves Wikipedia suggestions,
but they're the so-called "dynamic Wikipedia" suggestions served from
Elasticsearch, and they have never been managed by a
`BaseFeature`/`SuggestFeature` in Firefox.

Send the `quick-suggest` ping only for AMP suggestions, in `AmpSuggestions`.
Stop sending it for offline Wikipedia suggestions. @bholley and I discussed this
on the data-review@mozilla.com list after I emailed it for the senstive data
review in D233752 [1]. We only use the ping for AMP suggestions, and Wikipedia
telemetry should follow the usual data opt-out. @nanj agreed the ping isn't
necessary for Wikipedia.

[1] https://groups.google.com/a/mozilla.com/g/data-review/c/BC2JKaXA7nA

Depends on D234440

Differential Revision: https://phabricator.services.mozilla.com/D234449
2025-01-17 02:34:38 +00:00
Drew Willcoxon
18185b4a92 Bug 1941694 - Remove the quick_suggest_ingest_time telemetry metric. r=daisuke
Depends on D234258

Differential Revision: https://phabricator.services.mozilla.com/D234440
2025-01-17 02:34:37 +00:00
Joel Maher
bcc50efbeb Bug 1940980 - Green up win11-64 opt/debug/asan/ccov. r=aryx,media-playback-reviewers,pip-reviewers,credential-management-reviewers,devtools-reviewers,tabbrowser-reviewers,urlbar-reviewers,aosmond,mconley,ochameau,dimi,jteow,mtigley
Differential Revision: https://phabricator.services.mozilla.com/D233862
2025-01-16 23:02:48 +00:00
James Teow
e18fba3011 Bug 1941467 - Allow Scotch Bonnet pref to toggle Persisted Search preference visibility - r=daleharvey,settings-reviewers,mossop
I also removed the Nimbus feature since there are no future plans to
run experiments solely on this feature.

Differential Revision: https://phabricator.services.mozilla.com/D234135
2025-01-16 16:54:14 +00:00
Drew Willcoxon
b94d477cab Bug 1941692 - Rename and clean up the browser_telemetry_other.js Suggest test. r=daisuke
This renames `browser_telemetry_other.js` to `browser_telemetry_environment.js`
since it only tests `TelemetryEnvironment` now.

A few tasks do the same thing (with different pref values), so I also factored
that out into a `doToggleTest()` helper.

Also, there are some chunks in this test that don't actually do anything
anymore, so I've removed them. Those chunks were modified in bug 1921748 due to
removal of some legacy telemetry events, and we should have removed them then
but it was my fault for not realizing that.

Depends on D234257

Differential Revision: https://phabricator.services.mozilla.com/D234258
2025-01-16 02:13:37 +00:00
Drew Willcoxon
66ae338430 Bug 1941690 - Clean up Suggest telemetry tests related to the quick-suggest ping. r=daisuke
The Suggest tests that use `doTelemetryTest()` only test the `quick-suggest`
ping now due to the fact we removed most Suggest legacy telemetry recently. To
make that clearer, this revision renames those tests and the helper functions.
It also simplifies the helper params since they don't need to test anything
other than the ping.

Depends on D233980

Differential Revision: https://phabricator.services.mozilla.com/D234257
2025-01-16 02:13:37 +00:00
Daisuke Akatsuka
2c3a6253fe Bug 1938142: Enable ScotchBonnet for browser_searchMode_excludeResults.js test r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D234311
2025-01-15 22:20:38 +00:00
mcheang
4f8ec35c4b Bug 1648956 - Fix handling URLs with trailing quesiton marks. r=mak,urlbar-reviewers
Previously, URLs ending with a `?` were treated as search strings and redirected
the search to the default search engine.

This patch ensures the URL is visited instead of doing a search to the default
search engine. The search restrict token `?` is now ignored when it appears at
the end of the search string.

Differential Revision: https://phabricator.services.mozilla.com/D233311
2025-01-15 00:14:13 +00:00
Drew Willcoxon
2b358f9832 Bug 1941100 - Move quick-suggest ping submission from UrlbarProviderQuickSuggest to AdmWikipedia. r=daisuke
This makes a number of changes. The main point is to fix the bug, and I did some
refactoring to accomplish that. Summary of changes:

Move submission of the `quick-suggest` ping from `UrlbarProviderQuickSuggest` to
`AdmWikipedia`.

Add `SuggestProvider.onImpression()` and `onEngagement()`.
`UrlbarProviderQuickSuggest` forwards its own impression and engagement method
calls to the methods on the appropriate Suggest features. This is how
`AdmWikipedia` knows when to submit the ping.

Add a `details` param to `UrlbarProvider.onImpression()`, just like
`onEngagement()` already has. This is necessary because
`AdmWikipedia.onImpression()` needs to know whether the result was clicked since
that info is part of the impression ping.

Replace all `SuggestFeature.handleCommand()` implementations with
`onEngagement()`.

Remove `UrlbarProviderQuickSuggest.#dismissResult()`. The only suggestion types
that relied on it were AMP and Wikipedia. I replaced it with dismissal handling
in `AdmWikipedia.onEngagement()`.

Improve the related tests in a few ways: (1) Make the ping check more rigorous
(in `assertQuickSuggestPing()` in `head.js`), (2) simplify expected ping objects
(no more `type` and `payload` properties, just the properties that are expected
in the ping), (3) make `browser_telemetry_gleanEmptyStrings.js` more rigorous,
(4) factor out a helper function to trigger commands in xpcshell tests.

Differential Revision: https://phabricator.services.mozilla.com/D233980
2025-01-14 19:54:56 +00:00
Daisuke Akatsuka
f751bdcb33 Bug 1941464: Fix double setting the id of item r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D234126
2025-01-14 15:29:50 +00:00
Yazan Al Macki
4507fb96aa Bug 1925235 - Avoid updating unified search button icon if searchMode has changed. r=daleharvey,sessionstore-reviewers,dao
Currently, multiple calls to #updateSearchIcon can run concurrently. When restarting the browser with a tab , and another tab in which a local search mode is active, the local search mode is incorrectly displayed as the default engine search mode. I believe this is due to the first #updateSearchIcon call (default engine, triggered when new tab is reopened) taking longer than the subsequent #updateSearchIcon call (triggered when the search mode is restored).

This is probably due to [[ https://searchfox.org/mozilla-central/rev/b6718bf263ae780289da471f0ea35797a09e2f05/browser/components/urlbar/SearchModeSwitcher.sys.mjs#329-334 | this ]] code taking a while to execute in comparison to [[ https://searchfox.org/mozilla-central/rev/b6718bf263ae780289da471f0ea35797a09e2f05/browser/components/urlbar/SearchModeSwitcher.sys.mjs#338-342 | this ]] code that runs for local search modes.

Ensuring that an #updateSearchIcon call terminates if search mode switches during its async processing prevents it from interfering with the next call triggered and incorrectly overriding the icon.

Differential Revision: https://phabricator.services.mozilla.com/D233036
2025-01-14 14:34:05 +00:00
Marco Bonardo
20e3a689d9 Bug 1937136 - Let address bar trimHttps and untrim just be controlled by the ScotchBonnet override. r=jteow
Differential Revision: https://phabricator.services.mozilla.com/D233530
2025-01-13 15:26:23 +00:00
Marco Bonardo
6b17f6941a Bug 1937136 - Show the not-secure label in the address bar for http. r=jteow
Differential Revision: https://phabricator.services.mozilla.com/D233529
2025-01-13 15:26:22 +00:00
Daisuke Akatsuka
4f1c38adde Bug 1928997: Update tabs icon in Unified Search popup r=desktop-theme-reviewers,daleharvey,dao
Differential Revision: https://phabricator.services.mozilla.com/D233804
2025-01-13 04:32:44 +00:00
Butkovits Atila
ac928d48bf Backed out changeset a17f61626cba (bug 1928997) for causing failures at browser_searchMode_localOneOffs_actionText.js. CLOSED TREE 2025-01-13 04:29:25 +02:00
Daisuke Akatsuka
7bef269fe5 Bug 1928997: Update tabs icon in Unified Search popup r=desktop-theme-reviewers,daleharvey,dao
Differential Revision: https://phabricator.services.mozilla.com/D233804
2025-01-13 00:31:52 +00:00
Daisuke Akatsuka
ce31f00ad2 Bug 1938244: Re-enable browser_searchModeSwitcher_telemetry.js test for OSX r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D233767
2025-01-13 00:31:16 +00:00
Dale Harvey
c527181f28 Bug 1939547 - Show an onboarding label to first time quickactions users. r=daisuke,desktop-theme-reviewers,urlbar-reviewers,dao,flod
Differential Revision: https://phabricator.services.mozilla.com/D233023
2025-01-12 23:24:52 +00:00
Sandor Molnar
f776616d69 Backed out 2 changesets (bug 1297008) for causing M-vt failures @ browser_link_in_tab_title_and_url_prefilled_blank_page.js CLOSED TREE
Backed out changeset ce85088a9340 (bug 1297008)
Backed out changeset cd90c0935331 (bug 1297008)
2025-01-10 01:14:53 +02:00
Emma Zuehlcke
6efd13cb83 Bug 1297008 - Tests, r=mak,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D232520
2025-01-09 17:49:10 +00:00
Emma Zuehlcke
5ca6a4bb43 Bug 1297008, r=mak,Gijs,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D226694
2025-01-09 17:49:09 +00:00
Moritz Beier
8e4a84f631 Bug 1938567 - Update Unified Search Button icon after default private engine changes. r=urlbar-reviewers,daisuke
Differential Revision: https://phabricator.services.mozilla.com/D232728
2025-01-09 09:17:26 +00:00