Commit Graph

141 Commits

Author SHA1 Message Date
Dale Harvey
3a3707ff44 Bug 1891863 - Implement initial prototype of dedicated search button. r=dao,fluent-reviewers,desktop-theme-reviewers,bolsson
Differential Revision: https://phabricator.services.mozilla.com/D209469
2024-06-12 13:14:14 +00:00
Karandeep
bd970b997d Bug 1857236 - invoking onEngagement on every provider is error prone. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D202482
2024-05-15 13:13:02 +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
Daisuke Akatsuka
c6bfe80f01 Bug 1889820: Add isManageable attribute to show 'Manage' result menu item in a suggestion r=adw
Differential Revision: https://phabricator.services.mozilla.com/D206862
2024-04-09 07:41:52 +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
Mark Banner
afdbce2ec3 Bug 1884623 - Update more jsm references in production code and docs in browser/. r=mossop,extension-reviewers,omc-reviewers,migration-reviewers,robwu,mconley,aminomancer
Differential Revision: https://phabricator.services.mozilla.com/D204182
2024-03-11 15:26:28 +00:00
Marco Bonardo
36ad633e1e Bug 1883845 - Switch to tab entries in Top Sites (zero prefix) don't support cross container search. r=jteow
Differential Revision: https://phabricator.services.mozilla.com/D203730
2024-03-09 12:05:44 +00:00
Dave Townsend
35b9a307e5 Bug 1864896: Remove jsdoc params for removed arguments (browser/components/urlbar). r=mak
Differential Revision: https://phabricator.services.mozilla.com/D202955
2024-03-03 09:09:10 +00:00
Dave Townsend
98ed146e46 Bug 1864896: Autofix unused function arguments (browser/components/urlbar). r=mak
Differential Revision: https://phabricator.services.mozilla.com/D202954
2024-03-03 09:09:09 +00:00
Marco Bonardo
adbeacbb4a Bug 1880069 - Switch-to-tab result sometimes appears twice with wrong container. r=jteow
The InputHistory (adaptive) provider is not properly reporting the open tab
userContextId, thus the Muxer is unable to dedupe results properly.
This cleans up the query a little bit avoiding numeric indices and fields that
are unused later.

Differential Revision: https://phabricator.services.mozilla.com/D203012
2024-03-01 12:23:49 +00:00
Marco Bonardo
41a226217e Bug 1880510 - Use console.createInstance instead of Log.sys.mjs in Urlbar. r=jteow
Differential Revision: https://phabricator.services.mozilla.com/D201985
2024-02-20 08:58:33 +00:00
Drew Willcoxon
5903331bc7 Bug 1878444 - Update quick suggest config to account for Rust. r=daisuke
There are two types of config in Rust Suggest: global and per-provider. Right
now global contains `show_less_frequently_cap`, and the only provider config is
for weather, which contains `min_keyword_length`. This patch uses both of them.

It makes sense to me to fetch config as part of the ingest process, so that's
what I've done. I'm not sure when else would be a good time. It's async so it's
not too convenient to do it on demand.

In RS records and attachement JSON, we use snake_case, but Rust converts it to
camelCase (actually UniFFI does, I think). That means the JS backend will use
snake_case for all config, but the Rust backend will use camelCase. I wrote a
helper for converting snake to camel so we can always just use camel.

Depends on D200755

Differential Revision: https://phabricator.services.mozilla.com/D201023
2024-02-13 06:16:19 +00:00
Drew Willcoxon
a2cb610df6 Bug 1878441 - Update the weather suggestions implementation to account for Rust. r=daisuke
This patch requires https://github.com/mozilla/application-services/pull/6089,
which hasn't been vendored yet, so it will be hard to test unless you locally
vendor. I've done that and verified that weather tests still pass.

Weather suggestions in Rust work like this: Rust stores the weather keywords in
the `keywords` table, and when the query matches a keyword, it returns a dummy
`Weather` suggestion that only contains a score. That means weather suggestions
are handled nearly like every other type of suggestion, except when Firefox
receives a weather suggestion from Rust, it must replace it with the actual
suggestion from Merino.

We also need to continue to support weather keywords defined in Nimbus. For
that, this patch continues to use `UrlbarProviderWeather` because I don't want
to add a special case to `UrlbarProviderQuickSuggest` just for this one type of
suggestion. When we stop experimenting with weather, we can remove that
provider.

I moved all the common code from `UrlbarProviderWeather` to `Weather` so both
providers can use it.

Some of the tests check `minKeywordLength` and can't use Rust yet. I'll handle
that in bug 1878444.

Depends on D200105

Differential Revision: https://phabricator.services.mozilla.com/D200755
2024-02-08 01:47:05 +00:00
Marco Bonardo
f0bd48ca5b Bug 1876743 - Enable cross-container Tab Search in Nightly. r=mseibert
Fixes code to properly run tests with the feature enabled.
Fixes code not considering payload.userContextId is set to -1 for private
windows.
Fixes a bug in the _openTabs Map where multiple open tabs to the same url are
not properly counted.

Differential Revision: https://phabricator.services.mozilla.com/D200036
2024-02-07 09:29:32 +00:00
Karandeep
c394e93376 Bug 1855958 - Remove the experimental urlbar API (first patch). r=mak,extension-reviewers,desktop-theme-reviewers,robwu
ext-urlbar.js is unused but will be removed in a separate
patch to avoid test failures in condprof tests. Condprof tests may use
an outdated profile directory that still references ext-urlbar.js in
startupcache files, which triggers a test-only test failure in
mozilla::net::CheckForBrokenChromeURL.

Differential Revision: https://phabricator.services.mozilla.com/D199769
2024-02-05 17:04:37 +00:00
Marc Seibert
3c59e67e07 Bug 1841869 - entering "abc @xyz.[TLD]" in address bar opens a prompt regarding loading "xyz.[TLD]" instead of searching for "abc @xyz.[TLD]" on the default search engine.r=adw
Differential Revision: https://phabricator.services.mozilla.com/D198196
2024-01-31 19:07:57 +00:00
Drew Willcoxon
0ec8c8bac6 Bug 1875533 - Properly count hidden urlbar result exposures. r=mak,wstuckey
This fixes the two `#addExposure()` calls in `UrlbarView.#updateResults()` so
that hidden exposures are properly counted. Right now we overcount them because
we record them in cases where the result would not have been shown anyway.

The new test tries to cover all possible `UrlbarView.#updateResults()` paths:

* When the view is full and a new result can't replace any of the old rows, the
  new result is appended and hidden. If the query is then canceled, the new row
  will never be shown
* When the vew isn't full, a new row can be appended and visible immediately
* When a new row replaces an old row, it can be visible immediately

Differential Revision: https://phabricator.services.mozilla.com/D199176
2024-01-25 20:15:55 +00:00
Dão Gottwald
fe07007fb3 Bug 1810113 - UrlbarProviderPlaces and UrlbarProviderSearchSuggestions should set isBlockable and blockL10n for history results. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D168993
2024-01-19 21:43:28 +00:00
Marc Seibert
6a56f90bb3 Bug 1858994 - Punycode is shown in heuristic result. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D191218
2024-01-12 13:56:28 +00:00
Dale Harvey
f050034465 Bug 1865273 - Don't group rich suggestions last in urlbar results. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D194177
2023-11-29 15:56:08 +00:00
Cristian Tuns
11a7654db7 Backed out changeset d7e5b4cd4c20 (bug 1865273) for causing bc failures in browser_searchShowSuggestionsFirst.js CLOSED TREE 2023-11-29 11:53:54 -05:00
Dale Harvey
263da5e4cd Bug 1865273 - Don't group rich suggestions last in urlbar results. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D194177
2023-11-29 15:56:08 +00:00
Dão Gottwald
402c6a1544 Bug 1866292 - Add fxsuggest_data_sharing_opt_in as a recorded result type. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D194689
2023-11-28 07:59:32 +00:00
Dão Gottwald
9c4a268f65 Bug 1866069 - Announce title and description on the contextual opt-in row when selecting the first element (i.e. the learn more link). r=daleharvey
This is a hack for the experiment and likely not ideal for screen readers, but better than what we have. I'm reaching out to a11y folks to figure out the right long-term solution here. I'll make an effort to get that ready for the experiment too, but would like to get this landed as a backup.

Differential Revision: https://phabricator.services.mozilla.com/D194501
2023-11-28 07:58:01 +00:00
Marc Seibert
300545756c Bug 1657237 - Address Bar flashes punycode when loading page.r=mak
Differential Revision: https://phabricator.services.mozilla.com/D192696
2023-11-20 17:11:23 +00:00
Stanca Serban
014881cc49 Backed out changeset e65fca949600 (bug 1858994) for causing xpcshell failures in test_autofill_bookmarked.js. 2023-11-08 12:47:20 +02:00
Marc Seibert
c5a7631ede Bug 1858994 - Punycode is shown in heuristic result.r=mak
Differential Revision: https://phabricator.services.mozilla.com/D191218
2023-11-08 09:21:29 +00:00
Marc Seibert
d102db072b Bug 1479858 - Added option for UrlBar search open tabs to ignore userContextId.r=mak,dao
Oiriginal patch author: Paresh Malalur <atararx@gmail.com>

Differential Revision: https://phabricator.services.mozilla.com/D187465
2023-10-13 08:48:46 +00:00
Dale Harvey
9aed4a17ff Bug 1852848 - Implement recent searches provider. r=mak,fluent-reviewers,flod,settings-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D189104
2023-10-11 00:06:32 +00:00
Drew Willcoxon
0d60a186b7 Bug 1855884 - Handle icons from the Suggest Rust component. r=dao
The new Rust implementation of Suggest stores icons for some suggestion types in
its Sqlite database, and it returns these icons to consumers as byte arrays. To
show these icons in the view quickly and without any overhead, we can create
`Blob` URLs from the arrays. Blob URLs need to be revoked when we're done with
them to avoid leaking the backing data.

This patch implements some simple lifetime management of blob URLs in the view.
The first time the view shows a result, it creates a blob URL for the result's
icon. The view caches the URL while it remains open, so as the user continues to
type and possibly match the same result many times, the view will use the same
blob URL each time. When the view closes, it revokes the URL. This seems like a
reasonable, natural lifetime for these URLs, and the implementation is simple.

Depends on D189452

Differential Revision: https://phabricator.services.mozilla.com/D189615
2023-10-05 04:36:12 +00:00
Marc Seibert
5fc5f53f97 Bug 1845710 - [UrlbarView] Add LRM to URLs with the protocol trimmed in the results pane.r=mak
Differential Revision: https://phabricator.services.mozilla.com/D186124
2023-09-26 15:00:54 +00:00
Marco Bonardo
0d8f8f3dd5 Bug 1844771 - Address Bar 'Remove from History' option doesn't work on Adaptive History results. r=jteow
Differential Revision: https://phabricator.services.mozilla.com/D188271
2023-09-19 19:50:27 +00:00
Karandeep
18853074a6 Bug 1842247 - Integrate clipboard result feature with existing telemetry for success measurement. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D187046
2023-09-15 14:16:16 +00:00
Dão Gottwald
e8147c6fc8 Bug 1853131 - Rename urlbarView-quickaction-row to urlbarView-quickaction-button. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D188238
2023-09-14 23:35:02 +00:00
Dale Harvey
95ab1ce9c9 Bug 1848048 - Add a result menu to disable trending results. r=dao,fluent-reviewers,settings-reviewers,flod,Gijs
Differential Revision: https://phabricator.services.mozilla.com/D187066
2023-09-01 08:38: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
3eb480f620 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
b98a9b276e 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
0a487b36b8 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
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
Drew Willcoxon
75a6c22fe7 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
bf1430c569 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
ceeb51063d 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
dc48e94cda 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
3bbfcdad94 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
a17069d865 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