Commit Graph

1824 Commits

Author SHA1 Message Date
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
Marc Seibert
d15d55c518 Bug 1736937 - Add "Search bookmarks" option in bookmarks menu. r=dao
https://treeherder.mozilla.org/jobs?repo=try&revision=f1324632dfb7201ad71fddb074ec7e008c32d153

Differential Revision: https://phabricator.services.mozilla.com/D175604
2023-04-17 10:31:35 +00:00
Marco Bonardo
891dc83559 Bug 1823450 - Allow autofill use origins alternative frecency. r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D174963
2023-04-14 15:19:32 +00:00
Drew Willcoxon
c26ec9b3d6 Bug 1827762 - Replace UrlbarProvider.pickResult() and blockResult() with onEngagement() r=mak
This removes `UrlbarProvider.pickResult()` and `blockResult()` in favor of
handling picks and dismissals through `onEngagement()`. A number of providers
use those two methods, so this revision touches a lot of files.

Handling dismissals through `onEngagement()` means `UrlbarInput.pickResult()`
can no longer tell whether a result is successfully dismissed, so it can't
remove the result anymore. (Maybe `onEngagement()` could return some value
indicating it dismissed the result, but I don't want to go down that road.)
Instead, I split `UrlbarController.handleDeleteEntry()` into two methods: a
public one that removes the result and notifies listeners, and a private one
that handles dismissing the selected result internally in
UrlbarController. Providers that have dismissable results should now implement
`onEngagement()` and call `controller.removeResult()`.

I made some other improvements to engagement handling. There's still room for
more but this patch is big enough already.

Other notable changes:

Include the engaged result in engagement notifications so providers have easy
access to it and can respond to clicks and dismissals more easily. That also
lets us stop passing `selIndex` and `provider` to `engagementEvent.record()`
since now it can compute those from the passed-in result.

Add the concept of `isSessionOngoing` to engagement notifications so providers
can tell whether an engagement ended the search session. Right now, providers
like quick suggest that record a bunch of provider-specific legacy telemetry
assume that `onEngagement()` ends the session, but that's no longer true.

Unify result buttons and result menu commands by setting
`element.dataset.command` on buttons (hopefully we can remove buttons soon, at
least the ones that aren't tip buttons)

Make sure we always notify providers on engagement even on dismissals or
when skipping legacy telemetry

Move dismissal of restyled search suggestions and history results from
`UrlbarController.handleDeleteEntry()` to the Places provider

Move dismissal of form history results from
`UrlbarController.handleDeleteEntry()` to the search suggestions provider

In the Places provider, remove the unused `_addSearchEngineMatch()` method. Also
remove the code in the "searchengine" case that creates a non-search-history
result. This code is unreached because the only time the provider creates a
"searchengine" match it also sets `isSearchHistory` to true.

In `UrlbarTestUtils.promiseAutocompleteResultPopup()`, change the default value
of the `fireInputEvent` param from false to true. This is necessary because
without a starting input event, the start event info in `engagementEvent` will
be null, so when `engagementEvent.record()` is called at the end of the
engagement, it will bail, and providers will not be notified of the engagement.
IMO true is a better default value anyway because input events will typically be
fired when the user performs a search.

Differential Revision: https://phabricator.services.mozilla.com/D174941
2023-04-13 06:03:33 +00:00
Daisuke Akatsuka
8530a48586 Bug 1823690: Change behavior of pasting data url r=adw
Differential Revision: https://phabricator.services.mozilla.com/D175023
2023-04-12 21:10:16 +00:00
James Teow
40ad3f14c3 Bug 1826884 - Don't show cached Top Picks if persisted search terms are present - r=adw
Differential Revision: https://phabricator.services.mozilla.com/D174929
2023-04-11 13:01:27 +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
Daisuke Akatsuka
fe945c896a Bug 1826184: Show go-button even if pasting multiline text on urlbar r=adw
The direct reason why the go-button was hidden when pasting text is that
"usertyping" attribute will not be true.
https://searchfox.org/mozilla-central/rev/8433b62e54fd30663e82f090c4d31554531a2e66/browser/base/content/browser.css#754
When pasting data and removing white space or line break, call preventDefault().
https://searchfox.org/mozilla-central/rev/8433b62e54fd30663e82f090c4d31554531a2e66/browser/components/urlbar/UrlbarInput.sys.mjs#3504-3505
The other hand, if not removing any chars, _on_input() will be called because
don't call preventDefault(). And, the attribute is set in _on_input().
https://searchfox.org/mozilla-central/rev/8433b62e54fd30663e82f090c4d31554531a2e66/browser/components/urlbar/UrlbarInput.sys.mjs#3343

So, we set the attribute even if pasting data is changed as same as _on_input().

Differential Revision: https://phabricator.services.mozilla.com/D174576
2023-04-04 21:40:24 +00:00
James Teow
6d9909060f Bug 1825642 - Hide the persist search tip when a Popup is visible - r=adw
Differential Revision: https://phabricator.services.mozilla.com/D174178
2023-04-03 03:29:55 +00:00
Abhishek Tiwari
aa15989557 Bug 1821106 - SearchEngine.getResultDomain's responseType parameter is never used and the function needs renaming r=Standard8
***
Bug 1821106 - SearchEngine.getResultDomain's responseType parameter is never used and the function needs renaming ,Comment is updated  r=standard8

Differential Revision: https://phabricator.services.mozilla.com/D172293
2023-03-31 20:27:18 +00:00
Drew Willcoxon
fcb5ce106e Bug 1825617 - Stop recording legacy nonsponsored scalars for weather suggestions. r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D174151
2023-03-30 22:26: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
Drew Willcoxon
0b3ffdfa49 Bug 1825432 - Don't reset engagement telemetry start event info on dismissal. r=mak
In the future, due to the result menu there may be other engagement types that
do not close the view, so we may need to revisit this, but for now the fix is
pretty simple.

Differential Revision: https://phabricator.services.mozilla.com/D174038
2023-03-30 15:49:01 +00:00
CanadaHonk
de0de3489c Bug 1801379 - Migrate Sinon.jsm to an ES module r=extension-reviewers,application-update-reviewers,pip-reviewers,credential-management-reviewers,fxview-reviewers,devtools-reviewers,Standard8,nchevobbe,sclements,dimi,mconley,bytesized,robwu
Migrated `testing/modules/Sinon.sys.mjs` to an ES module.

`testing` should now be 100% ESM 🎉

Differential Revision: https://phabricator.services.mozilla.com/D173643
2023-03-29 07:34:10 +00:00
Dale Harvey
543ce47074 Bug 1823543 - Add telemetry to distinguish trending results. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D173093
2023-03-28 13:28:44 +00:00
Dale Harvey
306b8b5efa Bug 1806090 - Give screenshot component more time to load. r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D173075
2023-03-22 20:10:13 +00:00
Drew Willcoxon
c9d60d14c4 Bug 1823831 - When a VPN is active, don't fetch the weather suggestion, and re-fetch when it's disconnected. r=daisuke
This detects when the user is on a VPN and treats it the same as when the user
is offline: If a fetch is triggered, `QuickSuggest.weather.suggestion` is set to
null, and when the VPN is disconnected, a new fetch is triggered.

That means if a successful fetch happens before the user connects to the VPN,
Firefox will continue to show that accurate suggestion for the full fetch period
(30 min), even after the user connects to the VPN. The first time a fetch is
attempted while the VPN is active, the suggestion will be set to null, and
Firefox will stop showing it. Once the user turns off the VPN, a new fetch will
be triggered and the new accurate suggestion will be shown.

Unfortunately Firefox's VPN detection only works on Windows.

If you need to test weather suggestions using a VPN, you can run the following
JS in the browser console first. It will disable VPN detection.

```
QuickSuggest._test_linkService = {};
```

Differential Revision: https://phabricator.services.mozilla.com/D173232
2023-03-22 17:31:28 +00:00
James Teow
18ca46e947 Bug 1815971 - Count number of times persisted search is viewed and reverted due to Popups - r=adw
Differential Revision: https://phabricator.services.mozilla.com/D172690
2023-03-22 13:59:06 +00:00
Drew Willcoxon
348b907b4e Bug 1823080 - Fetch the weather suggestion on a slight delay after wake. r=daisuke
This adds a delay after wake just like the delay after online notifications.
It's conceivable that online notifications might happen soon after the wake
notification. [Sync also does this](https://searchfox.org/mozilla-central/rev/ed93119be4818da1509bbcb7b28e245853eeedd5/services/sync/modules/policies.sys.mjs#528-534).

I renamed `cameOnlineDelayMs` to `fetchDelayAfterComingOnlineMs`. It's longer
but I think it's clearer. I don't think we need a separate delay ms for wake; we
can just use the same one that we use for online.

I also added a test for a wake notification followed by online notifications.

Differential Revision: https://phabricator.services.mozilla.com/D172892
2023-03-20 04:03:10 +00:00
Daisuke Akatsuka
3ca32ccb42 Bug 1822319: Add a test of behavior that user presses enter key to reload current url without selecting r=mak
Differential Revision: https://phabricator.services.mozilla.com/D172845
2023-03-17 08:37:52 +00:00
Drew Willcoxon
6e6f13a03f Bug 1822918 - Fetch the weather suggestion after wake and coming online. r=daisuke
This listens for some observer service notifications so we can re-fetch the
weather suggestion after wake and coming online, without having to wait for the
timer to fire. Please see the bug for background.

I changed the interval (repeating timer) to a timeout (non-repeating timer)
since the timer needs to be recreated on wake if the wake happens before the
start of the next fetch period.

Differential Revision: https://phabricator.services.mozilla.com/D172844
2023-03-17 04:33:55 +00:00
Daisuke Akatsuka
36f8079d27 Bug 1822210: Check wheather the view is opening when recording r=mak
Differential Revision: https://phabricator.services.mozilla.com/D172098
2023-03-15 21:51:12 +00:00
Daisuke Akatsuka
3fb17ccb59 Bug 1821660: Avoid showing result view to make the same behavior every time. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D172393
2023-03-15 21:15:01 +00:00
Cristina Horotan
0c8e508db4 Backed out changeset 4b929a47cf6a (bug 1822338) for causing bc failures at browser_glean_telemetry_engagement_type.js CLOSED TREE 2023-03-15 14:45:06 +02:00
Dão Gottwald
ac80f9c8f4 Bug 1822338 - Enable quick suggest and best match blocking when the result menu is enabled. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D172575
2023-03-15 11:03:19 +00:00
Daisuke Akatsuka
7c048856b3 Bug 1817208: Introduce search_shortcut_button type for immediate search on oneoff button r=mak
Differential Revision: https://phabricator.services.mozilla.com/D172207
2023-03-13 23:59:06 +00:00
Leila Kaltouma
19d3d0a258 Bug 1820880 - Convert toolkit/mozapps/update to import ES modules directly. r=Standard8,settings-reviewers,application-update-reviewers,bytesized
Depends on D172120

Differential Revision: https://phabricator.services.mozilla.com/D172121
2023-03-13 11:22:07 +00:00
Dão Gottwald
c1f29a857f Bug 1815889 - Enable quick suggest and best match blocking in Nightly and Earyl Beta. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D169332
2023-03-10 12:56:12 +00:00
Dão Gottwald
8b7b30f0a4 Bug 1790020 - Hook up urlbar result menu with telementry. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D168688
2023-03-09 12:02:13 +00:00
Cristina Horotan
1255ede78b Backed out changeset fcc4aae881d7 (bug 1790020) for causing bc failures at browser_ext_urlbar.js CLOSED TREE 2023-03-09 13:11:26 +02:00
Dão Gottwald
4d726892e1 Bug 1790020 - Hook up urlbar result menu with telementry. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D168688
2023-03-09 09:54:20 +00:00
Daisuke Akatsuka
b42908762e Bug 1820327: Record TAIL_SUGGESTION as search_suggest group r=mak
Differential Revision: https://phabricator.services.mozilla.com/D171947
2023-03-08 21:46:07 +00:00
Dale Harvey
e83e85de76 Bug 1819775 - Add icon for trending suggestions. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D171404
2023-03-08 21:00:27 +00:00
Stanca Serban
0edec904ef Backed out changeset e7822e311e0c (bug 1790020) for causing mochitests failures in browser/components/urlbar/tests/browser-tips/browser_searchTips_interaction.js. CLOSED TREE 2023-03-08 17:40:26 +02:00
Dão Gottwald
42c66fc8dd Bug 1790020 - Hook up urlbar result menu with telementry. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D168688
2023-03-08 14:22:31 +00:00
Daisuke Akatsuka
b30c8f79a4 Bug 1820453: Introduce unsortedResults to the query r=adw
Differential Revision: https://phabricator.services.mozilla.com/D171673
2023-03-08 02:30:33 +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
James Teow
5badf35776 Bug 1818848 - Use valid pageproxystate for persisted search terms when urlbar is un-focused - r=adw
Differential Revision: https://phabricator.services.mozilla.com/D170973
2023-03-07 22:08:32 +00:00
Daisuke Akatsuka
529ee1c6c1 Bug 1817206: Use visibleResults for telemetry instead of results in query r=adw,mak
Differential Revision: https://phabricator.services.mozilla.com/D171444
2023-03-07 21:27:07 +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
mcheang
b2a902585c Bug 1815699 - Modify existing Glean telemetry and add new telemetry to account for weather as a suggestion. r=adw
This patch modifies existing Glean urlbar abandonment, engagement, and
impression events by including a weather suggestion.

This patch also adds a new telemetry scalar url.picked.weather to the legacy
telemetry system.

Differential Revision: https://phabricator.services.mozilla.com/D169225
2023-03-01 19:06:49 +00:00
Daisuke Akatsuka
84b37bd253 Bug 1817931: Introduce experimental_addon in the result type r=mak
Differential Revision: https://phabricator.services.mozilla.com/D170475
2023-02-28 21:44:31 +00:00
Daisuke Akatsuka
e91bcc50b9 Bug 1790635: Hide QuickActions row if all actions are inactive r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D157288
2023-02-28 21:05:07 +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
a2525c839c Bug 1817899: Introduce weather in the result type r=mak
Differential Revision: https://phabricator.services.mozilla.com/D170471
2023-02-28 01:26:50 +00:00
Daisuke Akatsuka
d86a4aaffb Bug 1817202: Introduce site_specific_contextual_search in the result type r=mak
Differential Revision: https://phabricator.services.mozilla.com/D170470
2023-02-28 01:26:50 +00:00