AddonSuggestions.sys.mjs |
A feature that supports Addon suggestions.
|
7821 |
AdmWikipedia.sys.mjs |
A feature that manages sponsored adM and non-sponsored Wikpedia (sometimes
called "expanded Wikipedia") suggestions in remote settings.
|
10749 |
BaseFeature.sys.mjs |
Base class for quick suggest features. It can be extended to implement a
feature that is part of the larger quick suggest feature and that should be
enabled only when quick suggest is enabled.
You can extend this class as an alternative to implementing your feature
directly in `QuickSuggest`. Doing so has the following advantages:
- If your feature is gated on a Nimbus variable or preference, `QuickSuggest`
will manage its lifetime automatically. This is really only useful if the
feature has state that must be initialized when the feature is enabled and
uninitialized when it's disabled.
- Encapsulation. You can keep all the code related to your feature in one
place, without mixing it with unrelated code and cluttering up
`QuickSuggest`. You can also test it in isolation from `QuickSuggest`.
- Remote settings management. You can register your feature with
`QuickSuggestRemoteSettings` and it will be called at appropriate times to
sync from remote settings.
- If your feature also serves suggestions from remote settings, you can
implement one method, `queryRemoteSettings()`, to hook into
`UrlbarProviderQuickSuggest`.
- Your feature will automatically get its own logger.
To register your subclass with `QuickSuggest`, add it to the `FEATURES` const
in QuickSuggest.sys.mjs.
|
11676 |
BlockedSuggestions.sys.mjs |
A set of blocked suggestions for quick suggest.
|
5219 |
ExposureSuggestions.sys.mjs |
A feature for exposure suggestions.
|
2392 |
FakespotSuggestions.sys.mjs |
A feature that supports Fakespot suggestions.
|
9604 |
GeolocationUtils.sys.mjs |
Utils for fetching the client's geolocation from Merino, computing distances
between locations, and finding suggestions that best match the geolocation.
|
9825 |
ImpressionCaps.sys.mjs |
Impression caps and stats for quick suggest suggestions.
|
15098 |
MDNSuggestions.sys.mjs |
A feature that supports MDN suggestions.
|
5767 |
MLSuggest.sys.mjs |
MLSuggest helps with ML based suggestions around intents and location.
|
13746 |
PocketSuggestions.sys.mjs |
A feature that manages Pocket suggestions in remote settings.
|
10364 |
SuggestBackendJs.sys.mjs |
The Suggest JS backend. Not used when the Rust backend is enabled.
|
14472 |
SuggestBackendMl.sys.mjs |
The Suggest ML backend. Both the ML and Rust backends can be enabled at the
same time. Features can support both backends and decide which one to use per
query.
|
2735 |
SuggestBackendRust.sys.mjs |
The Suggest Rust backend. Not used when the remote settings JS backend is
enabled.
This class returns suggestions served by the Rust component. These are the
primary related architectural pieces (see bug 1851256 for details):
(1) The `suggest` Rust component, which lives in the application-services
repo [1] and is periodically vendored into mozilla-central [2] and then
built into the Firefox binary.
(2) `suggest.udl`, which is part of the Rust component's source files and
defines the interface exposed to foreign-function callers like JS [3, 4].
(3) `RustSuggest.sys.mjs` [5], which contains the JS bindings generated from
`suggest.udl` by UniFFI. The classes defined in `RustSuggest.sys.mjs` are
what we consume here in this file. If you have a question about the JS
interface to the Rust component, try checking `RustSuggest.sys.mjs`, but
as you get accustomed to UniFFI JS conventions you may find it simpler to
refer directly to `suggest.udl`.
(4) `config.toml` [6], which defines which functions in the JS bindings are
sync and which are async. Functions default to the "worker" thread, which
means they are async. Some functions are "main", which means they are
sync. Async functions return promises. This information is reflected in
`RustSuggest.sys.mjs` of course: If a function is "worker", its JS
binding will return a promise, and if it's "main" it won't.
[1] https://github.com/mozilla/application-services/tree/main/components/suggest
[2] https://searchfox.org/mozilla-central/source/third_party/rust/suggest
[3] https://github.com/mozilla/application-services/blob/main/components/suggest/src/suggest.udl
[4] https://searchfox.org/mozilla-central/source/third_party/rust/suggest/src/suggest.udl
[5] https://searchfox.org/mozilla-central/source/toolkit/components/uniffi-bindgen-gecko-js/components/generated/RustSuggest.sys.mjs
[6] https://searchfox.org/mozilla-central/source/toolkit/components/uniffi-bindgen-gecko-js/config.toml
|
20570 |
Weather.sys.mjs |
A feature that periodically fetches weather suggestions from Merino.
|
13923 |
YelpSuggestions.sys.mjs |
A feature for Yelp suggestions.
|
18725 |