Commit Graph

135 Commits

Author SHA1 Message Date
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
Daisuke Akatsuka
1fbb4715ba Bug 1824253: Set enabling/disabling urlbar engagement telemetry via Server Knobs r=mak,TravisLong
Differential Revision: https://phabricator.services.mozilla.com/D173494
2023-04-04 21:57:47 +00:00
Barret Rennie
f7a4fadf48 Bug 1788954 - Convert toolkit/components/nimbus to ES modules r=Standard8,pip-reviewers,credential-management-reviewers,sgalich
Differential Revision: https://phabricator.services.mozilla.com/D172850
2023-03-30 20:51:58 +00:00
Dale Harvey
8fd00bf813 Bug 1822326 - Add ability to configure maximum trending suggestions. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D172766
2023-03-17 11:41:28 +00:00
Drew Willcoxon
f5dc21ef86 Bug 1819797 - Update telemetry for navigational suggestions and dynamic Wikipedia and add subtypes to quick suggest results. r=daleharvey
This adds a bunch of scalars to record navigational suggestions telemetry as
discussed with data science and described in the spec. These scalars are
different from the other Suggest ones because we want to record how nav
suggestions interact with the heuristic result. Unlike the existing scalars, the
keys of these new scalars are the types of heuristics that were shown when a nav
suggestion was or wasn't shown. One of the scalars is updated every time a nav
suggestion is *not* shown, and of course for most users that will be the vast
majority of the time or all the time, so I put all these scalars behind a Nimbus
variable. We'll set the variable to true in the control and treatment branches
of the nav suggestions experiment.

This patch also makes sure nav suggestions are recorded properly in Glean, as
`navigational`. I noticed that dynamic Wikipedia results are currently recorded
as `suggest_non_sponsor`, so I also added a new `dynamic_wikipedia` Glean type
for them. They're also recorded as `urlbar.picked.quicksuggest` in the legacy
telemetry, so I also changed it so they're recorded as
`urlbar.picked.dynamic_wikipedia`.

Currently for dynamic Wikipedia, the non-sponsored scalars are also incremented,
and I discussed with data science whether they and the sponsored scalars should
be incremented for all the new Suggest suggestion types we now have. We agreed
that they should be reserved for the usual partner sponsored and expanded
Wikipedia suggestions, and they should not be used for these new Suggest types,
so this patch also makes that change, and it does not update the non-sponsored
scalars for nav suggestions either.

The other major change this makes is to add a new `subtype` property to quick
suggest result payloads. I think we need a clear, simple way to distinguish
between all these various Suggest suggestion types that doesn't depend on
examining different payload properties depending on the type.

Differential Revision: https://phabricator.services.mozilla.com/D171525
2023-03-08 01:11:02 +00:00
Drew Willcoxon
288cba8be0 Bug 1817038 - Move weather suggestion keywords to Nimbus. r=daisuke
This reverts the changes from D168757 bug 1814795 related to remote settings. It
moves the weather keywords from the config in remote settings to a new Nimbus
variable called `weatherKeywords`. Bug 1817038 has more context.

It also adds another variable called `weatherKeywordsMinimumLength` that lets
the user type prefixes of the keywords instead of the full strings. This is
similar to how sponsored and Wikipedia suggestion keywords contain prefixes,
except here Firefox is computing the prefixes from the full keywords instead of
assuming that the prefixes are in the keyword data.

It also removes the `weather.zeroPrefix` pref added in D168757. Instead, the
weather suggestion is triggered on zero prefix if a Nimbus experiment isn't
active or if the experiment doesn't define `weatherKeywords`.

Finally, it makes one unrelated change: The user's search string can now contain
trailing spaces and still match a weather keyword. I don't think it makes sense
for the weather suggestion to be shown when you type "weather" but then it goes
away after you type a space.

Differential Revision: https://phabricator.services.mozilla.com/D169977
2023-03-03 23:51:54 +00:00
Daisuke Akatsuka
3957aa642a Bug 1817196: Record preference value that affects the number of results showing in the urlbar r=mak
Differential Revision: https://phabricator.services.mozilla.com/D170317
2023-02-28 21:02:35 +00:00
Stanca Serban
590cfe9a89 Backed out changeset e7a8fb56745e (bug 1817196) as requested by dev for missing data-review. CLOSED TREE 2023-02-28 11:40:18 +02:00
Daisuke Akatsuka
b4d694fef0 Bug 1817196: Record preference value that affects the number of results showing in the urlbar r=mak
Differential Revision: https://phabricator.services.mozilla.com/D170317
2023-02-28 00:51:46 +00:00
Dale Harvey
9ab0547f24 Bug 1811931 - Add support for trending suggestions. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D167618
2023-02-23 10:07:08 +00:00
Dão Gottwald
572c566454 Bug 1813517 - Add hidden pref for allowing Tab to skip over the menu button. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D170267
2023-02-22 11:16:44 +00:00
Rob Wu
0d4d932c70 Bug 1784662 - Reduce time spent in browser_ext_omnibox.js test r=willdurand,adw
This is a test-only change. It introduces a new Urlbar pref to make the
existing 3000 ms timeout configurable.

That timeout is currently reached 8 times in the test. That means that
the test will take at least 3 x 8 = 24 seconds to run while basically
doing nothing, and makes the test prone to reach the deadline by which
the test is declared timed-out.

To avoid "Test timed out" errors, the test now reduces the fixed 3000 ms
timeout to 500 ms, so now we wait for 8x500 = 4 seconds instead of 24.

Differential Revision: https://phabricator.services.mozilla.com/D169846
2023-02-17 18:20:01 +00:00
Gregory Pappas
1297ba6415 Bug 1814980 - Remove MAX_OMNIBOX_RESULT_COUNT r=adw
MAX_OMNIBOX_RESULT_COUNT was introduced	in bug 1267810 to increase compatibility with Chromium.	It no longer serves this purpose as Chromium has since removed its limit of 6 extension-supplied results.

Differential Revision: https://phabricator.services.mozilla.com/D168891
2023-02-07 20:07:45 +00:00
Noemi Erli
351eeb9146 Backed out changeset d4b852d0732c (bug 1814980) for causing xpc failures in test_providerOmnibox.js 2023-02-07 17:52:58 +02:00
Gregory Pappas
41124daa50 Bug 1814980 - Remove MAX_OMNIBOX_RESULT_COUNT r=adw
MAX_OMNIBOX_RESULT_COUNT was introduced	in bug 1267810 to increase compatibility with Chromium.	It no longer serves this purpose as Chromium has since removed its limit of 6 extension-supplied results.

Differential Revision: https://phabricator.services.mozilla.com/D168891
2023-02-07 14:30:31 +00:00
Drew Willcoxon
5f9e3b5752 Bug 1814795 - Support keyword-based weather suggestions in addition to zero-prefix. r=daisuke
This adds a new pref, `browser.urlbar.weather.zeroPrefix`. When true, weather
suggestions are shown on "zero prefix" like they are now, which means they're
shown when the user focuses the urlbar and before they type anything. When the
pref is false, the weather provider will show suggestions only if the search
string matches a keyword in a set of keywords managed by `QuickSuggest.weather`.

My plan is to store the keywords in the quick suggest config object in remote
settings. Nan suggested this too. Currently the config does not contain any
keywords, but this patch can be tested by setting the pref to false, running the
following in the browser console, and then typing "weather" in the urlbar:

```lang=js
ChromeUtils.importESModule("resource:///modules/QuickSuggest.sys.mjs")
  .QuickSuggest.remoteSettings._test_setConfig({
    weather_keywords: ["weather"],
  });
```

Other changes:

* It's possible for a keyword to match both the weather suggestion and a quick
  suggest suggestion. Only the weather suggestion should be shown. This patch
  modifies to the muxer for that.
* This modifies `UrlbarView.#rowLabel()` to show the "Top pick" (a.k.a. best
  match) label for keyword-based weather suggestions, in addition to zero-prefix
  suggestions like we currently do.
* This modifies the remote settings client so it becomes enabled when keyword-
  based weather suggestions are enabled, so that the config can be accessed.

Depends on D168738

Differential Revision: https://phabricator.services.mozilla.com/D168757
2023-02-07 02:26:55 +00:00
Dale Harvey
0438990a06 Bug 1812152 - Add pref to control minimum chars needed to match quickaction. r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D167713
2023-01-28 23:12:43 +00:00
Daisuke Akatsuka
72aca246e7 Bug 1725045: Remove browser.urlbar.resultGroups pref. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D167889
2023-01-26 23:10:19 +00:00
Daisuke Akatsuka
5e04583fb5 Bug 1791657: Show page title if it is in places. r=adw,mak
Depends on D159243

Differential Revision: https://phabricator.services.mozilla.com/D157891
2023-01-24 22:35:15 +00:00
Mark Banner
2bd093b567 Bug 1811334 - Automatically replace Cu.reportError with console.error (most of browser/components). r=settings-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D167297
2023-01-20 17:49:21 +00:00
Mark Banner
df47c60747 Bug 1806359 - Convert telemetry imports to direct ES imports. r=necko-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,janerik,mconley,sgalich,bytesized,kershaw
Differential Revision: https://phabricator.services.mozilla.com/D165002
2022-12-23 12:37:07 +00:00
Daisuke Akatsuka
ea23c8fcc3 Bug 1804314: Introduce persisted_search_terms_* interaction type. r=mak,jteow
Differential Revision: https://phabricator.services.mozilla.com/D163803
2022-12-19 03:32:17 +00:00
Norisz Fay
5cbd726d6d Backed out changeset d6454f53dcc0 (bug 1804314) for causing mochitest failures on browser_glean_telemetry CLOSED TREE 2022-12-19 01:40:31 +02:00
Daisuke Akatsuka
ab22a1563a Bug 1804314: Introduce persisted_search_terms_* interaction type. r=mak,jteow
Differential Revision: https://phabricator.services.mozilla.com/D163803
2022-12-18 22:21:26 +00:00
Daisuke Akatsuka
fc77179b9f Bug 1805112: Make Nimbus experiments allow telemetry recording to be enabled. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D164427
2022-12-13 01:50:51 +00:00
Mark Banner
06c5ee8204 Bug 1804661 - Convert browser/components/BrowserGlue.jsm to an ES module. r=Gijs,settings-reviewers,perftest-reviewers,sparky
Differential Revision: https://phabricator.services.mozilla.com/D164204
2022-12-12 14:59:18 +00:00
Daisuke Akatsuka
42601e6a91 Bug 1800579: Implement the impression event. r=mak,Dexter
Differential Revision: https://phabricator.services.mozilla.com/D162085
2022-12-07 06:35:50 +00:00
Cristian Tuns
6d439f9c19 Backed out 2 changesets (bug 1800579) for causing mochitest failures on browser_glean_telemetry_impression_interaction.js
Backed out changeset 329d79c6403b (bug 1800579)
Backed out changeset 2796c110119d (bug 1800579)
2022-12-06 17:08:20 -05:00
Daisuke Akatsuka
6d66275743 Bug 1800579: Implement the impression event. r=mak,Dexter
Differential Revision: https://phabricator.services.mozilla.com/D162085
2022-12-06 20:48:39 +00:00
Ryan VanderMeulen
3b189f8efc Backed out changeset af2c13b9fdb7 (bug 1801244) per developer request. 2022-12-05 16:38:55 -05:00
Daisuke Akatsuka
f12f72c9eb Bug 1797265: Implement the engagement event. r=mak,adw,Dexter
Differential Revision: https://phabricator.services.mozilla.com/D160193
2022-12-01 12:05:48 +00:00
Hanna Jones
f147294407 Bug 1794823 - port site specific search from pine to central r=daleharvey
Some random thoughts:
* This is a minimal implementation - there were plans to expand this with autocomplete support that we never got around to
* I built this just from reading docs + poking around in the urlbar code, so there might be a more desireable way to do all of this
* We've gone back and forth between calling this "contextual search" and "site specific search," we should probably pick a name and stick to it
* There were never any design specs for this so the UI/UX was based off of existing urlbar results as they appeared in Flowstate
* There were some open questions around how we treat installing opensearch engines, since how they are handled here seems to differ from how we use them elsewhere
* I don't remember the reasoning for showing this result last in the urlbar, we may want to move it elsewhere

Differential Revision: https://phabricator.services.mozilla.com/D159052
2022-11-25 15:17:08 +00:00
Drew Willcoxon
73c6ffb1df Bug 1801244 - Make Merino opt out on Beta. r=daisuke,nanj,RyanVM,chutten
This makes Merino opt out on Beta. There are two different parts:

1. Decide what "Beta" means. After discussing this with RyanVM, I'm using the
   same definition [used by telemetry](https://searchfox.org/mozilla-central/rev/2f47e3dacf0d773e9c7f363cecf10cfbea490679/toolkit/components/telemetry/app/TelemetryControllerBase.jsm#103,112-114): (a) if `MOZ_UPDATE_CHANNEL` is "beta"
   or (b) if it's "release" and `app.update.channel` is "beta". The latter case
   is true for RC builds delivered to the Beta channel. I moved the relevant
   telemetry logic to `AppConstants` so I can easily use it too. Bug 1435753 has
   context on this logic w/r/t telemetry.
2. Change the Merino default so it's enabled on Beta in the offline scenario. I
   kept the online scenario's disabled default since the only point of
   delivering the online scenario to the user now is to prompt them to opt in to
   Merino. This change is in UrlbarPrefs.sys.mjs.

The rest of the patch updates tests.

The effect of this patch will be to use a new default value of true for the
`quicksuggest.dataCollection.enabled` pref on Beta in the offline scenario. If
the user didn't touch the pref at all, then its previous default value was
false, and the new default will now be true.

If the user enabled the pref, it will remain enabled. If the user enabled and
then disabled it, it will remain disabled. That's because the pref is sticky, so
once it has a value on the user branch, it will keep that value. This patch only
changes the value of the pref on the default branch, so it won't override the
user's previous choice since that is set on the user branch.

Differential Revision: https://phabricator.services.mozilla.com/D162353
2022-11-22 06:19:24 +00:00
Dão Gottwald
f745f36b17 Bug 1790019 - Implement placeholder urlbar result menu button and popup. r=mak,fluent-reviewers,flod,jteow
Differential Revision: https://phabricator.services.mozilla.com/D161776
2022-11-18 20:14:46 +00:00
Drew Willcoxon
26a76fee34 Bug 1799363 - Add weather suggestions to quick suggest. r=daisuke
This adds a weather feature to quick suggest. It periodically fetches a weather
suggestion from Merino. UrlbarProviderQuickSuggest shows the suggestion when the
search string is empty ("zero prefix").

The implementation of the UrlbarResult returned by UrlbarProviderQuickSuggest is
only temporary. Mandy is working on the final UI in
[SNT-323](https://mozilla-hub.atlassian.net/browse/SNT-323). Landing a temporary
implementation allows Mandy to base her patch on it and trigger real weather
suggestions from Merino to test her implementation against. It also lets people
on the team test weather suggestions without having to wait for the final UI to
land.

I added the following prefs and Nimbus variable to control the feature. It will
initially be rolled out in an experiment, so we need a Nimbus variable. In the
initial experiment, users will be able to dismiss the suggestion but not toggle
a checkbox in about:preferences.

* `weatherFeatureGate` - Nimbus variable that controls the whole feature
* `browser.urlbar.weather.featureGate` - Fallback pref for the Nimbus variable
* `browser.urlbar.suggest.weather` - When the feature gate pref is true, this
  determines whether the suggestion should be shown. In a future patch, we'll
  flip this to false when users dismiss the suggestion.

I set the fetch interval to 30 minutes. That seems reasonable considering that
the suggestion contains the current temperature and weather. Merino will set
caching headers appropriately so that Firefox won't actually make a new network
request if the previously fetched suggestion is new enough.

Depends on D161368

Differential Revision: https://phabricator.services.mozilla.com/D161410
2022-11-17 05:04:07 +00:00
Cristian Tuns
0fdc1821ce Backed out changeset 053963c15ffe (bug 1799363) for causing xpcshell failures on test_weather.js CLOSED TREE 2022-11-16 14:00:59 -05:00
Drew Willcoxon
48330effac Bug 1799363 - Add weather suggestions to quick suggest. r=daisuke
This adds a weather feature to quick suggest. It periodically fetches a weather
suggestion from Merino. UrlbarProviderQuickSuggest shows the suggestion when the
search string is empty ("zero prefix").

The implementation of the UrlbarResult returned by UrlbarProviderQuickSuggest is
only temporary. Mandy is working on the final UI in
[SNT-323](https://mozilla-hub.atlassian.net/browse/SNT-323). Landing a temporary
implementation allows Mandy to base her patch on it and trigger real weather
suggestions from Merino to test her implementation against. It also lets people
on the team test weather suggestions without having to wait for the final UI to
land.

I added the following prefs and Nimbus variable to control the feature. It will
initially be rolled out in an experiment, so we need a Nimbus variable. In the
initial experiment, users will be able to dismiss the suggestion but not toggle
a checkbox in about:preferences.

* `weatherFeatureGate` - Nimbus variable that controls the whole feature
* `browser.urlbar.weather.featureGate` - Fallback pref for the Nimbus variable
* `browser.urlbar.suggest.weather` - When the feature gate pref is true, this
  determines whether the suggestion should be shown. In a future patch, we'll
  flip this to false when users dismiss the suggestion.

I set the fetch interval to 30 minutes. That seems reasonable considering that
the suggestion contains the current temperature and weather. Merino will set
caching headers appropriately so that Firefox won't actually make a new network
request if the previously fetched suggestion is new enough.

Depends on D161368

Differential Revision: https://phabricator.services.mozilla.com/D161410
2022-11-16 17:59:23 +00:00
James Teow
d6dddd38a9 Bug 1798793 - Add search tip message for showSearchTerms feature - r=adw,fluent-reviewers,flod
The showSearchTerms feature has a search tip that should appear
on the users default search engine results page.

The design and copy for the feature are in this Figma file:
https://www.figma.com/file/Ock0cYjzi7I1GmcctqOr9K/Search-settings-updates?node-id=352%3A9183

Differential Revision: https://phabricator.services.mozilla.com/D161186
2022-11-09 18:36:08 +00:00
James Teow
57cbb18445 Bug 1779470 - Part 1: Add Nimbus variable, feature gate preference, and rename showSearchTerms prefs - r=adw
Differential Revision: https://phabricator.services.mozilla.com/D159462
2022-11-05 02:13:28 +00:00