Update the weather suggestions implementation to account for Rust
Categories
(Firefox :: Address Bar, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox124 | --- | fixed |
People
(Reporter: adw, Assigned: adw)
References
Details
Attachments
(1 file)
Weather, UrlbarProviderQuickSuggest, and related tests need updating to account for weather suggestions being implemented in Rust (bug 1877300).
Assignee | ||
Comment 1•10 months ago
|
||
This patch requires https://github.com/mozilla/application-services/pull/6089,
which hasn't been vendored yet, so it will be hard to test unless you locally
vendor. I've done that and verified that weather tests still pass.
Weather suggestions in Rust work like this: Rust stores the weather keywords in
the keywords
table, and when the query matches a keyword, it returns a dummy
Weather
suggestion that only contains a score. That means weather suggestions
are handled nearly like every other type of suggestion, except when Firefox
receives a weather suggestion from Rust, it must replace it with the actual
suggestion from Merino.
We also need to continue to support weather keywords defined in Nimbus. For
that, this patch continues to use UrlbarProviderWeather
because I don't want
to add a special case to UrlbarProviderQuickSuggest
just for this one type of
suggestion. When we stop experimenting with weather, we can remove that
provider.
I moved all the common code from UrlbarProviderWeather
to Weather
so both
providers can use it.
Some of the tests check minKeywordLength
and can't use Rust yet. I'll handle
that in bug 1878444.
Depends on D200105
Description
•