Commit Graph

157 Commits

Author SHA1 Message Date
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
Mark Banner
88e658c23d Bug 1792824 - Convert ObjectUtils.jsm to an ES module. r=barret,necko-reviewers,devtools-reviewers,kershaw
Depends on D183308

Differential Revision: https://phabricator.services.mozilla.com/D183309
2023-07-12 08:07:23 +00:00
Drew Willcoxon
a97e10fc4d Bug 1841409 - Create new row content as necessary to make sure the Feedback button is shown. r=dao
Depends on D182537

Differential Revision: https://phabricator.services.mozilla.com/D182625
2023-07-05 18:24:57 +00:00
Stanca Serban
538414cfdf Backed out changeset 5cf32b0ba18a (bug 1841409) for causing mochitests failures. CLOSED TREE 2023-07-06 01:30:56 +03:00
Drew Willcoxon
03f0ab404d Bug 1841409 - Create new row content as necessary to make sure the Feedback button is shown. r=dao
Depends on D182537

Differential Revision: https://phabricator.services.mozilla.com/D182625
2023-07-05 18:24:57 +00:00
Drew Willcoxon
f4e3504885 Bug 1841447 - Change the "Top pick" label to "Recommended reads" for Pocket suggestions. r=daisuke,fluent-reviewers,flod
Depends on D182634

Differential Revision: https://phabricator.services.mozilla.com/D182635
2023-07-05 15:47:25 +00:00
Drew Willcoxon
d9b865e27c Bug 1841446 - Update the "Not interested" command to disable Pocket suggestions. r=daisuke,fluent-reviewers,flod
Depends on D182606

Differential Revision: https://phabricator.services.mozilla.com/D182634
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
Drew Willcoxon
a3b4788a20 Bug 1841354 - Always remove the feedback acknowledgment when a row is updated. r=dao
Differential Revision: https://phabricator.services.mozilla.com/D182608
2023-07-03 21:00:25 +00:00
Katherine Patenio
ce9d8a5dad Bug 1834831 - update imports of browser/modules JSMs r=webdriver-reviewers,perftest-reviewers,zeid,extension-reviewers,settings-reviewers,pip-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,sessionstore-reviewers,tabbrowser-reviewers,whimboo,mhowell,sgalich,robwu,sparky,Standard8,mconley,dao,sclements
Differential Revision: https://phabricator.services.mozilla.com/D179169
2023-06-19 18:44:48 +00:00
Cristian Tuns
f826f1b621 Backed out 2 changesets (bug 1834831) for causing node failures with checkBundles CLOSED TREE
Backed out changeset 58b351a155c8 (bug 1834831)
Backed out changeset 1acbb5231d14 (bug 1834831)
2023-06-19 13:22:35 -04:00
Katherine Patenio
333197cd22 Bug 1834831 - update imports of browser/modules JSMs r=webdriver-reviewers,perftest-reviewers,zeid,extension-reviewers,settings-reviewers,pip-reviewers,credential-management-reviewers,devtools-reviewers,fxview-reviewers,sessionstore-reviewers,tabbrowser-reviewers,whimboo,mhowell,sgalich,robwu,sparky,Standard8,mconley,dao,sclements
Differential Revision: https://phabricator.services.mozilla.com/D179169
2023-06-19 16:46:18 +00:00
Mark Banner
0677cff70b 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
Daisuke Akatsuka
23b8b21405 Bug 1835227: Clear selected element without updating urlbar when mouseup r=adw
Differential Revision: https://phabricator.services.mozilla.com/D180892
2023-06-14 22:15:26 +00:00