Commit Graph

138 Commits

Author SHA1 Message Date
Cristina Horotan
1255ede78b Backed out changeset fcc4aae881d7 (bug 1790020) for causing bc failures at browser_ext_urlbar.js CLOSED TREE 2023-03-09 13:11:26 +02:00
Dão Gottwald
4d726892e1 Bug 1790020 - Hook up urlbar result menu with telementry. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D168688
2023-03-09 09:54:20 +00:00
Stanca Serban
0edec904ef Backed out changeset e7822e311e0c (bug 1790020) for causing mochitests failures in browser/components/urlbar/tests/browser-tips/browser_searchTips_interaction.js. CLOSED TREE 2023-03-08 17:40:26 +02:00
Dão Gottwald
42c66fc8dd Bug 1790020 - Hook up urlbar result menu with telementry. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D168688
2023-03-08 14:22:31 +00:00
James Teow
5badf35776 Bug 1818848 - Use valid pageproxystate for persisted search terms when urlbar is un-focused - r=adw
Differential Revision: https://phabricator.services.mozilla.com/D170973
2023-03-07 22:08:32 +00:00
Daisuke Akatsuka
cc5cbd2fef Bug 1817155: Make results and groups empty if the result view has not been shown upon engagement r=mak
Differential Revision: https://phabricator.services.mozilla.com/D170143
2023-02-25 07:32:04 +00:00
Daisuke Akatsuka
fa543b9869 Bug 1815342: Take telemetry of the user action that deletes the autofilled string. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D169172
2023-02-09 21:55:22 +00:00
Dão Gottwald
fa7b554ee2 Bug 1801389 - SPACE should open the result menu when the button is selected. r=mak,Jamie
Differential Revision: https://phabricator.services.mozilla.com/D168522
2023-02-03 03:11:20 +00:00
Neil Deakin
21426e24f4 Bug 1776879, replace text/unicode for clipboard and drag and drop and use text/plain directly, r=edgar,mak,stransky,geckoview-reviewers,extension-reviewers,zombie,m_kato
Most usage is a straight replacement but gtk needs extra changes as it transfers plain text in UTF8 natively and needs to be converted into UTF16, and Windows uses single-byte characters for RTF and CF_HTML formats so we preserve this.

Differential Revision: https://phabricator.services.mozilla.com/D158587
2023-02-01 23:30:55 +00:00
Hannah Peuckmann
9f66067efd Bug 791594 - Set URL bar state while prompt is open. r=pbz,Gijs,adw
Differential Revision: https://phabricator.services.mozilla.com/D164441
2023-01-31 18:16:54 +00:00
Dão Gottwald
0d552ab65d Bug 1801299 - Fix outside click behavior for the urlbar result menu. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D167919
2023-01-26 16:24:26 +00:00
Daisuke Akatsuka
93900527e9 Bug 1808932: Take abandonment event even when closing the result view while the input does not have focus. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D167641
2023-01-25 22:38:27 +00:00
Mark Banner
2bd093b567 Bug 1811334 - Automatically replace Cu.reportError with console.error (most of browser/components). r=settings-reviewers,mconley
Differential Revision: https://phabricator.services.mozilla.com/D167297
2023-01-20 17:49:21 +00:00
Edgar Chen
3759883d83 Bug 1796548 - Introduce a generic method to check clipboard capabilities in nsIClipboard; r=geckoview-reviewers,nika,m_kato
Differential Revision: https://phabricator.services.mozilla.com/D166475
2023-01-16 19:50:17 +00:00
Dão Gottwald
e7a8bffbe0 Bug 1809705 - Implement "Learn more about Firefox Suggest" menu item in the urlbar result menu. r=adw,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D166578
2023-01-13 16:03:06 +00:00
Cristian Tuns
e148ca6903 Backed out changeset 03202cdedb1e (bug 1809705) for causing bc failures CLOSED TREE 2023-01-13 10:18:41 -05:00
Dão Gottwald
047b8c03dc Bug 1809705 - Implement "Learn more about Firefox Suggest" menu item in the urlbar result menu. r=adw,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D166578
2023-01-13 10:50:16 +00:00
Dão Gottwald
3ae3091bb9 Bug 1790024 - Add urlbar result menu for top pick and sponsored Firefox Suggest items. r=adw,fluent-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D166184
2023-01-11 12:23:26 +00:00
James Teow
537118e46e Bug 1803681 - Show the search term if returning to a tab contains a blank value - r=adw
Differential Revision: https://phabricator.services.mozilla.com/D163730
2023-01-03 18:24:36 +00:00
Dão Gottwald
0d540405bb Bug 1806491 - Add urlbar result menu for history suggestions. r=mak,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D165061
2022-12-23 15:54:08 +00:00
Daisuke Akatsuka
4b4fa32e15 Bug 1805717: Introduce search_mode property. r=mak,jteow
Differential Revision: https://phabricator.services.mozilla.com/D164794
2022-12-20 07:10:11 +00:00
Stanca Serban
8afe90eead Backed out changeset 3adf002ab926 (bug 1805717) for searchMode mochitests related failures in browser_touchbar_searchrestrictions.js. CLOSED TREE 2022-12-20 07:07:55 +02:00
Daisuke Akatsuka
3bce4ac968 Bug 1805717: Introduce search_mode property. r=mak,jteow
Differential Revision: https://phabricator.services.mozilla.com/D164794
2022-12-20 00:55:36 +00:00
Chris H-C
26fa403fe8 Bug 1792815 - Reintroduce handoff reporting for pbm-initiates searches r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D164845
2022-12-19 18:43:58 +00:00
Daisuke Akatsuka
ea23c8fcc3 Bug 1804314: Introduce persisted_search_terms_* interaction type. r=mak,jteow
Differential Revision: https://phabricator.services.mozilla.com/D163803
2022-12-19 03:32:17 +00:00
Norisz Fay
5cbd726d6d Backed out changeset d6454f53dcc0 (bug 1804314) for causing mochitest failures on browser_glean_telemetry CLOSED TREE 2022-12-19 01:40:31 +02:00
Daisuke Akatsuka
ab22a1563a Bug 1804314: Introduce persisted_search_terms_* interaction type. r=mak,jteow
Differential Revision: https://phabricator.services.mozilla.com/D163803
2022-12-18 22:21:26 +00:00
Daisuke Akatsuka
42601e6a91 Bug 1800579: Implement the impression event. r=mak,Dexter
Differential Revision: https://phabricator.services.mozilla.com/D162085
2022-12-07 06:35:50 +00:00
Drew Willcoxon
212d13a054 Bug 1803873 - Support row buttons in all row types and make changes to tip rows. r=dao
This makes a couple of large changes:

(1) "Generic" buttons (the ones added by `UrlbarView.#addRowButton()`) are now
supported in all row types. The help button that's currently included in some
types of rows when `result.payload.helpUrl` is defined is now supported for all
row types, and two additional button types are now supported too: block buttons
and labeled buttons. A row will get a block button if its
`result.payload.isBlockable` is defined. It will get a labeled button if
`result.payload.buttons` is defined and non-empty. A button can include a `url`
property that is then added as an attribute on the button's element, and
`UrlbarInput.pickResult()` will use this attribute to load the URL when the
button is picked.

(2) The reason I added labeled buttons is because it lets us support tip buttons
without much more effort, which then lets us get rid of the special row type
used for tips. With this patch, tips are now standard rows that use generic
buttons.

This approach should be compatible with the result menu, when we switch over to
it, because we can include the help and block commands in the menu when
`helpUrl` and `isBlockable` are defined, instead of creating buttons for them.
Labeled buttons -- the ones used in tips -- would still be created. The result
menu button itself can continue to be a generic button.

It should also be compatible with including the result menu button inside the
row selection. We'll still add buttons to `.urlbarView-row`, separate from
`.urlbarView-row-inner`, so that the buttons can continue to be on the right
side of the row. We can color the background of the row instead of the
row-inner.

As with D163630, my motivation for this change is to support generic buttons in
dynamic result rows so that help and block buttons can be easily added to
weather suggestions. Here too the larger changes of supporting generic labeled
buttons and removing special rows for tips aren't strictly necessary, but I took
the opportunity to rework things.

Finally, this makes a few other changes:

* It includes some of the more minor improvements to selection that I made in
  D163630.

* It removes the help URL code from quick actions since it was decided not to
  show a help button. Currently, the button is hidden in CSS, but now that a
  generic help button is added for dynamic result rows when
  `result.payload.helpUrl` is defined, `helpUrl` needs to be removed from the
  payload to prevent a button from being added.

* I removed the special tip wrapping behavior, where the tip button and help
  button would wrap below the tip's text. Instead, now the text wraps inside
  row-inner and the buttons always remain on the same horizontal as the text. I
  don't think it's worth the extra complication.

Differential Revision: https://phabricator.services.mozilla.com/D163766
2022-12-06 18:43:49 -05:00
Noemi Erli
5ffe6e3698 Backed out changeset e0eac08ef8bc (bug 1803873) fo causing failures in browser_search_telemetry_sources_navigation CLOSED TREE 2022-12-07 01:24:44 +02:00
Drew Willcoxon
f7f081c409 Bug 1803873 - Support row buttons in all row types and make changes to tip rows. r=dao
This makes a couple of large changes:

(1) "Generic" buttons (the ones added by `UrlbarView.#addRowButton()`) are now
supported in all row types. The help button that's currently included in some
types of rows when `result.payload.helpUrl` is defined is now supported for all
row types, and two additional button types are now supported too: block buttons
and labeled buttons. A row will get a block button if its
`result.payload.isBlockable` is defined. It will get a labeled button if
`result.payload.buttons` is defined and non-empty. A button can include a `url`
property that is then added as an attribute on the button's element, and
`UrlbarInput.pickResult()` will use this attribute to load the URL when the
button is picked.

(2) The reason I added labeled buttons is because it lets us support tip buttons
without much more effort, which then lets us get rid of the special row type
used for tips. With this patch, tips are now standard rows that use generic
buttons.

This approach should be compatible with the result menu, when we switch over to
it, because we can include the help and block commands in the menu when
`helpUrl` and `isBlockable` are defined, instead of creating buttons for them.
Labeled buttons -- the ones used in tips -- would still be created. The result
menu button itself can continue to be a generic button.

It should also be compatible with including the result menu button inside the
row selection. We'll still add buttons to `.urlbarView-row`, separate from
`.urlbarView-row-inner`, so that the buttons can continue to be on the right
side of the row. We can color the background of the row instead of the
row-inner.

As with D163630, my motivation for this change is to support generic buttons in
dynamic result rows so that help and block buttons can be easily added to
weather suggestions. Here too the larger changes of supporting generic labeled
buttons and removing special rows for tips aren't strictly necessary, but I took
the opportunity to rework things.

Finally, this makes a few other changes:

* It includes some of the more minor improvements to selection that I made in
  D163630.

* It removes the help URL code from quick actions since it was decided not to
  show a help button. Currently, the button is hidden in CSS, but now that a
  generic help button is added for dynamic result rows when
  `result.payload.helpUrl` is defined, `helpUrl` needs to be removed from the
  payload to prevent a button from being added.

* I removed the special tip wrapping behavior, where the tip button and help
  button would wrap below the tip's text. Instead, now the text wraps inside
  row-inner and the buttons always remain on the same horizontal as the text. I
  don't think it's worth the extra complication.

Differential Revision: https://phabricator.services.mozilla.com/D163766
2022-12-06 22:28:55 +00:00
Cristian Tuns
6d439f9c19 Backed out 2 changesets (bug 1800579) for causing mochitest failures on browser_glean_telemetry_impression_interaction.js
Backed out changeset 329d79c6403b (bug 1800579)
Backed out changeset 2796c110119d (bug 1800579)
2022-12-06 17:08:20 -05:00
Daisuke Akatsuka
6d66275743 Bug 1800579: Implement the impression event. r=mak,Dexter
Differential Revision: https://phabricator.services.mozilla.com/D162085
2022-12-06 20:48:39 +00:00
Cristian Tuns
63266cca48 Backed out changeset 263fffe843be (bug 1803873) for causing mochitest failures on browser_test_focus_urlbar.js CLOSED TREE 2022-12-06 15:10:09 -05:00
Drew Willcoxon
e634925c17 Bug 1803873 - Support row buttons in all row types and make changes to tip rows. r=dao
This makes a couple of large changes:

(1) "Generic" buttons (the ones added by `UrlbarView.#addRowButton()`) are now
supported in all row types. The help button that's currently included in some
types of rows when `result.payload.helpUrl` is defined is now supported for all
row types, and two additional button types are now supported too: block buttons
and labeled buttons. A row will get a block button if its
`result.payload.isBlockable` is defined. It will get a labeled button if
`result.payload.buttons` is defined and non-empty. A button can include a `url`
property that is then added as an attribute on the button's element, and
`UrlbarInput.pickResult()` will use this attribute to load the URL when the
button is picked.

(2) The reason I added labeled buttons is because it lets us support tip buttons
without much more effort, which then lets us get rid of the special row type
used for tips. With this patch, tips are now standard rows that use generic
buttons.

This approach should be compatible with the result menu, when we switch over to
it, because we can include the help and block commands in the menu when
`helpUrl` and `isBlockable` are defined, instead of creating buttons for them.
Labeled buttons -- the ones used in tips -- would still be created. The result
menu button itself can continue to be a generic button.

It should also be compatible with including the result menu button inside the
row selection. We'll still add buttons to `.urlbarView-row`, separate from
`.urlbarView-row-inner`, so that the buttons can continue to be on the right
side of the row. We can color the background of the row instead of the
row-inner.

As with D163630, my motivation for this change is to support generic buttons in
dynamic result rows so that help and block buttons can be easily added to
weather suggestions. Here too the larger changes of supporting generic labeled
buttons and removing special rows for tips aren't strictly necessary, but I took
the opportunity to rework things.

Finally, this makes a few other changes:

* It includes some of the more minor improvements to selection that I made in
  D163630.

* It removes the help URL code from quick actions since it was decided not to
  show a help button. Currently, the button is hidden in CSS, but now that a
  generic help button is added for dynamic result rows when
  `result.payload.helpUrl` is defined, `helpUrl` needs to be removed from the
  payload to prevent a button from being added.

* I removed the special tip wrapping behavior, where the tip button and help
  button would wrap below the tip's text. Instead, now the text wraps inside
  row-inner and the buttons always remain on the same horizontal as the text. I
  don't think it's worth the extra complication.

Differential Revision: https://phabricator.services.mozilla.com/D163766
2022-12-06 16:35:31 +00:00
Mark Banner
0cd6f3836f Bug 1804037 - Convert PartnerLinkAttribution.jsm to an ES module. r=adw,search-reviewers,daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D163814
2022-12-06 11:34:18 +00:00
Daisuke Akatsuka
d82f055d58 Bug 1800414: Implement the abandonment event. r=mak,Dexter
Differential Revision: https://phabricator.services.mozilla.com/D161977
2022-12-01 23:37:32 +00:00
Daisuke Akatsuka
f12f72c9eb Bug 1797265: Implement the engagement event. r=mak,adw,Dexter
Differential Revision: https://phabricator.services.mozilla.com/D160193
2022-12-01 12:05:48 +00:00
Dão Gottwald
f745f36b17 Bug 1790019 - Implement placeholder urlbar result menu button and popup. r=mak,fluent-reviewers,flod,jteow
Differential Revision: https://phabricator.services.mozilla.com/D161776
2022-11-18 20:14:46 +00:00
Dan Robertson
a2f5784df5 Bug 1796690 - Update urlbar text overflow direction calculation. r=mak
Update the urlbar text overflow direction calculation after recent scrollend
changes do not result in scrollend events fired for scrolls that do not change
the scroll position.

Depends on D160156

Differential Revision: https://phabricator.services.mozilla.com/D161846
2022-11-18 15:12:10 +00:00
Cristian Tuns
8339eb2abf Backed out 3 changesets (bug 1796690) for causing mochitest failures on browser_primaryUI.js CLOSED TREE
Backed out changeset 28f9e04d3500 (bug 1796690)
Backed out changeset 70903d77e4f0 (bug 1796690)
Backed out changeset 66ddf8488393 (bug 1796690)
2022-11-16 18:22:14 -05:00
Drew Willcoxon
05db5ab826 Bug 1800810 - Always record visible quick suggest results in engagement telemetry. r=dao
This is a follow up to D161866 and effectively reverts and replaces it with a
different approach. Please see bug 1800810 for background. In short, engagement
telemetry should be based on the result that's visible in the view, not on the
result the provider added last.

D161866 fixed the case where the last-added result is in the view but hidden.
There's another case we need to handle, when the last-added result is not in the
view at all. That can happen when you type something and hit enter really
quickly, before the view can update. I was able to trigger it several times.
When that happens, there are two possibilities:

* No quick suggest result is visible in the view. `result.rowIndex` is its
  initial value of -1, so we record an engagement for a result that is not
  visible and that doesn't have a valid index.

* A quick suggest result from a previous query is visible in the view. Here
  again, `result.rowIndex` is -1 so we record an engagement for a result that is
  not visible and that doesn't have a valid index, and we miss recording an
  engagement for the result that's actually visible.

Right now it's not easy to fix this inside the provider because providers don't
know anything about the view(s). I could record this telemetry in the view but
that's not its role. I think it makes sense to include the view in the query
context, so that's what this does. I added `view.visibleResults` to make getting
the visible results easy.

Daisuke's new Glean telemetry in D160193 uses `context.results`, which has this
same problem of not being based on actually visible results. We'll need to use
`context.view.visibleResults` there too, and there may be other existing cases
as well.

Depends on D161866

Differential Revision: https://phabricator.services.mozilla.com/D162182
2022-11-16 21:47:55 +00:00
Dan Robertson
36a5c7cc40 Bug 1796690 - Update urlbar text overflow direction calculation. r=mak
Update the urlbar text overflow direction calculation after recent scrollend
changes do not result in scrollend events fired for scrolls that do not change
the scroll position.

Depends on D160156

Differential Revision: https://phabricator.services.mozilla.com/D161846
2022-11-16 16:52:24 +00:00
Ben Hearsum
27a4fed094 Bug 1797010: default private window feature to UrlbarInput.isPrivate r=adw
Differential Revision: https://phabricator.services.mozilla.com/D160103
2022-11-08 21:31:12 +00:00
James Teow
374baa5f1d Bug 1798938 - Move getSearchTermIfDefaultSerp helper into a common place - r=adw
Differential Revision: https://phabricator.services.mozilla.com/D161458
2022-11-07 22:00:22 +00:00
James Teow
57cbb18445 Bug 1779470 - Part 1: Add Nimbus variable, feature gate preference, and rename showSearchTerms prefs - r=adw
Differential Revision: https://phabricator.services.mozilla.com/D159462
2022-11-05 02:13:28 +00:00
James Teow
39f9af11ee Bug 1779471 - Rename pref and add telemetry for persistent search term searches - r=adw,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D156706
2022-10-27 15:53:11 +00:00
trickypr
4b9c23b007 Bug 1510561 - Part 7: Apply plugin:mozilla/require-jsdoc to browser/components/urlbar. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D159472
2022-10-24 13:32:38 +00:00
trickypr
f28fa5aa80 Bug 1510561 - Part 6: Apply plugin:mozilla/valid-jsdoc to browser/components/urlbar. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D159471
2022-10-24 13:32:37 +00:00
James Teow
8448fad066 Bug 1788953 - Part 2: Use cached originalURI in setURI - r=adw
Depends on D157485

Differential Revision: https://phabricator.services.mozilla.com/D157486
2022-10-18 13:38:49 +00:00