Commit Graph

153 Commits

Author SHA1 Message Date
Daisuke Akatsuka
51c5b9ed62 Bug 1913204: Apply container color border to secondary action button for tab switch r=desktop-theme-reviewers,urlbar-reviewers,daleharvey,dao
Differential Revision: https://phabricator.services.mozilla.com/D221114
2024-09-09 11:53:09 +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
Dale Harvey
9addf821be Bug 1907147 - Restore Actions search mode. r=desktop-theme-reviewers,urlbar-reviewers,fluent-reviewers,daisuke,dao,settings-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D216518
2024-08-22 16:18:57 +00:00
mcheang
f9e8516afa Bug 1912045 - Autofill for intuitive search keywords. r=daleharvey,urlbar-reviewers,mak
**Description**
- Add autofill functionality to UrlbarProvider Restrict Keywords.

**Acceptance Criteria**
- There are 3 restrict keywords `@history`, `@bookmarks`, and `@tabs`
- When the user types @ followed by the beginning of the search keyword: `@h`, `@hi`, `@his`, `@hist` etc. the user should be able to autofill the rest of the search by pressing tab
- The autofill should highlight the typed letters from the user, and show the entire keyword following what the user typed. For example:
- If the user typed `@hist` , autofill should highlight what the user typed and show the rest of the keyword `@history`:

**Example steps to test `@history` :**
- set `browser.urlbar.searchRestrictKeywords.featureGate` to true
- type out the full keyword and space `@history` , address bar should show results panel with history results
- type `@h` and press right arrow, shows results panel with history results
- type `@h` and press enter, shows results panel with history results
- type `@h` and press tab, does not show panel but selects the history restrict result. When the user starts typing, it will search their history and show results panel with history results

Differential Revision: https://phabricator.services.mozilla.com/D218742
2024-08-18 17:51:37 +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
Drew Willcoxon
067c9bc5b1 Bug 1911683 - Remove shouldNavigate for dynamic result types and make UrlbarUtils.getUrlFromResult() fall back to payload.url for all results. r=daisuke
Please see the bug for info.

Differential Revision: https://phabricator.services.mozilla.com/D218607
2024-08-06 01:41:04 +00:00
mcheang
934e5f7581 Bug 1902537 - Create UrlbarProviderRestrictKeywords to show localized bookmarks, history, and tabs restrict keywords results. r=mak,settings-reviewers,urlbar-reviewers
This patch includes:
- A new UrlbarProviderRestrictKeywords class
- Showing localized Search with Bookmarks, Search with History, Search with Tabs results after the user types @
- Add search restrict keywords to preferences UI Search Shortcuts table
- Hiding search restrict keyword behind browser.urlbar.searchRestrictKeywords.featureGate pref

Differential Revision: https://phabricator.services.mozilla.com/D213697
2024-07-19 23:45:58 +00:00
Drew Willcoxon
5b6f606320 Bug 1907696 - Change the Suggest ingest strategy so only enabled suggestion types are ingested. r=daisuke
Please see the bug for context. This changes how ingest works. Right now we
ingest all "default" suggestion types at once. This patch causes a suggestion
type to be ingested only when it's enabled.

Before this patch, there are two times ingest happens, on startup and when the
ingest timer fires.

With this patch, there are now a few times ingest happens:

* On startup (as before). `SuggestBackendRust` will ingest all registered and
  enabled suggestion types.
* When the ingest timer fires (as before). Similar to startup, all registered
  and enabled types will be ingested.
* When a suggestion type becomes enabled. I added this functionality to
  `BaseFeature.update()` so that each feature gets this behavior automatically.

It's worth saying more about the startup case. On startup, all `BaseFeature`s'
initializations race each other. `SuggestBackendRust` is itself a `BaseFeature`,
so there's no guarantee it will be initialized before other `BaseFeature`s that
implement Rust suggestions. If any `BaseFeature`s are initialized before
`SuggestBackendRust`, they'll try to ingest but nothing will happen because
`SuggestBackendRust` won't be initialized yet. Once `SuggestBackendRust` is
initialized, it will ingest suggestions for all registered `BaseFeature`s that
already tried and failed to ingest. And after `SuggestBackendRust` initializes,
any `BaseFeature`s that are initialized later will be able to successfully
ingest.

Differential Revision: https://phabricator.services.mozilla.com/D216488
2024-07-17 01:25:44 +00:00
James Teow
fa3b3d1fea Bug 1905100 - Remove Persisted Search Tip - r=adw,urlbar-reviewers
The onboarding will be handled by OMC who will help with the
messaging for all the scotch bonnet features.

Differential Revision: https://phabricator.services.mozilla.com/D215234
2024-07-01 23:45:47 +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
Marco Bonardo
44b8489d02 Bug 1876513 - Address bar should not prefix URIs that will be handled by schemeless HTTPS-First. r=daleharvey
When the address bar adds a non typed protocol, don't show the urifixup added
protocol to the user, as https-first may upgrade it, and the whole experience
could be confusing for the user.

Differential Revision: https://phabricator.services.mozilla.com/D213443
2024-06-20 09:02:15 +00:00
Dale Harvey
db1cca7c8d Bug 1871054 - Dont show suggestions for single character query. r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D213774
2024-06-17 13:18:59 +00:00
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