fune/browser/components/urlbar/private
Drew Willcoxon 57f6fbd39c Bug 1854060 - Initial integration of the Suggest Rust component into desktop urlbar. r=daisuke
This builds on D188681 and adds a new `BaseFeature` called `SuggestBackendRust`.
When `quickSuggestRustEnabled` is true, `UrlbarProviderQuickSuggest` will use
`SuggestBackendRust` to fetch remote settings suggestions; otherwise it will use
`SuggestBackendJs`.

The Rust component is already integrated into desktop Firefox (bug 1851256, bug
1851845), and it's exposed to JS via `RustSuggest.sys.mjs`. Currently it only
supports AMP (sponsored, a.k.a. adM) and Wikipedia (non-sponsored) suggestions.

It's possible to configure the path of the Sqlite file created by the Rust
component. This patch uses `suggest.sqlite` in the user's local profile (cache)
directory.

This is only the initial integration. I can think of a few follow-ups:

* Handle icons. In this patch, results from `SuggestBackendRust` don't have
  icons at all. I have a WIP.
* Handle ingestion better. "Ingest" here means Firefox must tell the Rust
  component to re-fetch suggestions from remote settings and rebuild its Sqlite
  database. Unfortunately the Rust component doesn't keep the data updated by
  itself, so we'll need to periodically tell the component to ingest. This patch
  performs ingestion every time `SuggestBackendRust` is (re)enabled, which is a
  good enough start.
* Maybe handle tests better. For now I modified the main quick suggest unit
  test, test_quicksuggest.js, so it tests both backends. Other tests should
  maybe be updated too, I'm not sure yet.

Depends on D188681

Differential Revision: https://phabricator.services.mozilla.com/D188684
2023-09-26 05:15:30 +00:00
..
AddonSuggestions.sys.mjs Bug 1854059 - Convert Suggest remote settings component to a BaseFeature. r=daisuke 2023-09-26 05:15:29 +00:00
AdmWikipedia.sys.mjs Bug 1854060 - Initial integration of the Suggest Rust component into desktop urlbar. r=daisuke 2023-09-26 05:15:30 +00:00
BaseFeature.sys.mjs Bug 1854060 - Initial integration of the Suggest Rust component into desktop urlbar. r=daisuke 2023-09-26 05:15:30 +00:00
BlockedSuggestions.sys.mjs
ImpressionCaps.sys.mjs Bug 1854059 - Convert Suggest remote settings component to a BaseFeature. r=daisuke 2023-09-26 05:15:29 +00:00
MDNSuggestions.sys.mjs Bug 1854059 - Convert Suggest remote settings component to a BaseFeature. r=daisuke 2023-09-26 05:15:29 +00:00
PocketSuggestions.sys.mjs Bug 1854059 - Convert Suggest remote settings component to a BaseFeature. r=daisuke 2023-09-26 05:15:29 +00:00
SuggestBackendJs.sys.mjs Bug 1854059 - Convert Suggest remote settings component to a BaseFeature. r=daisuke 2023-09-26 05:15:29 +00:00
SuggestBackendRust.sys.mjs Bug 1854060 - Initial integration of the Suggest Rust component into desktop urlbar. r=daisuke 2023-09-26 05:15:30 +00:00
Weather.sys.mjs Bug 1854059 - Convert Suggest remote settings component to a BaseFeature. r=daisuke 2023-09-26 05:15:29 +00:00