Commit Graph

220 Commits

Author SHA1 Message Date
Mark Banner
f65518c3c0 Bug 1882577 - Make nsISearchEngine.getIconURL an async function. r=search-reviewers,extension-reviewers,settings-reviewers,robwu,mcheang,mak
Differential Revision: https://phabricator.services.mozilla.com/D203026
2024-03-13 14:51:06 +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
Drew Willcoxon
32ab59c29a Bug 1883482 - Transfer row labels to dismissal acknowledgment tips in the urlbar. r=dao,desktop-theme-reviewers
This makes sure the row label transfers to the dismissal acknowledgment tip, if
the dismissed row has a label.

With that fixed, there's one other cosmetic problem where the tip's top border
is right up against the row label. It doesn't look good. I added some additional
space between the label and border.

Differential Revision: https://phabricator.services.mozilla.com/D203559
2024-03-07 20:07:49 +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
Marc Seibert
766fa5166e Bug 1880066 - Switch-to-tab container icons are blurry on Windows/Ubuntu.r=mak
Differential Revision: https://phabricator.services.mozilla.com/D202151
2024-02-20 15:13:44 +00:00
Drew Willcoxon
42558afc2e Bug 1879397 - Show a "Local recommendations" group label for Yelp suggestions and cache remaining group l10n strings. r=daisuke,fluent-reviewers,bolsson
This adds a "Local recommendations" group label for Yelp suggestions.

It also caches all Suggest group labels to avoid pop-in in the urlbar view. The
MDN and Pocket labels weren't being cached.

Differential Revision: https://phabricator.services.mozilla.com/D201157
2024-02-09 03:05:01 +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
Marc Seibert
ac30c46680 Bug 1876759 - Added voice over text for switch to container tab icon mode.r=mak
Differential Revision: https://phabricator.services.mozilla.com/D199730
2024-01-26 16:45:21 +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
Marc Seibert
0d5499987a Bug 1861530 - Implement the updated UX spec for Switch to tab in containers feature.r=mak,desktop-theme-reviewers,fluent-reviewers,bolsson,dao
Differential Revision: https://phabricator.services.mozilla.com/D192026
2024-01-23 08:54:19 +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
Mark Banner
0d18781645 Bug 1870644 - Remove nsISearchEngine.iconURI and replace by the new getIconURL function. r=search-reviewers,extension-reviewers,settings-reviewers,mconley,mcheang,robwu
Differential Revision: https://phabricator.services.mozilla.com/D196734
2023-12-20 13:28:24 +00:00
Marco Bonardo
fe296cb095 Bug 1863797 - Frequent failures in browser_schemeless.js due to UrlbarView.selectedElement removed from DOM. r=adw
#selectedElement may end up pointing to disconnected nodes. And so the public
.selectedElement getter.
This is how it was happening: a first call to onQueryResults adds and selects a
heuristic result. Then a second call to onQueryResults brings a new heuristic
result that requires new content (not compatible with the previous one), so the
old heuristic is emptied out, and new DOM is generated.
Because the code in onQueryResults relies on .selectedElement, at the second
invokation it thinks the selection is still valid, and doesn't select the new
heuristic. In reality .selectedElement at that time is pointing to a removed
DOM node.
The patch introduces a #rawSelectedElement and converts #selectedElement
into a getter.

Plus some minor logging improvements, and removing unused #mainContainer property.

Differential Revision: https://phabricator.services.mozilla.com/D195779
2023-12-13 10:05:26 +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
Dão Gottwald
221ee286cf Bug 1866620 - [Firefox Suggest Opt-in Experiment] Bring narrow layout for topPosition=false in line with topPosition=true. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D194691
2023-11-28 07:56:47 +00:00
Karandeep
b738a1c8bd Bug 1860548 - Enable the URL Paste Suggestion feature by default in Nightly. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D191868
2023-11-20 17:14:25 +00:00
Dão Gottwald
0b3462869a Bug 1864121 - [Firefox Suggest Opt-in Experiment] Add Shortcuts group label when contextual opt-in UI is shown above top sites. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D193649
2023-11-16 07:17:13 +00:00
Narcis Beleuzu
ec313d1988 Backed out changeset 74497487caf9 (bug 1860548) for bc failure on browser_rich_suggestions.js 2023-11-15 21:02:51 +02:00
Karandeep
d93a0aa5e2 Bug 1860548 - Enable the URL Paste Suggestion feature by default in Nightly. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D191868
2023-11-15 10:51:27 +00:00
Cosmin Sabou
7ad28e385c Backed out changeset 41043c74e42a (bug 1860548) for bc failures on browser_quicksuggest_addons.js. CLOSED TREE 2023-11-08 01:06:14 +02:00
Karandeep
a919ed09a3 Bug 1860548 - Enable the URL Paste Suggestion feature by default in Nightly. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D191868
2023-11-07 15:14:38 +00:00
Dale Harvey
cfb2de23a6 Bug 1862704 - Use moz-bool-pref to test for richsuggestions. r=dao,desktop-theme-reviewers,emilio
Differential Revision: https://phabricator.services.mozilla.com/D192600
2023-11-03 09:43:10 +00:00
Marc Seibert
c302da11ed Bug 1859810 - Bookmark suggestion includes container label before URL with browser.urlbar.switchTabs.searchAllContainers = true.r=mak
Differential Revision: https://phabricator.services.mozilla.com/D191636
2023-11-02 14:50:58 +00:00
Drew Willcoxon
148a53ad56 Bug 1827966 - Part 4: Remove resultMenu pref and support for dismiss and help buttons. r=dao,fluent-reviewers,desktop-theme-reviewers
Depends on D190894, D190846

Differential Revision: https://phabricator.services.mozilla.com/D190895
2023-10-13 21:52:07 +00:00
Karandeep
c1cccccbdc Bug 1858141 - Adapt clipboard suggestions to the spec. r=mak,fluent-reviewers,desktop-theme-reviewers,dao
Differential Revision: https://phabricator.services.mozilla.com/D190846
2023-10-13 15:06:06 +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
Drew Willcoxon
234916db20 Bug 1857391 - Remove Firefox Suggest "best match" as its own separate feature. r=daisuke,settings-reviewers
This removes "best match" as its own separate Firefox Suggest feature. In the
future, whether or not a suggestion is a best match (a.k.a. top pick) will be
determined by relevant product requirements. I've confirmed this with Nive.

Here's a summary of changes:

* Removes prefs and Nimbus variables related to best match
* Removes the "Top pick" checkbox in about:preferences
* Removes support for the `best_match` quick suggest config property. This
  property was removed from the config in remote settings a while ago.
* Removes legacy telemetry scalars related to best match. These scalars were
  added years ago for the original best match experiment and before we started
  using Glean. In the case of non-sponsored suggestions, the scalars have not
  been recorded at all for some time. In the case of sponsored suggestions, they
  can now be recorded again due to the recent addition of sponsored priority
  suggestions, but they are superseded by Glean.

Differential Revision: https://phabricator.services.mozilla.com/D190516
2023-10-11 17:17:06 +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
5637241541 Bug 1857971 - Set has-action on dynamic-result-type rows when they contain an action. r=dao
This expands D190144 so we check for actions as well as URLs. I also modified
tests for the affected row types so they test the visibility of the separator.

Differential Revision: https://phabricator.services.mozilla.com/D190494
2023-10-10 15:56:49 +00:00
Drew Willcoxon
b5c8e70a1f Bug 1857108 - Set has-url on dynamic-result-type rows when they contain a URL. r=dao
This sets `has-url` on dynamic-result-type rows when their view template
contains a `.urlbarView-url` element. This fixes the missing separator in both
addon and weather rows.

This does not address one remaining problem: When `wrap` is set, the separator
is still missing in addon rows because they don't handle wrapping. Prior to
bug 1855639, they just always showed their title separator, and since they don't
wrap their URL, that was fine. I'd like to handle that separately by converting
addon rows from dynamic to standard. I filed bug 1857137 for that.

Differential Revision: https://phabricator.services.mozilla.com/D190144
2023-10-06 03:28:12 +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
Daisuke Akatsuka
7205841601 Bug 1856736: Revert group labels and result labels to their previous appearance r=adw
Differential Revision: https://phabricator.services.mozilla.com/D189984
2023-10-03 22:24:04 +00:00
Emilio Cobos Álvarez
f4022b40cd Bug 1855776 - Deal correctly with overflow / underflow events in urlbar view. r=dao
The detail value for overflow events is:

 0 - vertical
 1 - horizontal
 2 - both

This could cause the urlbar overflow state to be incorrect in some
cases.

Not sure how to test this, I found it via code inspection.

Differential Revision: https://phabricator.services.mozilla.com/D189547
2023-09-29 17:09:15 +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
Dão Gottwald
dbfff57b2c Bug 1853954 - Rename actionoverride to action-override and make it a standard boolean attribute. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D188606
2023-09-20 07:45:01 +00:00
Daisuke Akatsuka
fe247c61cb Bug 1852187: Move sponsored suggestions higher r=adw,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D187873
2023-09-14 05:14:48 +00:00
Drew Willcoxon
657f813e79 Bug 1852300 - Make dismissal acknowledgments go through UrlbarController.removeResult(). r=dao
The problem is that showing the dismissal acknowledgment tip does not remove the
result from the query context, so when the view later opens and reuses the
cached query context, it still has the dismissed result in it.

At first I thought I should modify `UrlbarView.acknowledgeDismissal()` so it
either invalidates the context cache or removes the result from the cached
context, but I saw that dismissals without the acknowledgment tip do not have
this problem. That's because they go through `UrlbarController.removeResult()`,
which removes the result from the context and then notifies the view.

The real problem is that I implemented dismissal acknowledgments wrong. They
should start by going through `UrlbarController.removeResult()` too.

This patch updates all callers of `acknowledgeDismissal()` so they call
`removeResult()` instead. To signal that an acknowledgment should be shown, they
first set a `result.acknowledgeDismissalL10n` property. When the view is
notified that a result was removed, it shows the tip if this property is
present.

Differential Revision: https://phabricator.services.mozilla.com/D187830
2023-09-11 17:04:09 +00:00
Dão Gottwald
7a673fd5d2 Bug 1852033 - Make wrap a standard boolean attribute. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D187671
2023-09-07 16:56:32 +00:00
Drew Willcoxon
538d1e2bd5 Bug 1851940 - Enable addon suggestions by default with treatment B (no stars) for all Suggest users. r=daisuke
This enables addon suggestions by default (treatment B, no stars) for all
Suggest users. As discussed on Slack, I did not remove the related prefs and
Nimbus variables in case something goes wrong and we need to disable the feature
ASAP. In that case, we can ship a Nimbus rollout to re-disable it. After a
release cycle or two without any problems, we can do a follow-up that removes
them. I also left the treatment A implementation. We can remove that in a
follow-up too.

Since I did leave the prefs and variables, I only had to change their default
values to enable the feature with treatment B.

One problem is that addon suggestions should be best matches, but we don't want
to set `bestMatch.enabled` to true by default. To work around that, I set the
related best-match properties on the `UrlbarResult` inside `AddonSuggestions`
instead of delegating it to the quick suggest provider. Product has requested
that we remove the "Top pick" checkbox from about:preferences, and at that time
we should also remove the `bestMatch.enabled` pref. In the future, results
should be best matches on a case-by-case basis.

This makes a few UI changes that aren't strictly related but I wanted to fix
since more users will now see these suggestions:

* Cache the "Firefox extension" group label to prevent pop-in.
* Align the URL and row title by baseline. Right now the URL is too high above
  the title.
* Set `inline-margin-end` of the icon so it's symmetrical with the starting
  margin/padding. The current value of 8px is hardcoded and too small.

Differential Revision: https://phabricator.services.mozilla.com/D187640
2023-09-07 05:04:06 +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
Dão Gottwald
d5b2045a82 Bug 1850502 - Make isurl a standard boolean attribute and rename to is-url. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D187030
2023-08-31 09:31:06 +00:00
Dão Gottwald
c9db68947d Bug 1850133 - Make has-action a standard boolean attribute. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D186845
2023-08-29 03:23:45 +00:00
Dão Gottwald
fda767f343 Bug 1850132 - Use CSS nesting for rich results. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D186844
2023-08-29 03:22:27 +00:00
Daisuke Akatsuka
67db1d7516 Bug 1847475: Implement the result menu for MDN suggestions r=adw,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D185523
2023-08-10 07:37:21 +00:00
Dão Gottwald
5ebbacb887 Bug 1846765 - Various code style fixes. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D185262
2023-08-07 10:01:12 +00:00
Daisuke Akatsuka
1ccee30d4f Bug 1846915: Use a different 'Top pick' group label for MDN suggestions r=adw,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D185249
2023-08-04 13:29:08 +00:00
Daisuke Akatsuka
f647e524d5 Bug 1846907: Limit the description text to 2 or 3 lines r=desktop-theme-reviewers,adw,dao
Differential Revision: https://phabricator.services.mozilla.com/D185247
2023-08-04 13:21:14 +00:00
Drew Willcoxon
1a8069bc72 Bug 1846765 - Avoid using -moz-bool-pref CSS for experiments. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D185204
2023-08-03 01:06:02 +00:00
Karandeep
b0382c3163 Bug 1842230 - URL bar suggested action for paste when clipboard contains valid URL. r=mak,flod
Differential Revision: https://phabricator.services.mozilla.com/D183747
2023-08-01 11:51:59 +00:00
Marco Bonardo
dfb55f6331 Bug 1843100 - Address Bar view should not try to reuse rows from different providers. r=daleharvey
Different providers have different time characteristics, reusing results across
providers may thus cause flicker of results coming from the fastest ones.

Differential Revision: https://phabricator.services.mozilla.com/D183507
2023-07-19 07:43:40 +00:00