Commit Graph

223 Commits

Author SHA1 Message Date
Daisuke Akatsuka
45587eba3e Bug 1951946: Add ways to dismiss the opt-in result dependent on impressions r=adw
Differential Revision: https://phabricator.services.mozilla.com/D240629
2025-03-07 03:40:46 +00:00
Daisuke Akatsuka
95533899a1 Bug 1936455: Remove the Suggest online opt-in onboarding dialog r=firefox-desktop-core-reviewers ,urlbar-reviewers,adw
Differential Revision: https://phabricator.services.mozilla.com/D238893
2025-02-21 05:01:33 +00:00
Drew Willcoxon
e4af70914a Bug 1949627 - Remove leftover browser.urlbar.quicksuggest.hideSettingsUI pref. r=daisuke,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D239066
2025-02-21 04:40:07 +00:00
Alexandru Marc
a822e8842c Backed out changeset 2c10082390b2 (bug 1936455) for causing xpcshell failures @ test_quicksuggest_migrate_v1.js CLOSED TREE 2025-02-21 03:51:58 +02:00
Daisuke Akatsuka
9c1c8fcf29 Bug 1936455: Remove the Suggest online opt-in onboarding dialog r=firefox-desktop-core-reviewers ,urlbar-reviewers,adw
Differential Revision: https://phabricator.services.mozilla.com/D238893
2025-02-21 01:05:42 +00:00
Drew Willcoxon
7e8ec5f0cd Bug 1947059 - Remove the concept of Suggest scenarios. r=daisuke
Depends on D237507

Differential Revision: https://phabricator.services.mozilla.com/D237508
2025-02-14 17:06:38 +00:00
Drew Willcoxon
6dab314205 Bug 1947057 - Move some async Suggest initialization so it only happens once. r=daisuke
Depends on D237506

Differential Revision: https://phabricator.services.mozilla.com/D237507
2025-02-14 17:06:37 +00:00
Drew Willcoxon
9dddb45dad Bug 1937250 - Move Suggest prefs initialization from UrlbarPrefs to QuickSuggest. r=daisuke,urlbar-reviewers
This mostly just moves all Suggest-related things from `UrlbarPrefs` to
`QuickSuggest`. To keep the patch small and make review easier, I tried to keep
it a straight move rather than making improvements, renames, and other
unnecessary changes. There's opportunity to improve and simplify some things,
and I'd like to do that in follow-ups.

Depends on D237281

Differential Revision: https://phabricator.services.mozilla.com/D237170
2025-02-11 02:58:53 +00:00
Daisuke Akatsuka
b4f6558ec6 Bug 1944420: Change the frequency of display after dismissal r=urlbar-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D236506
2025-02-10 01:36:39 +00:00
Daisuke Akatsuka
af04d78547 Bug 1944420: Show contextual opt-in message on top r=urlbar-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D236505
2025-02-10 01:36:39 +00:00
Daisuke Akatsuka
acd8013a9e Bug 1944420: Update contextual opt-in message and remove the variation r=urlbar-reviewers,fluent-reviewers,dao,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D236504
2025-02-10 01:36:39 +00:00
Drew Willcoxon
3fb3b02e20 Bug 1945016 - Remove quickSuggestAllowPositionInSuggestions and support for suggestion.position. r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D236300
2025-02-04 01:16:48 +00:00
Marco Bonardo
c00a7f33e3 Bug 1943946 - Set deduplication days threshold to zero. r=mbeier
Differential Revision: https://phabricator.services.mozilla.com/D235609
2025-01-27 16:04:12 +00:00
James Teow
e18fba3011 Bug 1941467 - Allow Scotch Bonnet pref to toggle Persisted Search preference visibility - r=daleharvey,settings-reviewers,mossop
I also removed the Nimbus feature since there are no future plans to
run experiments solely on this feature.

Differential Revision: https://phabricator.services.mozilla.com/D234135
2025-01-16 16:54:14 +00:00
Marco Bonardo
20e3a689d9 Bug 1937136 - Let address bar trimHttps and untrim just be controlled by the ScotchBonnet override. r=jteow
Differential Revision: https://phabricator.services.mozilla.com/D233530
2025-01-13 15:26:23 +00:00
Marco Bonardo
6b17f6941a Bug 1937136 - Show the not-secure label in the address bar for http. r=jteow
Differential Revision: https://phabricator.services.mozilla.com/D233529
2025-01-13 15:26:22 +00:00
Dale Harvey
c527181f28 Bug 1939547 - Show an onboarding label to first time quickactions users. r=daisuke,desktop-theme-reviewers,urlbar-reviewers,dao,flod
Differential Revision: https://phabricator.services.mozilla.com/D233023
2025-01-12 23:24:52 +00:00
Drew Willcoxon
d798414004 Bug 1938517 - Implement new "simplest" weather suggestion UI. r=fluent-reviewers,desktop-theme-reviewers,urlbar-reviewers,emilio,bolsson,daisuke
This makes a number of changes to support a new UI treatment for weather
suggestions in addition to the two existing treatments. Unfortunately we need
all three to experiment with, but hopefully after experimentation is done we can
remove the two existing treatments.

This patch refers to the new treatment as the "simplest" UI. The Figma is at [1]
although it doesn't reflect some details Josh and I have discussed. One of the
existing treatments is already called "simple", and this patch changes its name
to "simpler". The patch refers to the other existing treatment as "full". These
names are only informal because the Nimbus variable and fallback pref are
integers.

Because the new UI treatment is so simple, we can pretty much use the standard
rich suggestion UI for it. The existing treatments are dynamic. I say "pretty
much" because I did need to add a capability to rich suggestions,
`result.richSuggestionIconVariation`, which lets results set an `icon-variation`
attribute on their rows. Weather suggestions use it to choose the appropriate
weather icon in the CSS.

I also modified l10n string caching in a few ways to address a couple of
problems:

* I like how dynamic results can cache their strings lazily by setting
  `cacheable` in their l10n objects. Standard results can only cache their
  strings by adding them to `UrlbarView.#cacheL10nStrings()`. That method is
  getting pretty big, and it also doesn't work well with strings that have
  arguments since it's called to pre-cache strings before they're used, when
  there are no arguments. So I extended `cacheable` support to all l10n objects,
  not only those from dynamic results.
* Josh's spec calls for the temperature in the suggestion title to be bolded.
  There's no good way to do that right now. We have highlights, but they aren't
  useable for l10n strings. The simplest thing -- and what I've done before in
  cases like this -- is to include `<strong>` tags in the l10n string itself.
  That works except for when we have a cache hit with the l10n cache. In that
  case, we set the `textContent`, which of course renders the tag literally. So
  I added a `parseMarkup` option to l10n objects that says the cached string
  should be set as `innerHTML` instead. Actually, for security I parse the
  string into a sanitized document fragment. We could just always do this and
  get rid of `parseMarkup`, but it seems wasteful since most l10n strings don't
  need it.
* While addressing the previous two points, it made sense to move
  `setElementL10n()` from the view to `L10nCache`. That way all these
  cache-related functions are together.

Finally, Josh noticed one of the dark-mode colors in the icon SVG didn't have
enough contrast with the standard dark-mode panel background, so I updated that
to a new color he chose (from `#80808F` to `#9393A8`).

[1] https://www.figma.com/design/Hdi0oHB7trRcncyVAKZypO/accuweather-explorations?node-id=3548-15992&t=f4YUShEe5RkP2KEg-1

Differential Revision: https://phabricator.services.mozilla.com/D232703
2024-12-27 18:11:23 +00:00
Dale Harvey
de3355f54c Bug 1938102 - Enable actions mode properly and reenable tests r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D232685
2024-12-26 20:19:20 +00:00
Daisuke Akatsuka
575c551ee4 Bug 1937363: Use Unified Search Button full name r=desktop-theme-reviewers,dao,daleharvey
Depends on D232160

Differential Revision: https://phabricator.services.mozilla.com/D232454
2024-12-24 04:02:26 +00:00
Drew Willcoxon
31a8192d0b Bug 1932502 - Remove the Suggest JS backend: Part 4: Remove other Nimbus variables and legacy telemetry. r=daisuke
This is part 4 of 4. There are some Nimbus variables that are now unused plus
one legacy histogram.

Depends on D231467

Differential Revision: https://phabricator.services.mozilla.com/D231468
2024-12-11 20:50:46 +00:00
Dale Harvey
5553b2965a Bug 1935195 - Add action to open tabgroup. r=dao,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D231157
2024-12-08 23:17:43 +00:00
Daisuke Akatsuka
8c442be904 Bug 1928132: Implement dynamic Unified Search Button mode r=desktop-theme-reviewers,daleharvey,dao,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D228954
2024-12-05 07:13:31 +00:00
Norisz Fay
5caeaca8fe Backed out 2 changesets (bug 1928132) for causing failures on browser_mouseout_notification_panel.js and Bug 1934387, Bug 1934388, Bug 1934389 CLOSED TREE
Backed out changeset 2ea4986f9eb8 (bug 1928132)
Backed out changeset 4a72ad308d0c (bug 1928132)
2024-11-30 15:43:28 +02:00
Daisuke Akatsuka
38412e4cd1 Bug 1928132: Implement dynamic Unified Search Button mode r=desktop-theme-reviewers,daleharvey,dao,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D228954
2024-11-29 21:24:53 +00:00
Goloman Adrian
2cd2737f6f Backed out 2 changesets (bug 1928132) for causing bc failures browser_popupNotification_2.js. CLOSED TREE
Backed out changeset 5882194e7456 (bug 1928132)
Backed out changeset 0d13b91f55e0 (bug 1928132)
2024-11-29 15:18:36 +02:00
Daisuke Akatsuka
c738c0eb32 Bug 1928132: Implement dynamic Unified Search Button mode r=desktop-theme-reviewers,daleharvey,dao,tabbrowser-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D228954
2024-11-29 11:18:02 +00:00
Chidam Gopal
97ae6b8b30 Bug 1932429 - Add intentThreshold to MLSuggest r=adw,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D229656
2024-11-20 21:40:29 +00:00
Dale Harvey
54534a73d2 Bug 1930547 - Reenable contextual search in ScotchBonnet. r=daisuke,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D229279
2024-11-18 20:33:08 +00:00
Drew Willcoxon
7843b32acc Bug 1931220 - Enable the simple UI for urlbar weather suggestions. r=daisuke
This has a minor unrelated change to `test_weather.js` that I meant to make in
D228775.

Depends on D228775

Differential Revision: https://phabricator.services.mozilla.com/D229050
2024-11-14 23:47:12 +00:00
Drew Willcoxon
46e4bc125c Bug 1930697 - Fix "Show less frequently" behavior for city-based weather suggestions. r=daisuke
This makes the "Show less frequently" behavior, prefs, and Nimbus variables for
weather sugestions more like those for Yelp suggestions. Yelp suggestions have
the best implementation for this and they're the model we should follow from now
on.

We don't have to worry too much about backward compatibility. Weather has never
been enabled by default except since late last week on Nightly. It has been
enabled in experiments, so there are some actual users out there who interacted
with them, but the worst that could happen is we'll lose the number of times
they clicked "show less frequently," so they may need to do that again if they
end up triggering weather suggestions again. This patch still respects the value
of the `weather.minKeywordLength` pref, which is the most important, so users
that previously incremented it will still see correct behavior.

Depends on D228742

Differential Revision: https://phabricator.services.mozilla.com/D228755
2024-11-14 05:44:34 +00:00
Drew Willcoxon
aa56c40785 Bug 1926381 - Integrate MLSuggest with UrlbarProviderQuickSuggest and implement Yelp ML suggestions. r=daisuke
This adds a new Suggest backend for ML-based suggestions called
`SuggestBackendMl`. Before, with the JS and Rust backends, only one backend was
enabled at a time, but both the ML and Rust backends can be enabled at the same
time since we will want to serve suggestions from both for the foreseeable
future. Features can support ML suggestions by implementing the new
`BaseFeature.mlIntent` getter and handling ML suggestions in `makeResult()`.
Each feature can decide whether it supports ML suggestions and whether they
should be preferred over Rust suggestions.

I've updated the Yelp feature to hook into this, since Yelp suggestions are
supported by the ML model that Chidam is working on. If ML is enabled, then the
feature will only serve ML suggestions. I'm not sure if that's what we want long
term, but for now that will make it clear to people which backend is being used
while we develop this feature.

The `quickSuggestMlEnabled` variable/pref determines whether the ML backend is
enabled. The `yelpMlEnabled` variable/pref determines whether Yelp ML
suggestions are enabled. We can create similar variable/prefs for each feature
that supports ML suggestions so that they can be toggled independently of each
other.

Other changes:

Move the `is_sponsored` logic out of the Rust backend and into the provider.
Otherwise it would need to be duplicated in the ML backend too.

Depends on D224523

Differential Revision: https://phabricator.services.mozilla.com/D226736
2024-10-24 09:52:00 +00:00
Chidam Gopal
3b89ccb50a Bug 1922591 - MLSuggest for yelp, weather intent classification and NER location r=adw DONTBUILD
Differential Revision: https://phabricator.services.mozilla.com/D224523
2024-10-23 20:40:18 +00:00
Drew Willcoxon
cbbe362eed Bug 1925734 - Remove UrlbarProviderWeather, the weatherKeywords Nimbus variable, and JS-backend support for weather suggestions. r=daisuke
Depends on D225051

Differential Revision: https://phabricator.services.mozilla.com/D226214
2024-10-22 01:59:13 +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
Dale Harvey
03e5396a93 Bug 1924661 - Remove contextual search from being enabled with ScotchBonnet. r=daisuke,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D225621
2024-10-16 11:46:55 +00:00
Moritz Beier
1bcaefc14e Bug 1389229 - Deduplicate urlbar history results that only differ by their URL fragment. r=mak,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D222672
2024-10-11 07:18:04 +00:00
Dale Harvey
be347dbe5e Bug 1921323 - Add new pref to handle persistant search mode. r=daisuke,urlbar-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D224055
2024-10-01 10:25:43 +00:00
Dale Harvey
522658f297 Bug 1918437 - Disable secondary actions based switch to tab. r=daisuke,desktop-theme-reviewers,urlbar-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D223704
2024-09-30 22:10:48 +00:00
Drew Willcoxon
82a6053f4b No bug - SNG-1837 - Stop pre-fetching the urlbar weather suggestion. r=daisuke
This also removes VPN detection. That was only really necessary back when the
weather suggestion was zero-prefix, i.e., when it was shown simply by clicking
in the urlbar without typing anything. I think if you go to the trouble of
typing a weather keyword, we should show you the suggestion even if you're on a
VPN.

Differential Revision: https://phabricator.services.mozilla.com/D223874
2024-09-27 01:59:28 +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
333d2a9ac1 Bug 1915766 - Add a Nimbus variable that hides the Suggest UI. r=daisuke,settings-reviewers,mossop
This makes `browser_search_firefoxSuggest.js` more realistic by installing a
Nimbus experiment to change the Suggest scenario instead of manually setting the
scenario via the helper function. (The "scenario" just means whether Suggest is
enabled or not, basically. "history" means it's not enabled; "offline" and
"online" mean it's enabled. The difference between the latter two is that in
"online" the user has opted in to the Merino server, and that only means one of
the Suggest prefs is true instead of false.)

I noticed `browser_privacy_firefoxSuggest.js` does not check the visibility of
its Suggest section at all, so I added similar tasks to it and factored out the
common helpers into `head.js`.

Depends on D221097

Differential Revision: https://phabricator.services.mozilla.com/D221099
2024-09-11 19:40:01 +00:00
Drew Willcoxon
8c6acb1e3d Bug 1916873 - Allow Suggest to be safely enabled in non-Suggest locales. r=daisuke,settings-reviewers,mossop
In addition to addressing the bug, this also adds some exposure tests to make
sure that they can be triggered in non-Suggest locales and that non-exposure
suggestions are not triggered.

Depends on D220501

Differential Revision: https://phabricator.services.mozilla.com/D221097
2024-09-11 19:39:59 +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
247ce81e9b Bug 1915317 - Integrate Rust exposure suggestions with desktop. r=daisuke
This integrates Rust exposure suggestions with desktop. Exposure suggestions are
a part of the replacement for the existing potential exposures feature
(bug 1881875). When we want to test potential exposures in the future, we can
add new exposure suggestions to remote settings and tell the Rust component to
ingest them and return them in queries. When the Rust component returns an
exposure suggestion, desktop will record it in exposure telemetry. (The other
part of the replacement is keyword exposure telemetry in bug 1915507 D220501).

More details about the design of exposure suggestions here:

* Bug 1893086
* https://github.com/mozilla/application-services/pull/6343

The way desktop tells the Rust component about different types of exposure
suggestions is through the new "provider constraints" feature. `ingest()` and
`query()` can take a `SuggestionProviderConstraints` object that changes what's
ingested and queried. Therefore, we need to re-ingest exposure suggestions when
the provider constraints change. Right now, exposure suggestions are the only
kind of suggestions that use provider constraints.

Depends on D220359

Differential Revision: https://phabricator.services.mozilla.com/D220359
2024-09-06 04:30:20 +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