Commit Graph

140 Commits

Author SHA1 Message Date
Daisuke Akatsuka
2b3143959c Bug 1933243: Dont capture tab keypresses with modifiers in unified search button r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D233461
2025-01-08 23:01:40 +00:00
Daisuke Akatsuka
abd3414bd9 Bug 1937363: Show/Focus Unified Search Button when P&S icon group gets focus r=desktop-theme-reviewers,urlbar-reviewers,dao,tabbrowser-reviewers,daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D232160
2024-12-24 04:02:25 +00:00
Daisuke Akatsuka
aea52d7b7c Bug 1933251: Tab key selects urlbar results and USB when user clicked urlbar and not select any element r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D230488
2024-12-15 05:15:51 +00:00
Yazan Al Macki
f73656a212 Bug 1919549 - Quit actions search mode after using quick actions in new tab page. r=urlbar-reviewers,jteow
Differential Revision: https://phabricator.services.mozilla.com/D230313
2024-12-06 19:03:26 +00:00
Daisuke Akatsuka
e7b0e35dc4 Bug 1933462: Clear the focus state on urlbar after losing focus from Unified Search Button r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D231147
2024-12-05 20:46:17 +00:00
adylanmclamb
2084fafe0f Bug 1922535 - Only get URL when needed in UrlbarController speculativeConnect. r=Standard8,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D230734
2024-12-04 19:48:28 +00:00
Drew Willcoxon
27e74e304d Bug 1932807 - Stop using JSON.stringify() in urlbar logging. r=urlbar-reviewers,Standard8
This also downgrades and removes some logging that I myself added that hasn't
proven to be useful. I reworded messages I wrote in a few places too.

I didn't touch `SuggestBackendJs.sys.mjs` because it's unused and will likely be
removed soon (bug 1932502).

Depends on D229847

Differential Revision: https://phabricator.services.mozilla.com/D229868
2024-11-22 22:20:57 +00:00
Daisuke Akatsuka
b833b25016 Bug 1931765: Leave to default tab navigation behavior if no selected element r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D229428
2024-11-19 23:32:00 +00:00
Daisuke Akatsuka
aceb05b8f2 Bug 1930492: Leave to default tab navigation behavior if no results r=urlbar-reviewers,jteow
Differential Revision: https://phabricator.services.mozilla.com/D228625
2024-11-15 03:24:47 +00:00
Daisuke Akatsuka
708d0195d5 Bug 1925532: Enter search mode without preview mode by key if there is single result r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D226865
2024-11-11 22:19:45 +00:00
Daisuke Akatsuka
176b51d0b0 Bug 1921174: Move focus to Dedicated Search button by Tab key from urlbar r=daleharvey,urlbar-reviewers,adw,dao
Differential Revision: https://phabricator.services.mozilla.com/D225176
2024-11-05 22:20:03 +00:00
Florian Quèze
e704e70b3b Bug 1927093 - Migrate scalars to use Glean APIs for urlbar.*, r=chutten,urlbar-reviewers,mak.
Differential Revision: https://phabricator.services.mozilla.com/D226513
2024-11-05 13:22:58 +00:00
Florian Quèze
6b72dc05fe Bug 1927093 - Migrate scalars to use Glean APIs for urlbar.impression.*, r=chutten,urlbar-reviewers,Standard8.
Differential Revision: https://phabricator.services.mozilla.com/D226512
2024-11-05 13:22:57 +00:00
Florian Quèze
4f822b5992 Bug 1927093 - Migrate scalars to use Glean APIs for urlbar.picked.*, r=chutten,urlbar-reviewers,Standard8.
Differential Revision: https://phabricator.services.mozilla.com/D226511
2024-11-05 13:22:57 +00:00
Collin Richards
427da209d7 Bug 1926435 - Fix press escape revert address bar after clear. r=dao,urlbar-reviewers,mak
Differential Revision: https://phabricator.services.mozilla.com/D226692
2024-10-31 10:15:31 +00:00
Adi
f8402ccb58 Backed out changeset 4df1b9d10c1f (bug 1921174) for causing bc failures @ browser_searchModeSwitcher_basic.js. CLOSED TREE 2024-10-30 08:41:36 +02:00
Daisuke Akatsuka
a081ba9733 Bug 1921174: Move focus to Dedicated Search button by Tab key from urlbar r=daleharvey,urlbar-reviewers,adw
Differential Revision: https://phabricator.services.mozilla.com/D225176
2024-10-30 03:00:32 +00:00
Dale Harvey
37dbf730f3 Bug 1922570 - Show global actions on seperate row from heuristic. r=daisuke,desktop-theme-reviewers,urlbar-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D225051
2024-10-21 19:36:57 +00:00
Collin Richards
7b80019694 Bug 1086524 - Focus window on Esc in address bar r=dao,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D218893
2024-10-17 11:56:34 +00:00
Cosmin Sabou
73e2568ce9 Backed out changeset c3560df7c73f (bug 1086524) for causing bc failures on browser_searchModeSwitcher_basic. 2024-10-17 00:49:27 +03:00
Collin Richards
4c5cad9017 Bug 1086524 - Focus window on Esc in address bar r=dao,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D218893
2024-10-16 15:55:01 +00:00
Adi
7d671034f6 Backed out changeset c03123359b41 (bug 1086524) for causing browser_persist_searchMode.js failures. CLOSED TREE 2024-10-16 16:54:55 +03:00
Collin Richards
9f857b20cb Bug 1086524 - Focus window on Esc in address bar r=dao,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D218893
2024-10-16 11:47:11 +00:00
mcheang
fd3ca17835 Bug 1921072 - Fix impression telemetry warning for restrict keywords and token alias engines results. r=mak,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D224568
2024-10-11 21:40:12 +00:00
James Teow
d5710cd89a Bug 1919193 - Simplify Persisted Search UI - r=adw,desktop-theme-reviewers,urlbar-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D222489
2024-09-18 04:44:31 +00:00
Dale Harvey
e230b4cd2c Bug 1917186 - Escape searchMode when uses presses Esc. r=daisuke,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D221800
2024-09-13 20:27:31 +00:00
Drew Willcoxon
405e2eb591 Bug 1918307 - Allow keyword exposures to be recorded for a subset of exposure results. r=mak
Depends on D221912

Differential Revision: https://phabricator.services.mozilla.com/D221916
2024-09-12 23:45:42 +00:00
Drew Willcoxon
21dfca244b Bug 1918299 - Add a terminal extra key to the urlbar exposure event. r=mak
Please see the bug for context and motivation.

I found a problem with the `terminal` calculation I added in bug 1915507
D220501. Basing it on query contexts isn't quite right. Ideally, for visible
results, `terminal` will be true iff the result is in `view.visibleResults` at
the end of the session, i.e., iff the result is recorded in the engagement or
abandonment event. Anything else would be confusing.

During the last query in a session, the view will be full of stale results from
previous queries. As the view updates itself, it will mark these rows as stale
and call `addExposure()` for them, passing in the current (final) query context.
It's not incorrect to add exposures since these rows are in fact visible. And if
the final query is canceled, they'll remain visible and actually be terminal
results. However, if the final query finishes without being canceled, the view
will remove these rows, and they won't be terminal at all, but since the view
called `addExposure()` for them with the final query context, `TelemetryEvent`
will think they are.

For visible exposures, the `terminal` calculation needs to be based on the
actual visible rows at the end of the session, same as how the results in the
engagement/abandonment events are determined. For hidden exposures, we can just
use `queryContext.results`.

Differential Revision: https://phabricator.services.mozilla.com/D221912
2024-09-12 23:45:42 +00:00
Drew Willcoxon
34a4542ebe Bug 1915507 - Replace potential exposures with keyword exposures. r=mak
This replaces the current potential exposures implementation with "keyword
exposures." The current implementation is based on a keyword list defined in
Nimbus. Keyword exposures improve on the following drawbacks to that approach:

* Potential exposures can't be recorded for existing result types without
  duplicating their keywords in the Nimbus list. The ability to record potential
  exposures for existing types is an idea from DS (Dave).
* They're unrelated to `exposure` telemetry, so we don't get an `exposure` event
  for them in the main ping, making it hard to correlate them with engagements
  and abandonments. This is another drawback pointed out by DS (Dave). (By
  design, we don't want to correlate individual keywords with
  engagements/abandonments for privacy reasons, but we do want to know whether a
  potential exposure was triggered during an engagement/abandonment without
  knowing the matching keywords.)
* Storing the keywords in Nimbus means the Nimbus recipe is at least as large as
  the keyword list. It's probably not a great idea to put thousands of keywords
  in the recipe JSON.
* The keyword-matching strategy is simplistic exact matching. It can't do more
  sophisticated strategies used for real results, like how we recently started
  using FTS in Suggest.

Keyword exposures as implemented by this revision improve on all that. Summary:

* Keyword exposures are implemented on top of existing `exposure` telemetry.
  They can be enabled for any result type, and they are always "in addition to"
  `exposure` telemetry.
* They're enabled with a new bool Nimbus variable. When true, they're recorded
  for all results that trigger `exposure` telemetry.
* They work with the new `Exposure` Rust suggestions (bug 1915317, bug 1893086,
  result type "rust_exposure"). In combination, `Exposure` suggestions and
  keyword exposures are the new way to do "potential exposures," i.e., exposure
  telemetry for hypothetical suggestions that includes matching keywords. Like
  every other Rust suggestion type, `Exposure` suggestions take their keywords
  from remote settings and can do sophisticated matching.

Other changes in this revision:

* Keyword exposures are recorded on each instance of a matched result. With the
  current approach, potential exposures are recorded per unique matched keyword.
  That gives us more info. I cleared this idea with Dave.
* Properly detect `terminal` cases by comparing the final query context with the
  context at the time of the exposure. The current detection is wrong because
  it's only based on search strings, which doesn't work because the final search
  string could also have been typed earlier in the session.
* In the feature manifest, change the branch of the related `setPref` variables
  from `default` to `user`. When an experiment is uninstalled, the Nimbus client
  [does *not* restore previous defaults](https://searchfox.org/mozilla-central/rev/446ff34da077a31d5550359480cb327f729c027b/toolkit/components/normandy/lib/PrefUtils.sys.mjs#119) for prefs set on the default branch. That
  breaks some of the tests and also doesn't seem good for users.

Differential Revision: https://phabricator.services.mozilla.com/D220501
2024-09-11 04:47:52 +00:00
Drew Willcoxon
26cdd4f115 Bug 1914542 - Replace UrlbarResult.exposureResultType and exposureResultHidden with a single simple value. r=mak
This replaces `UrlbarResult.exposureResultType` and `exposureResultHidden` with
a single simple value called `exposureTelemetry`. Please see the bug for the
rationale.

Other changes:

* For convenience, make `UrlbarPrefs.get("exposureResults")` return a `Set` so
  consumers don't have to parse the string value.
* Simplify handling of result properties in `check_results()` (xpcshell tests)
* Add more tasks/checks to test_exposure.js

Depends on D219939

Differential Revision: https://phabricator.services.mozilla.com/D219942
2024-08-27 20:12:55 +00:00
Mark Banner
b256e54326 Bug 1870226 - Fix missing jsdoc @returns for Urlbar code. r=urlbar-reviewers,daisuke
Differential Revision: https://phabricator.services.mozilla.com/D219508
2024-08-23 16:43:55 +00:00
Butkovits Atila
11a5a23896 Backed out 7 changesets (bug 1870226) for causing build bustages. CLOSED TREE
Backed out changeset 619244623dba (bug 1870226)
Backed out changeset e85a5647cae4 (bug 1870226)
Backed out changeset 21ea9baf83ea (bug 1870226)
Backed out changeset a506c0f0ce28 (bug 1870226)
Backed out changeset 77c78201a206 (bug 1870226)
Backed out changeset 7a98dfef087f (bug 1870226)
Backed out changeset f64ad89c2406 (bug 1870226)
2024-08-23 12:22:02 +03:00
Mark Banner
e1ae97da9d Bug 1870226 - Fix missing jsdoc @returns for Urlbar code. r=urlbar-reviewers,daisuke
Differential Revision: https://phabricator.services.mozilla.com/D219508
2024-08-23 08:55:47 +00:00
Karandeep
d1dbab6e8d Bug 1912040 - Remove all instances of onLegacyEngagement(). r=adw,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D219068
2024-08-14 12:38:26 +00:00
Iulian Moraru
4371796885 Backed out changeset c052f2639595 (bug 1086524) for causing multiple browser failures related to urlbar. CLOSED TREE 2024-08-13 12:44:56 +03:00
Collin Richards
ba7657463c Bug 1086524 - Focus window on Esc in address bar r=dao,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D218893
2024-08-13 08:36:51 +00:00
Dale Harvey
35e363801a Bug 1893067 - Add actions key to glean urlbar metrics. r=mak,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D214763
2024-06-29 21:50:46 +00:00
Karandeep
b706203c2c 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
0dcee9a58f 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
5f9ad2e51c 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
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