Commit Graph

100 Commits

Author SHA1 Message Date
Karandeep
d8690f18b5 Bug 1888908 - Rename current onEngagement to onLegacyEngagement r=mak
Differential Revision: https://phabricator.services.mozilla.com/D206251
2024-04-09 13:07:23 +00:00
Karandeep
d36112e266 Bug 1888905 - Remove the start and discard notifications. r=mak,adw
Differential Revision: https://phabricator.services.mozilla.com/D206238
2024-04-05 16:15:08 +00:00
Norisz Fay
f8ee70f7ac Backed out changeset 519aa7ff2ca6 (bug 1888905) for causing bc failures on browser_glean_telemetry_reenter.js CLOSED TREE 2024-04-04 18:37:26 +03:00
Karandeep
059ef5ae44 Bug 1888905 - Remove the start and discard notifications. r=mak,adw
Differential Revision: https://phabricator.services.mozilla.com/D206238
2024-04-04 14:06:23 +00:00
Drew Willcoxon
0c993cb63d Bug 1881875 - Add telemetry for potential suggestion impressions in the urlbar. r=mak
This includes some unrelated changes that lint either made or complained about.

Depends on D206110

Differential Revision: https://phabricator.services.mozilla.com/D206173
2024-04-03 22:02:07 +00:00
Marco Bonardo
fc1eaef54c Bug 1888627 - Avoid Address Bar engagement telemetry record() re-entrance. r=adw
If a provider onEngagement method causes the address bar panel to close when
a result is picked, we may record consecutive engagement and abandonment events
for the same search session.

Differential Revision: https://phabricator.services.mozilla.com/D206110
2024-04-02 16:34:30 +00:00
Drew Willcoxon
a17188bd2b Bug 1886175 - Properly count urlbar hidden exposures whose hypothetical rows can't immediately be shown. r=mak,wstuckey
The problem has to do with hidden exposures whose hypothetical rows can't
immediately be made visible either because they would overflow the filled-up
view or because a misplaced result was seen.

The relevant part of `#updateResults()` is [here](https://searchfox.org/mozilla-central/rev/6a2a2a52d7e544a2fd5678d04991a7e78b694f22/browser/components/urlbar/UrlbarView.sys.mjs#1289-1291). When `canBeVisible` is false,
we effectively forget about that hidden-exposure result, which is not right. For
normal results, we also have that `canBeVisible` logic (a few lines down from
the part I linked), but the difference is that we create a hidden row for them
and then unhide the row when the query finishes and stale rows are removed.
We're missing an analog to that logic for hidden-exposure results, so we're
undercounting them.

Fortunately it's not too hard to fix. I added a new kind of exposure for
`TelemetryEvent` to track called "tentative" exposures. Tentative exposures are
entirely analogous to this case where a row would be added but hidden, and then
unhidden when stale rows are removed.

While I was modifying the test, I rephrased the comments for existing tasks so
hopefully they're easier to understand.

Differential Revision: https://phabricator.services.mozilla.com/D205155
2024-03-21 16:50:47 +00:00
Karandeep
9af5d8493e Bug 1880498 - Modify the abandonment event, to also happen in case of a switch tab. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D202238
2024-03-13 14:08:06 +00:00
Karandeep
8ba14c9af9 Bug 1878983 - Remove the urlbar.impression event. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D201614
2024-02-21 14:24:58 +00:00
Dale Harvey
a6bc2baf74 Bug 1841762 - Ensure onEngagement has queryContext defined. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D197265
2024-01-18 17:52:58 +00:00
Marco Bonardo
fe296cb095 Bug 1863797 - Frequent failures in browser_schemeless.js due to UrlbarView.selectedElement removed from DOM. r=adw
#selectedElement may end up pointing to disconnected nodes. And so the public
.selectedElement getter.
This is how it was happening: a first call to onQueryResults adds and selects a
heuristic result. Then a second call to onQueryResults brings a new heuristic
result that requires new content (not compatible with the previous one), so the
old heuristic is emptied out, and new DOM is generated.
Because the code in onQueryResults relies on .selectedElement, at the second
invokation it thinks the selection is still valid, and doesn't select the new
heuristic. In reality .selectedElement at that time is pointing to a removed
DOM node.
The patch introduces a #rawSelectedElement and converts #selectedElement
into a getter.

Plus some minor logging improvements, and removing unused #mainContainer property.

Differential Revision: https://phabricator.services.mozilla.com/D195779
2023-12-13 10:05:26 +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
Karandeep
b02379200c Bug 1853910 - Remove Legacy Event Telemetry. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D188721
2023-10-11 07:45:13 +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
e6a68f4377 Bug 1853910 - Remove Legacy Event Telemetry. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D188721
2023-10-06 12:33:14 +00:00
Daisuke Akatsuka
b23a4beb70 Bug 1849726: Rename telemetry ping name of quicksuggest r=adw
Differential Revision: https://phabricator.services.mozilla.com/D186677
2023-08-23 00:51:24 +00:00
Daisuke Akatsuka
444c1ff6c7 Bug 1847855: Take telemetry of default search engine and selected position r=adw
Differential Revision: https://phabricator.services.mozilla.com/D185774
2023-08-16 23:19:54 +00:00
Daisuke Akatsuka
a9fe0579fa Bug 1847855: Take telemetry of the prefs that enable/disable part of QuickSuggest features r=adw
Differential Revision: https://phabricator.services.mozilla.com/D185773
2023-08-16 23:19:54 +00:00
Gregory Pappas
e9950eccfd Bug 1845311 - Use ChromeUtils.defineLazyGetter in more places r=arai,webdriver-reviewers,geckoview-reviewers,extension-reviewers,application-update-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,anti-tracking-reviewers,sessionstore-reviewers,pbz,joschmidt,robwu,issammani,bytesized,owlish,dao
Differential Revision: https://phabricator.services.mozilla.com/D184481
2023-07-26 16:28:11 +00:00
Marco Bonardo
b99e0f7f7e Bug 1827770 - Remove isPrivate argument from onEngagement() since it can be inferred. r=daleharvey
We can't use context.isPrivate because sometimes context is undefined.
I filed https://bugzilla.mozilla.org/show_bug.cgi?id=1841762 about that.

Differential Revision: https://phabricator.services.mozilla.com/D182772
2023-07-07 10:01:50 +00:00
Marco Bonardo
ff3c4323fc Bug 1827770 - Remove QueryContext.view and pass the controller to onEngagement() instead. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D182771
2023-07-07 10:01:50 +00:00
Karandeep
c7eb714ef2 Bug 1713675 - Fix Shift+up/Shift+down for text selection in address bar on Mac. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D180838
2023-06-20 17:37:07 +00:00
Mark Banner
81c86b200c Bug 1834204 - Update more consumers to import ES modules directly. r=kpatenio,geckoview-reviewers,whimboo,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D178590
2023-05-26 11:36:33 +00:00
Karandeep
bab497399a Bug 1806120 - Pass down window handle to provider. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D178436
2023-05-24 14:19:01 +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
Drew Willcoxon
dd2a850370 Bug 1832105 - Add the weather suggestion commands to the isSessionOngoing logic in the urlbar telemetry event code. r=daisuke
The problem is the two weather commands that keep the view open,
"inaccurate_location" and "show_less_frequently", aren't included in the
criteria that set `isSessionOngoing` to true.

As the comment above `isSessionOngoing` says, we should find a better way to
determine whether the session remains ongoing than hardcoding a list of
commands. I didn't try to do that here since we're time constrained and need to
uplift this to 114.

Differential Revision: https://phabricator.services.mozilla.com/D177558
2023-05-10 03:28:10 +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
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
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
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
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
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
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
Dão Gottwald
acb8d341cc Bug 1821375 - Remove weird providerName != "UrlbarProviderTopSites" check from UrlbarController::typeFromElement. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D172134
2023-03-09 16:34:33 +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
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
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
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
95dabb81e9 Bug 1817203: Introduce go_button in engagement_type r=mak
Differential Revision: https://phabricator.services.mozilla.com/D171033
2023-02-28 01:26:49 +00: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
Daisuke Akatsuka
5c8e4d197d Bug 1817156: Use input_field as selected_result value if the result view has not been shown upon engagement r=mak
Differential Revision: https://phabricator.services.mozilla.com/D170144
2023-02-25 07:32:04 +00:00
Daisuke Akatsuka
cc5cbd2fef Bug 1817155: Make results and groups empty if the result view has not been shown upon engagement r=mak
Differential Revision: https://phabricator.services.mozilla.com/D170143
2023-02-25 07:32:04 +00:00