Allow features that use dynamic Rust suggestions to be their own SuggestProvider
Categories
(Firefox :: Address Bar, task, P1)
Tracking
()
People
(Reporter: adw, Assigned: adw)
References
(Regressed 1 open bug)
Details
(Whiteboard: [sng])
Attachments
(2 files)
|
48 bytes,
text/x-phabricator-request
|
Details | Review | |
|
48 bytes,
text/x-phabricator-request
|
phab-bot
:
approval-mozilla-beta+
|
Details | Review |
Now that we have two relatively complex uses cases for dynamic Rust suggestions, realtime/carrots opt-in suggestions and important-dates suggestions, it's become clear that trying to handle them both in DynamicSuggestions.sys.mjs is a little messy and constricting.
In general, it would make a lot of sense for features that use dynamic Rust suggestions to be able to be their own proper SuggestProviders just like all others. They'll only use dynamic suggestions under the hood. That way, they can also easily have their own prefs that they're gated behind too, so we don't have to rely on the quicksuggest.dynamicSuggestionTypes pref.
Updated•7 months ago
|
| Assignee | ||
Comment 1•7 months ago
|
||
This adds a new getter to SuggestProvider called dynamicRustSuggestionType.
When a feature manages a dynamic Rust suggestion type, its getter should return
the value of the suggestion_type field in their RS records. That will tell
Suggest that it uses dynamic Rust suggestions, and Suggest will keep track of it
separately from the other Rust providers.
Similarly, this adds a new suggestion and result payload property called
secondaryProvider. It's only used for dynamic Rust suggestions and will be set
to suggestion_type too. So when we need to look up the feature that manages a
dynamic Rust suggestion, we use secondaryProvider to connect it to the feature
whose dynamicRustSuggestionType is the same value. It's just like
suggestion.provider except it's one level down.
| Assignee | ||
Comment 4•7 months ago
|
||
This adds a new getter to SuggestProvider called dynamicRustSuggestionTypes.
When a feature manages a dynamic Rust suggestion type, its getter should return
the values of the suggestion_type field in their RS records. That will tell
Suggest that it uses dynamic Rust suggestions, and Suggest will keep track of it
separately from the other Rust providers.
Original Revision: https://phabricator.services.mozilla.com/D261320
Updated•7 months ago
|
Updated•7 months ago
|
Updated•7 months ago
|
Updated•7 months ago
|
Description
•