Commit graph

103 commits

Author SHA1 Message Date
Karandeep
a4a050993c Bug 1898437 - Fix TypeError on re-submitting a search link by ensuring details.result is defined. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D212111
2024-06-07 12:04:02 +00:00
Moritz Beier
47de7bd820 Bug 1610530 - Use classes instead of ids to access urlbar elements from UrlbarInput. r=dao,webdriver-reviewers,whimboo
Differential Revision: https://phabricator.services.mozilla.com/D212095
2024-06-04 12:58:52 +00:00
Dale Harvey
237dc6e110 Bug 1871206 - Implement secondary actions for the urlbar. r=mak,settings-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D203381
2024-04-23 11:33:33 +00:00
Karandeep
5e3b9f9820 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
d65329ee39 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
d962f3b9a0 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
c63e3ae632 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
7b341f3ffa 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
983086cc0e 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
7ea276b7f6 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
7f9733f98b 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
bb715065b1 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
37a4dedc0a 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
034a395cfb 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
0af427d8a4 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
64d72a4b26 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
270068fd8d 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
b5b7981be6 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
74d32e4da2 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
4d13b21e0d 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
3b311a8bd7 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
3eac12bbd7 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
73e7350295 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
9804a5187b 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
98ed1c5340 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
8b4f426ecf 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
ef201a9f0e 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
130a655906 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
f0aa29816e 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
00a302fc9e 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
377f103631 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
4ec10a0b44 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
c9075e0e89 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
a3b0a1fd4c 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
94e5649da4 Backed out changeset c53de63f9b5f (bug 1824253) landed a bit ahead of schedule CLOSED TREE 2023-04-05 13:48:20 -04:00
Daisuke Akatsuka
0072accf27 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
e9628e5685 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
af6aa328d5 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
62cd23e2cf 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
2f9a79d1c4 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
0e678372a8 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
2629abc70f 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
b288401947 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
d771cbde8d 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
e4fa7bdf10 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
046a601a7f 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
6cec806dc7 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
4874944c05 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
9e0ba81905 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
ba7ad42706 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