Commit Graph

223 Commits

Author SHA1 Message Date
Dão Gottwald
4160ef5c85 Bug 1852056 - [Firefox Suggest Opt-in Experiment] Implement layout for opt-in UI after one-off button row. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D193437
2023-11-14 20:31:19 +00:00
Dão Gottwald
d8353059ce Bug 1852055 - [Firefox Suggest Opt-in Experiment] Implement opt-in UI at the top of the results list. r=daleharvey,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D193198
2023-11-10 11:28:14 +00:00
Cosmin Sabou
7ad28e385c Backed out changeset 41043c74e42a (bug 1860548) for bc failures on browser_quicksuggest_addons.js. CLOSED TREE 2023-11-08 01:06:14 +02:00
Karandeep
a919ed09a3 Bug 1860548 - Enable the URL Paste Suggestion feature by default in Nightly. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D191868
2023-11-07 15:14:38 +00:00
Drew Willcoxon
148a53ad56 Bug 1827966 - Part 4: Remove resultMenu pref and support for dismiss and help buttons. r=dao,fluent-reviewers,desktop-theme-reviewers
Depends on D190894, D190846

Differential Revision: https://phabricator.services.mozilla.com/D190895
2023-10-13 21:52:07 +00:00
Marc Seibert
d102db072b Bug 1479858 - Added option for UrlBar search open tabs to ignore userContextId.r=mak,dao
Oiriginal patch author: Paresh Malalur <atararx@gmail.com>

Differential Revision: https://phabricator.services.mozilla.com/D187465
2023-10-13 08:48:46 +00:00
Drew Willcoxon
e47b4dcd5b Bug 1858553 - Remove the merinoEnabled Nimbus variable and fallback pref. r=daisuke
Depends on D190745

Differential Revision: https://phabricator.services.mozilla.com/D190746
2023-10-12 15:50:50 +00:00
Drew Willcoxon
57b0f17880 Bug 1858549 - Remove the quickSuggestRemoteSettingsEnabled Nimbus variable and fallback pref. r=daisuke
Depends on D190742

Differential Revision: https://phabricator.services.mozilla.com/D190745
2023-10-12 15:50:50 +00:00
Drew Willcoxon
f9f954cc37 Bug 1858547 - Remove the quickSuggestBlockingEnabled Nimbus variable and fallback pref. r=daisuke
Depends on D190516

Differential Revision: https://phabricator.services.mozilla.com/D190742
2023-10-12 15:50:50 +00:00
Drew Willcoxon
234916db20 Bug 1857391 - Remove Firefox Suggest "best match" as its own separate feature. r=daisuke,settings-reviewers
This removes "best match" as its own separate Firefox Suggest feature. In the
future, whether or not a suggestion is a best match (a.k.a. top pick) will be
determined by relevant product requirements. I've confirmed this with Nive.

Here's a summary of changes:

* Removes prefs and Nimbus variables related to best match
* Removes the "Top pick" checkbox in about:preferences
* Removes support for the `best_match` quick suggest config property. This
  property was removed from the config in remote settings a while ago.
* Removes legacy telemetry scalars related to best match. These scalars were
  added years ago for the original best match experiment and before we started
  using Glean. In the case of non-sponsored suggestions, the scalars have not
  been recorded at all for some time. In the case of sponsored suggestions, they
  can now be recorded again due to the recent addition of sponsored priority
  suggestions, but they are superseded by Glean.

Differential Revision: https://phabricator.services.mozilla.com/D190516
2023-10-11 17:17:06 +00:00
Karandeep
b4cba16887 Bug 1853910 - Remove Legacy Event Telemetry Dependencies. r=mak,extension-reviewers,robwu
Depends on D188721

Differential Revision: https://phabricator.services.mozilla.com/D189558
2023-10-11 07:45:13 +00:00
Dale Harvey
9aed4a17ff Bug 1852848 - Implement recent searches provider. r=mak,fluent-reviewers,flod,settings-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D189104
2023-10-11 00:06:32 +00:00
Drew Willcoxon
17f4082056 Bug 1857396 - Use the update timer manager to periodically perform ingestion in the Suggest Rust component. r=daisuke
This uses the update timer manager (`nsIUpdateTimerManager`) to periodically
ingest. This is the same mechanism the desktop remote settings client uses.
Please see the bug for more info on the update timer manager. I left some notes
there.

I chose the same 24-hour interval that the remote settings client uses. So
overall, this should give us pretty much the same update behavior we have with
remote settings in the JS backend.

Differential Revision: https://phabricator.services.mozilla.com/D190384
2023-10-10 02:28:54 +00:00
Stanca Serban
341caf1e76 Backed out 2 changesets (bug 1853910) for causing mochitests failures in browser_ext_urlbar_attributionURL.js. CLOSED TREE
Backed out changeset eea288462cbb (bug 1853910)
Backed out changeset 75543d7d4250 (bug 1853910)
2023-10-07 00:17:27 +03:00
Karandeep
45ddb19915 Bug 1853910 - Remove Legacy Event Telemetry Dependencies. r=mak,extension-reviewers,robwu
Differential Revision: https://phabricator.services.mozilla.com/D189558
2023-10-06 12:33:14 +00:00
Drew Willcoxon
926cb1a6e5 Bug 1857137 - Convert addon suggestions from dynamic to standard results. r=daisuke,desktop-theme-reviewers,dao
This converts addon suggestions from dynamic to standard results and removes
support for review stars. Other things worth noting:

* I removed `suggestion.is_top_pick` support because addons should always be top
  picks. This lets us simplify the code and tests.
* This changes the overall icon box size for addons from 60px to 52px, since it
  combines the icon rules for Pocket and addons. I checked with Josh, and he
  says that's fine ([Slack](https://mozilla.slack.com/archives/C03LYL79G82/p1696471328852089?thread_ts=1696446640.986769&cid=C03LYL79G82))
* Currently the default `-webkit-line-clamp` is 3 and MDN and Pocket rows
  override it by setting it to 2. I think the opposite makes more sense, i.e.
  the default should be 2, since there are no row types that need it to be 3.
  This lets me avoid adding a rule for addon rows. (`-webkit-line-clamp` was
  added in D185247)

Depends on D190138

Differential Revision: https://phabricator.services.mozilla.com/D190145
2023-10-06 04:21:31 +00:00
Drew Willcoxon
f5ec50f5ae Bug 1854059 - Convert Suggest remote settings component to a BaseFeature. r=daisuke
This converts `QuickSuggestRemoteSettings` into a `BaseFeature` so that it can
be managed by `QuickSuggest` and easily enabled and disabled depending on
whether the new Rust component is enabled.

Summary of major changes:

* Rename `QuickSuggestRemoteSettings` to `SuggestBackendJs` and make it a
  `BaseFeature`. In D188684 I'll also add a new `SuggestBackendRust` feature.
* Introduce a `quickSuggestRustEnabled` Nimbus variable. The JS backend will be
  disabled if this variable is true. Nothing else uses the variable in this
  patch but D188684 does.
* Move `DEFAULT_SUGGESTION_SCORE` to `UrlbarProviderQuickSuggest` and make the
  provider ensure all suggestions have scores.

Differential Revision: https://phabricator.services.mozilla.com/D188681
2023-09-26 05:15:29 +00:00
Drew Willcoxon
538d1e2bd5 Bug 1851940 - Enable addon suggestions by default with treatment B (no stars) for all Suggest users. r=daisuke
This enables addon suggestions by default (treatment B, no stars) for all
Suggest users. As discussed on Slack, I did not remove the related prefs and
Nimbus variables in case something goes wrong and we need to disable the feature
ASAP. In that case, we can ship a Nimbus rollout to re-disable it. After a
release cycle or two without any problems, we can do a follow-up that removes
them. I also left the treatment A implementation. We can remove that in a
follow-up too.

Since I did leave the prefs and variables, I only had to change their default
values to enable the feature with treatment B.

One problem is that addon suggestions should be best matches, but we don't want
to set `bestMatch.enabled` to true by default. To work around that, I set the
related best-match properties on the `UrlbarResult` inside `AddonSuggestions`
instead of delegating it to the quick suggest provider. Product has requested
that we remove the "Top pick" checkbox from about:preferences, and at that time
we should also remove the `bestMatch.enabled` pref. In the future, results
should be best matches on a case-by-case basis.

This makes a few UI changes that aren't strictly related but I wanted to fix
since more users will now see these suggestions:

* Cache the "Firefox extension" group label to prevent pop-in.
* Align the URL and row title by baseline. Right now the URL is too high above
  the title.
* Set `inline-margin-end` of the icon so it's symmetrical with the starting
  margin/padding. The current value of 8px is hardcoded and too small.

Differential Revision: https://phabricator.services.mozilla.com/D187640
2023-09-07 05:04:06 +00:00
Dale Harvey
95ab1ce9c9 Bug 1848048 - Add a result menu to disable trending results. r=dao,fluent-reviewers,settings-reviewers,flod,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D187066
2023-09-01 08:38:54 +00:00
Marc Seibert
3b461e98a2 Bug 1067293 - Omit "https://".r=dao
Differential Revision: https://phabricator.services.mozilla.com/D184933
2023-08-09 22:27:21 +00:00
Cristian Tuns
064737db44 Backed out changeset e99b30fd0931 (bug 1067293) for causing bc failures in browser_preferences_usage.js CLOSED TREE 2023-08-08 20:40:06 -04:00
Marc Seibert
6447bd4fab Bug 1067293 - Omit "https://".r=dao
Differential Revision: https://phabricator.services.mozilla.com/D184933
2023-08-08 19:19:57 +00:00
Karandeep
bd53812278 Bug 1846028 - Add .featureGate pref to clipboard suggestion. r=mak
Depends on D184502

Differential Revision: https://phabricator.services.mozilla.com/D184934
2023-08-01 11:51:59 +00:00
Karandeep
b0382c3163 Bug 1842230 - URL bar suggested action for paste when clipboard contains valid URL. r=mak,flod
Differential Revision: https://phabricator.services.mozilla.com/D183747
2023-08-01 11:51:59 +00:00
Daisuke Akatsuka
1a5f430183 Bug 1844495: Implement base of MDN Suggestions r=adw,dao
Differential Revision: https://phabricator.services.mozilla.com/D184075
2023-07-28 00:15:27 +00:00
Iulian Moraru
d0c6f20550 Backed out changeset 058d7fc0c711 (bug 1844495) for causing bc failures on browser_quicksuggest_mdn.js. CLOSED TREE 2023-07-28 02:05:53 +03:00
Daisuke Akatsuka
623872b9c8 Bug 1844495: Implement base of MDN Suggestions r=adw,dao
Differential Revision: https://phabricator.services.mozilla.com/D184075
2023-07-27 20:33:57 +00:00
Drew Willcoxon
15ceeed7e0 Bug 1837097 - Implement "Show less frequently" behavior for Pocket suggestions. r=daisuke
Same as addon suggestions.

Depends on D182632

Differential Revision: https://phabricator.services.mozilla.com/D182606
2023-07-05 15:47:24 +00:00
mcheang
719249fa5b Bug 1840558 - Remove autofill search engines code. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D182163
2023-06-29 12:36:08 +00:00
James Teow
a17069d865 Bug 1840376 - Remove outstanding references to Preloaded Top URLs - r=adw
Differential Revision: https://phabricator.services.mozilla.com/D182195
2023-06-29 08:18:27 +00:00
Drew Willcoxon
bd2145522d Bug 1839558 - Allow suggestion scores to be specified in Nimbus. r=daisuke
This adds a `quickSuggestScoreMap` Nimbus variable that lets experiments
override suggestion scores. It maps from telemetry types to score values. For
example:

```
"quickSuggestScoreMap": {
  "amo": 0.25,
  "adm_sponsored": 0.3
}
```

In this example, addon suggestions will always have a score of 0.25, and
sponsored suggestions will always have a score of 0.3. Of course, different
branches within an experiment and different experiments can set different
scores.

While working on this, I saw we have a bug when we try to look up the
`BaseFeature` for a result. To do the lookup, we look up the result's
`telemetryType` in `FEATURE_NAMES_BY_TELEMETRY_TYPE`. That's a problem for `adm`
suggestions because the `telemetryType` will be either `adm_sponsored` or
`adm_nonsponsored`, but neither of those is present in
`FEATURE_NAMES_BY_TELEMETRY_TYPE` -- only `adm` is.

To fix it, I added back the `provider` property to result payloads that I
previously removed, and I added `BaseFeature.merinoProvider` so each feature can
specify its Merino provider. Then, `QuickSuggest` can build a map from Merino
provider names to features, allowing us to look up features without needing to
hardcode something like `FEATURE_NAMES_BY_TELEMETRY_TYPE` or
`FEATURE_NAMES_BY_MERINO_PROVIDER`.

Since I added back the `provider` property, I had to update a lot of tests. (As
a follow up, it would be nice to centralize the creation of expected result
objects in the test helper.)

I also added `BaseFeature.getSuggestionTelemetryType()` to help implement the
score map and to better formalize the idea that telemetry types are an important
property that all quick suggest results should include.

Differential Revision: https://phabricator.services.mozilla.com/D181709
2023-06-22 03:55:40 +00:00
Mark Banner
0677cff70b Bug 1838155 - Clean up some console.error calls that had been migrated from Cu.reportError. r=jdescottes,perftest-reviewers,geckoview-reviewers,credential-management-reviewers,search-reviewers,sgalich,owlish,jteow,sparky
This goes through the previous changes in the dependencies of bug 877389, and does two things:
1) Remove instances of \n
2) Change reporting of exceptions so that they are passed as separate arguments. This should result
   in an improved display of the exception in the browser console, should it occur.

Differential Revision: https://phabricator.services.mozilla.com/D180843
2023-06-15 08:33:57 +00:00
James Teow
5eccd3fe6f Bug 1837239 - Remove the Preloaded Top URLs feature - r=adw
Differential Revision: https://phabricator.services.mozilla.com/D180246
2023-06-13 18:27:12 +00:00
Drew Willcoxon
3fd234d2a0 Bug 1836903 - Implement Pocket suggestions. r=daisuke,desktop-theme-reviewers,dao
This implements most parts of Pocket suggestions. They don't need any special UI
or a dynamic result type because they're only shown as the usual best match rows
or non-best match rows.

Still to do:

* Implement the "Show less frequently" behavior once we decide what the keywords
  will be and how that will work.
* Implement the bottom "Mozilla Pocket" text inside the suggestion row once it's
  finalized. We can use the same technique we use to show the "Sponsored" bottom
  text for adM suggestions.

Other changes this makes:

* Replace the `type=bestmatch` attribute with an `bestmatch` attribute. That
  lets best-match rows have a `type` too, in this case `"pocket"` (actually
  either `"rs_pocket"` or `"merino_pocket"`, since I'm using the telemetry
  result type).
* Improve how UrlbarProviderQuickSuggest delegates to individual features when
  getting result commands, view updates, handling commands, etc., so that we
  don't need to add new `case` statements for each new type of suggestion.

Differential Revision: https://phabricator.services.mozilla.com/D180059
2023-06-07 20:19:44 +00:00
Drew Willcoxon
5299a47663 Bug 1836582 - Update the matching behavior of addon suggestions. r=daisuke
This implements the new required matching behavior, which isn't based on min
keyword length anymore. This is how it works:

* Use the full keywords in remote settings to generate keywords that contain the
  first word plus each possible substring after the first word. For example if a
  full keyword is "video download", then generate these keywords: "video",
  "video ", "video d", "video do", etc. If a full keyword is only one word, then
  use it as is. The keywords never change even when the user clicks "Show less
  frequently". This is implemented in `onRemoteSettingsSync()`, and I modified
  `SuggestionsMap.add()` to make it easy to generate new keywords from the
  strings in `suggestion.keywords`.
* Keep track of the number of times the user clicked "Show less frequently" in
  `showLessFrequentlyCount`.
* When a suggestion is fetched from the suggestions map, filter it out if the
  search string isn't long enough given the `showLessFrequentlyCount`. This is
  done in `makeResult()`.

Other changes:

* I made some of the private properties in `AddonSuggestions` public so that the
  xpcshell test can easily use them. I think it's OK for them to be public.
* Added `show_less_frequently_cap` to the RS config object so that we can
  specify a cap in RS as well as Nimbus.
* mv'ed test_quicksuggest_addResults.js to test_suggestionsMap.js, since I
  modified this file. I should have done that back when I replaced `addResults()`
  with `SuggestionsMap`.
* Fixed a bug in `SuggestionsMap.add()` where the same suggestion could be added
  multiple times to the array stored in the map, if it had duplicate keywords.

Differential Revision: https://phabricator.services.mozilla.com/D179867
2023-06-05 20:49:21 +00:00
Daisuke Akatsuka
ca0b872595 Bug 1836005: Implement second UI treatment for addon suggestions r=adw,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D179528
2023-05-31 23:35:59 +00:00
Mark Banner
0666077666 Bug 1826062 - Automatic fixes for upgrading Prettier to 2.8.8. r=mossop,perftest-reviewers,webcompat-reviewers,geckoview-reviewers,denschub,devtools-reviewers,sparky,calu
Differential Revision: https://phabricator.services.mozilla.com/D177027
2023-05-20 12:26:53 +00:00
Daisuke Akatsuka
2bffcba0e3 Bug 1833553: Add browser.urlbar.suggest.addons pref r=adw
Differential Revision: https://phabricator.services.mozilla.com/D178286
2023-05-18 02:21:44 +00:00
Daisuke Akatsuka
ecbdc5d8f5 Bug 1832474: Implement addon suggestions result menu r=adw,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D177852
2023-05-15 12:25:06 +00:00
Dale Harvey
a8d49a9e03 Bug 1826447 - Initial support for Rich Suggestions. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D174693
2023-05-11 21:27:36 +00:00
Daisuke Akatsuka
45268fa4c7 Bug 1828610: Implement addon suggestions r=desktop-theme-reviewers,adw,fluent-reviewers,flod,dao
Differential Revision: https://phabricator.services.mozilla.com/D176114
2023-05-10 20:04:38 +00:00
Drew Willcoxon
bb4aa2ec5c Bug 1831689 - Add a pref for the weather suggestion to ignore VPNs and fetch anyway. r=daisuke
Depends on D177218

Differential Revision: https://phabricator.services.mozilla.com/D177339
2023-05-08 09:08:43 +00:00
Drew Willcoxon
7a78f112c8 Bug 1831657 - Implement the "Show less frequently" weather suggestion command. r=daisuke
This increments the minimum keyword length when the user clicks the "Show less
frequently" command for the weather suggestion. It adds a pref to keep track of
the current min length. If the pref is zero, we use the min length in Nimbus or
remote settings.

There is a limit to the number of times "Show less frequently" can be clicked.
This patch calls it the cap. Once the cap is reached, the min length can't be
incremented any more and the command is not shown in the menu again. The cap can
be set in Nimbus and remote settings.

This patch also modifies UrlbarPrefs by making it possible to remove observers.
`Weather` needs to listen for changes to the `weather.minKeywordLength` pref,
and when the weather feature is disabled, it needs to stop listening.

Depends on D175827

Differential Revision: https://phabricator.services.mozilla.com/D177218
2023-05-08 09:08:43 +00:00
Wil Stuckey
51509a8495 Bug 1819766 - Add support for exposure based experiments. r=adw
This change adds support for exposure based experiments by allowing
a Nimbus variable/pref to specify the urlbar provider that should
trigger an exposure event as well as a secondary boolean variable/pref
that controls the visibility of the exposed result. The exposure should
be registered when a result 'can be added' but may or may not be shown
based on the value of the `displayExposureProvider` variable.

* Add exposure event to metrics.yaml
* Add new Nimbus variable (`exposureProvider`) to specify the urlbar
  providers that should trigger exposure events .
* Add new Nimbus variable (`displayExposureProvider`) that controls the visibility
  of the provider results that matched the `exposureProvider` variable.

Differential Revision: https://phabricator.services.mozilla.com/D174209
2023-04-24 20:04:21 +00:00
Mathew Hodson
5a881a3345 Bug 1828563 - Update consumers to use FeatureManifest ESM. r=barret
Differential Revision: https://phabricator.services.mozilla.com/D175725
2023-04-24 09:54:19 +00:00
Daisuke Akatsuka
f86902192d Bug 1824253: Set enabling/disabling urlbar engagement telemetry via Server Knobs r=mak,TravisLong
Differential Revision: https://phabricator.services.mozilla.com/D173494
2023-04-18 11:14:02 +00:00
Butkovits Atila
a17dfaf669 Backed out changeset 4a9917fd8fb6 (bug 1824253) for causing failures at browser_glean_telemetry_abandonment_groups.js. CLOSED TREE 2023-04-18 03:37:43 +03:00
Daisuke Akatsuka
1cbb840277 Bug 1824253: Set enabling/disabling urlbar engagement telemetry via Server Knobs r=mak,TravisLong
Differential Revision: https://phabricator.services.mozilla.com/D173494
2023-04-17 22:27:08 +00:00
Dão Gottwald
53481047f1 Bug 1827904 - Enable the result menu by default on all channels. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D175362
2023-04-13 17:37:19 +00:00
Cristian Tuns
98739b9dc7 Backed out changeset c53de63f9b5f (bug 1824253) landed a bit ahead of schedule CLOSED TREE 2023-04-05 13:48:20 -04:00