Commit graph

102 commits

Author SHA1 Message Date
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
52c561897c Bug 1843074 - SkippableTimer.done should be set immediately. r=scunnane
Invoking fire() in a loop may invoke the callback multiple times because done
is not set immediately.

Differential Revision: https://phabricator.services.mozilla.com/D183412
2023-07-13 09:25:37 +00:00
Marco Bonardo
1dbce16a75 Bug 1842381 - The address bar chunk timer is not firing early when all heuristic providers are done. r=jteow
Differential Revision: https://phabricator.services.mozilla.com/D183164
2023-07-11 08:27:37 +00:00
Marco Bonardo
8259e0e3d5 Bug 1816572 - Allow more time for Address Bar heuristic results to be returned. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D181128
2023-07-07 15:48:34 +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
Drew Willcoxon
5a79fd667d Bug 1841442 - Finish integrating Pocket suggestions with rich suggestions. r=daisuke,fluent-reviewers,flod
* Add the "Pocket - Related to {keyword}" bottom text
* Don't show the description for non-top-picks
* Make sure the URL is always shown

[Reference Figma](https://www.figma.com/file/3m1GVo9lejjorUZrPSn7VW/Pocket-collections-suggestions?type=design&node-id=2616%3A9002&mode=design&t=0BKzoltXIvYTpPi6-1) (see "CD Work area" in the left sidebar, then the "V4 - Final" group)

Depends on D182537

Differential Revision: https://phabricator.services.mozilla.com/D182632
2023-07-05 15:47:24 +00:00
Drew Willcoxon
ce2ff6f009 Bug 1841408 - Unify rich suggestions, best match, Firefox Suggest sponsored results, and Pocket Suggestions. r=dao,daleharvey
This does a few things:

* Unify the view implementations of rich suggestions, Firefox Suggest sponsored
  results, and best match. I did this by using the best match implementation
  and extending it to rich suggestions and Suggest sponsored.
* Use the unified implementation for Pocket suggestions too.
* Add a bottom-text concept since Pocket suggestions shown as top picks need to
  show both a description and some text below it. (The actual bottom text per
  result is added in D182632 since I didn't want to make this patch bigger than
  necessary)

I have a couple motivations for these changes:

* I'm implementing Pocket suggestions, which need to show some text below the
  suggestion title as well as the URL. I was going to just use the Firefox
  Suggest sponsored approach, where the action text is wrapped below the title,
  but that doesn't work because it can't show both the wrapped action text and
  the URL.
* IMO we should use rich suggestions as the basis for all rows going forward,
  i.e., unify the different row implementations around rich suggestions.

The reason I chose the best match implementation instead of the rich suggestions
implementation is because the grid-based approach of rich suggestions doesn't
work well when the URL also needs to be shown. The URL should be
baseline-aligned with the row title, which isn't easy to do when the URL is
outside the grid. The rich suggestions implementation also doesn't wrap the URL.

Other details:

* The `rich-suggestion=no-icon` attribute value is only used for styling, so we
  can replace it with `@supports -moz-bool-pref()`. That lets us make the
  `rich-suggestion` attribute a simple boolean.
* I kept the `isBestMatch` property for results since
  `searchEngagementTelemetryGroup()` uses it to return "top_pick", and the view
  also uses it to create the "Top pick" row/group label. It still has semantic
  meaning so I think that's OK. It's no longer used by the view to create
  different DOM or styling.
* Move `isRichSuggestion` from the payload to the result itself, since it's no
  longer used for only one type of result. It's like `isBestMatch`, which is
  also on the result.
* Add `richSuggestionIconSize` to the result too. The best match icon size
  is 52. The Pocket best match icon size is 24 (but will have added padding and
  a background color to make it appear 52px). IMO this is better than adding
  rules for each type of suggestion to the CSS. It's cleaner and also indicates
  what the "standard" icon sizes are.

Depends on D182580

Differential Revision: https://phabricator.services.mozilla.com/D182537
2023-07-05 15:47:24 +00:00
Butkovits Atila
1f7b14ac8e Backed out changeset 986f4f6398a4 (bug 1816572) for causing failures at browser_search_bookmarks.js. CLOSED TREE 2023-07-04 16:29:04 +03:00
Marco Bonardo
834caa9a69 Bug 1816572 - Allow more time for Address Bar heuristic results to be returned. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D181128
2023-07-04 09:28:46 +00:00
Drew Willcoxon
5714ea5aad Bug 1841295 - Update PocketSuggestions for the final suggestions schema and implement the desired matching behavior. r=daisuke
Each suggestion has "low" and "high confidence" keywords. When a high confidence
keyword is matched, the suggestion should be shown as a top pick, and otherwise
it should be shown as a normal Suggest result. High confidence keywords must be
matched in full, but low confidence keywords can be matched with prefixes
starting at the first word.

The low confidence matching behavior is the same as addon suggestions, so I
factored out that function into a new helper defined on `SuggestionsMap`.

I added a `full_keyword` property to the suggestions. It's not used yet but
we'll use it when we implement the final UI, which needs to show the full
keyword.

Differential Revision: https://phabricator.services.mozilla.com/D182580
2023-07-04 02:28:21 +00:00
James Teow
3c95fa07c8 Bug 1840376 - Remove outstanding references to Preloaded Top URLs - r=adw
Differential Revision: https://phabricator.services.mozilla.com/D182195
2023-06-29 08:18:27 +00:00
Stephanie Cunnane
2dc8ca34b8 Bug 1589602 - Improve urlbar performance with very long search strings. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D180734
2023-06-27 13:13:11 +00:00
James Teow
93e78407ca Bug 1466103 - Add telemetry for adaptive history results in the address bar - r=mak
Differential Revision: https://phabricator.services.mozilla.com/D180168
2023-06-22 23:36:23 +00:00
Drew Willcoxon
0e465234f7 Bug 1839558 - Allow suggestion scores to be specified in Nimbus. r=daisuke
This adds a `quickSuggestScoreMap` Nimbus variable that lets experiments
override suggestion scores. It maps from telemetry types to score values. For
example:

```
"quickSuggestScoreMap": {
  "amo": 0.25,
  "adm_sponsored": 0.3
}
```

In this example, addon suggestions will always have a score of 0.25, and
sponsored suggestions will always have a score of 0.3. Of course, different
branches within an experiment and different experiments can set different
scores.

While working on this, I saw we have a bug when we try to look up the
`BaseFeature` for a result. To do the lookup, we look up the result's
`telemetryType` in `FEATURE_NAMES_BY_TELEMETRY_TYPE`. That's a problem for `adm`
suggestions because the `telemetryType` will be either `adm_sponsored` or
`adm_nonsponsored`, but neither of those is present in
`FEATURE_NAMES_BY_TELEMETRY_TYPE` -- only `adm` is.

To fix it, I added back the `provider` property to result payloads that I
previously removed, and I added `BaseFeature.merinoProvider` so each feature can
specify its Merino provider. Then, `QuickSuggest` can build a map from Merino
provider names to features, allowing us to look up features without needing to
hardcode something like `FEATURE_NAMES_BY_TELEMETRY_TYPE` or
`FEATURE_NAMES_BY_MERINO_PROVIDER`.

Since I added back the `provider` property, I had to update a lot of tests. (As
a follow up, it would be nice to centralize the creation of expected result
objects in the test helper.)

I also added `BaseFeature.getSuggestionTelemetryType()` to help implement the
score map and to better formalize the idea that telemetry types are an important
property that all quick suggest results should include.

Differential Revision: https://phabricator.services.mozilla.com/D181709
2023-06-22 03:55:40 +00:00
Mark Banner
ae619c5049 Bug 1838155 - Clean up some console.error calls that had been migrated from Cu.reportError. r=jdescottes,perftest-reviewers,geckoview-reviewers,credential-management-reviewers,search-reviewers,sgalich,owlish,jteow,sparky
This goes through the previous changes in the dependencies of bug 877389, and does two things:
1) Remove instances of \n
2) Change reporting of exceptions so that they are passed as separate arguments. This should result
   in an improved display of the exception in the browser console, should it occur.

Differential Revision: https://phabricator.services.mozilla.com/D180843
2023-06-15 08:33:57 +00:00
Kershaw Chang
5149a41b0e Bug 1543990 - Simplify nsISpeculativeConnect API, r=necko-reviewers,geckoview-reviewers,search-reviewers,valentin,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D179066
2023-06-01 09:46:12 +00:00
mcheang
50ce5c5c74 Bug 1648188 - Fix SearchService init failures so that the address bar can be used to search history and bookmarks. r=Standard8,mak
This patch refactors the SearchService private initialized variables and how
the SearchService stores its initialization status. These changes capture whether
the SearchService has succeeded, failed or hasn't finished initialization yet.

There are also changes made to UrlbarSearchUtils on handling when SearchService
has failed to initialize or when it hasn't finished initializing yet and we wait.
In the case where the SearchService has failed on initialization, We allow
the code to continue so that it can reach UrlbarProviderPlaces. Once we
are able to reach UrlbarProviderPlaces, we can make database calls for the user's
history and bookmarks. This allows the user to interact with the addressbar and
search their history and bookmarks even if SearchService has failed to initialize.

Differential Revision: https://phabricator.services.mozilla.com/D176936
2023-05-30 18:34:51 +00:00
Dão Gottwald
d7c7c06a60 Bug 1834359 - Implement Glean and Legacy Telemetry for Rich Suggestions. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D178689
2023-05-25 10:50:16 +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
Dale Harvey
706db5368c 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
981cf8fab6 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
1754821cb5 Bug 1829081 - Make improvements to UrlbarProviderQuickSuggest in preparation for handling many types of suggestions. r=daisuke
This makes some changes to UrlbarProviderQuickSuggest that are much more modest
than my previously proposed refactorings in D176111 and D175998. After thinking
about it more and discussing it with @wstuckey and @daisuke, I'm not sure it's a
good idea to split UrlbarProviderQuickSuggest into multiple providers. In the
future, we will replace a lot of our desktop JS with a single cross-platform
Rust component that serves remote settings suggestions and possibly Merino
suggestions too. We should work with that in mind, and I don't think it makes a
lot of sense to have multiple urlbar providers all fetching from this one
component, even though it would make some things nicer, like being able to
isolate suggestion-specific UI code to each provider.

The main goal of this revision is to better prepare UrlbarProviderQuickSuggest
for many new types of suggestions:

* Add `#makeResult()`, which returns a new `UrlbarResult` appropriate for a
  given suggestion
* Add `#makeDefaultResult()`, which returns a result for suggestions that either
  don't need special handling or are unrecognized
* Remove the `RESULT_SUBTYPE` consts. The idea is that the client doesn't need
  to care too much about the types of results Merino returns, except when
  special handling is required (special UI, special telemetry, etc.)
* Add `telemetryType` to result payloads so that the result types recorded in
  Glean are clear and well defined. `telemetryType` is also used to tell the
  type of a result in general. For results that are served by Merino,
  `telemetryType` is the Merino provider name
* Streamline legacy telemetry handling a little, although hopefully we won't be
  doing too much legacy telemetry in the future

There are still open questions that this revision does not resolve, especially
the ability isolate suggestion-specific UI code in a nice way (dynamic result
types). I don't think this revision paints us into any corners.

Other changes:

* Properly document the `${source}_${type}` result types in metrics.yaml (added
  in D174209)
* For Glean result types, replace "suggest_sponsor" with "merino_adm_sponsored"
  and "rs_adm_sponsored", and replace "suggest_non_sponsor" with
  "merino_adm_nonsponsored" and "rs_adm_nonsponsored". This is more consistent
  with the `${source}_${providerName}` convention I'd like to establish.
* Remove code related to Nimbus exposures and a test
  (browser_quicksuggest_bestMatch.js). We aren't using Nimbus exposures anymore.
  We can always add it back if necessary.
* Don't record the custom contextual services pings for dynamic Wikipedia
  results. These pings are only necessary for adM suggestions.

Differential Revision: https://phabricator.services.mozilla.com/D177191
2023-05-08 01:27:28 +00:00
Drew Willcoxon
79dcb5721b Bug 1830385 - Implement the dismissal "Thanks for your feedback" message in Suggest results. r=dao,fluent-reviewers,flod
This implements the second "thanks for your feedback" UI for weather, Pocket,
addon, MDN, etc. suggestions. The first UI is in D175729, which this revision
builds on.

This UI is shown when a result is dismissed. It's essentially a tip with a
smaller icon and padding. It has the "Got it" button that dismisses the tip
itself when clicked.

I noticed tip top and bottom borders use `--panel-separator-color`, which
doesn't seem right. They're supposed to be the same color as the borders between
the input and view and between the results and one-off buttons, which is
`--autocomplete-popup-separator-color`. The spec for this feature uses the same
colors too. So I changed that too. (The use of `--panel-separator-color` goes
back to [the initial tip implementation](https://hg.mozilla.org/mozilla-central/rev/78886081d45b09987c1825cc5a160fd6bec61cb8) in 70, but search tips and
interventions weren't added until 74, in bug 1606909 and bug 1606917. I checked,
and in 74 all the borders are the same color.)

References:

* [Figma](https://www.figma.com/file/Hdi0oHB7trRcncyVAKZypO/accuweather-explorations?node-id=2421%3A62540&t=svOk7TxQv4V7Y9L4-1) (see "A11y review - user feedback" in sidebar)
* [Clickable prototype](https://www.figma.com/proto/Hdi0oHB7trRcncyVAKZypO/accuweather-explorations?page-id=2192%3A42825&node-id=2394-52468&viewport=246%2C526%2C0.12&scaling=min-zoom&starting-point-node-id=2394%3A52468&show-proto-sidebar=1) (see "Revised 4/3" in sidebar)
* [Content design](https://docs.google.com/document/d/1Mgt_oAIEDz_sF-YBqqUGtfKHQCAtRzEQohpfqk-2X8U/edit?usp=sharing)

Depends on D175729

Differential Revision: https://phabricator.services.mozilla.com/D176468
2023-05-02 20:15:18 +00:00
Norisz Fay
526cf3b67c Backed out changeset d09e87ed0a41 (bug 1830385) for causing xpcshell failures on test_weather.js CLOSED TREE 2023-05-02 22:05:41 +03:00
Drew Willcoxon
7e5234932a Bug 1830385 - Implement the dismissal "Thanks for your feedback" message in Suggest results. r=dao,fluent-reviewers,flod
This implements the second "thanks for your feedback" UI for weather, Pocket,
addon, MDN, etc. suggestions. The first UI is in D175729, which this revision
builds on.

This UI is shown when a result is dismissed. It's essentially a tip with a
smaller icon and padding. It has the "Got it" button that dismisses the tip
itself when clicked.

I noticed tip top and bottom borders use `--panel-separator-color`, which
doesn't seem right. They're supposed to be the same color as the borders between
the input and view and between the results and one-off buttons, which is
`--autocomplete-popup-separator-color`. The spec for this feature uses the same
colors too. So I changed that too. (The use of `--panel-separator-color` goes
back to [the initial tip implementation](https://hg.mozilla.org/mozilla-central/rev/78886081d45b09987c1825cc5a160fd6bec61cb8) in 70, but search tips and
interventions weren't added until 74, in bug 1606909 and bug 1606917. I checked,
and in 74 all the borders are the same color.)

References:

* [Figma](https://www.figma.com/file/Hdi0oHB7trRcncyVAKZypO/accuweather-explorations?node-id=2421%3A62540&t=svOk7TxQv4V7Y9L4-1) (see "A11y review - user feedback" in sidebar)
* [Clickable prototype](https://www.figma.com/proto/Hdi0oHB7trRcncyVAKZypO/accuweather-explorations?page-id=2192%3A42825&node-id=2394-52468&viewport=246%2C526%2C0.12&scaling=min-zoom&starting-point-node-id=2394%3A52468&show-proto-sidebar=1) (see "Revised 4/3" in sidebar)
* [Content design](https://docs.google.com/document/d/1Mgt_oAIEDz_sF-YBqqUGtfKHQCAtRzEQohpfqk-2X8U/edit?usp=sharing)

Depends on D175729

Differential Revision: https://phabricator.services.mozilla.com/D176468
2023-05-02 16:50:43 +00:00
Marc Seibert
0c6ac66e1f Bug 1736939 - Re-add "Search history" item to history (sub) views from history and library buttons. r=dao,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D175653
2023-04-27 14:32:46 +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
Drew Willcoxon
6829a78aa2 Bug 1827943 - Implement the weather suggestion result menu UI. r=dao,fluent-reviewers,flod
This implements the weather suggestion result menu UI and builds on D174941.
References:

* [Spec]( https://www.figma.com/file/Hdi0oHB7trRcncyVAKZypO/accuweather-explorations?node-id=2421%3A62540&t=29w6wH3UYchqBxqX-1) (See "A11y review" in the sidebar)
* [Clickable prototype](https://www.figma.com/proto/Hdi0oHB7trRcncyVAKZypO/accuweather-explorations?page-id=2192%3A42825&node-id=2394-52468&viewport=246%2C526%2C0.12&scaling=min-zoom&starting-point-node-id=2394%3A52468&show-proto-sidebar=1) (See "Revised 4/3" in the sidebar)

There are a couple important points about the menu. First, one of the commands,
"Report inaccurate location", is specific to weather suggestions, or at least
location-based suggestions. I don't think it's a good idea to centralize all
commands in UrlbarView, and in general I'd like to stop centralizing handling of
different result types in the view and input, so I added a new provider method
called `getResultCommands()`.

Second, the spec calls for a menu separator and a submenu so the user can select
a reason they don't want to see the result, so the return value of
`getResultCommands()` is flexible enough to support those two things, and I
modified `#populateResultMenu()` too.

These new commands will be recorded in Glean engagement telemetry as new
`engagement_type` values, same as "dismiss" and "help" currently are.

This patch doesn't implement handling of two of the commands, "Report inaccurate
location" and "Show less frequently", because I wanted to keep it focused on the
fundamentals described above.

Depends on D174941

Differential Revision: https://phabricator.services.mozilla.com/D174994
2023-04-18 16:22:56 +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
Dale Harvey
f5338ca629 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
Stephanie Cunnane
a67994520d Bug 1823278 - Update consumers of toolkit/components/utils to import ES modules directly. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D172950
2023-03-22 02:02:51 +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
Daisuke Akatsuka
8f35152ae1 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
8a81a95209 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
Drew Willcoxon
34b853d0d1 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
mcheang
c85c0172e0 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
b14be42ef5 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
48fa519217 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
269a8102c1 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
Dale Harvey
31edb5e98c 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
Gregory Pappas
4ebe5099a5 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
5d094b5e62 Backed out changeset d4b852d0732c (bug 1814980) for causing xpc failures in test_providerOmnibox.js 2023-02-07 17:52:58 +02:00
Gregory Pappas
0341329363 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
fb333ff0d6 Bug 1814732 - Move weather suggestions to their own provider. r=daisuke
This moves weather suggestions from the quick suggest provider to their own
provider. This will make it easier to implement weather suggestions that are
triggered by keyword instead of being shown on zero-prefix.

It does the following:

* Copies UrlbarProviderQuickSuggest.sys.mjs to UrlbarProviderWeather.sys.mjs
* Removes everything weather-related from UrlbarProviderQuickSuggest.sys.mjs
* Removes everything not weather-related from UrlbarProviderWeather.sys.mjs
* Makes some simplifications to the new provider since it doesn't need to
  support quick suggest suggestions
* Removes `result.payload.isWeather` since now we can use `result.providerName`
* This does *not* change any telemetry

Differential Revision: https://phabricator.services.mozilla.com/D168738
2023-02-07 02:26:54 +00:00
Drew Willcoxon
dde72e1c7d Bug 1814318 - Make L10nCache.ensure() re-cache strings when excludeArgsFromCacheKey is set. r=dao
This is an error in how I implemented the `excludeArgsFromCacheKey` mechanism in
D167318. It can be fixed by always re-caching strings when
`excludeArgsFromCacheKey` is passed to `ensure()`. We could instead store the
argument values of currently cached strings and then re-cache only when
different argument values are passed to `ensure()`, but that would require a
deeper change and I don't think it's worth it.

Differential Revision: https://phabricator.services.mozilla.com/D168509
2023-02-01 17:20:00 +00:00
Gregory Pappas
15bb63ab92 Bug 1813302 - Add missing blockL10n property to UrlbarProviderOmnibox payload r=dao,adw
Differential Revision: https://phabricator.services.mozilla.com/D168191
2023-01-31 18:50:23 +00:00
Butkovits Atila
4350c1597e Backed out changeset 0bd6e56348ff (bug 1813302) for causing xpc shell failures at test_providerOmnibox.js. CLOSED TREE 2023-01-30 17:36:11 +02:00
Gregory Pappas
d5268d2a66 Bug 1813302 - Add missing blockL10n property to UrlbarProviderOmnibox payload r=dao,adw
Differential Revision: https://phabricator.services.mozilla.com/D168191
2023-01-30 12:55:37 +00:00