Commit Graph

55 Commits

Author SHA1 Message Date
Daisuke Akatsuka
2407eb3bf1 Bug 1820081: Correspond to cleared query context when paste-and-go and drop-and-go r=adw
Differential Revision: https://phabricator.services.mozilla.com/D171527
2023-03-05 22:45:29 +00:00
Daisuke Akatsuka
e91bcc50b9 Bug 1790635: Hide QuickActions row if all actions are inactive r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D157288
2023-02-28 21:05:07 +00:00
Dale Harvey
94f30f80d4 Bug 1816101 - Ensure we don't log error when no quickactions. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D169459
2023-02-10 22:56:28 +00:00
Dale Harvey
11f59f385e Bug 1806024 - Add telemetry for QuickAction inpressions. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D166611
2023-02-02 10:12:13 +00:00
Dale Harvey
0438990a06 Bug 1812152 - Add pref to control minimum chars needed to match quickaction. r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D167713
2023-01-28 23:12:43 +00:00
Dale Harvey
69a19c1c3f Bug 1805075 - Show QuickActions in actions search mode. r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D164618
2022-12-14 10:33:21 +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
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
Daisuke Akatsuka
e06da14970 Bug 1796017: Hide help button for QuickActions. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D159651
2022-10-27 02:04:03 +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
Daisuke Akatsuka
22b7b8178c Bug 1792195: Apply ellipsis style to label. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D158113
2022-09-27 20:38:36 +00:00
Mark Banner
79b9557a71 Bug 1792398 - Enable ESLint rule 'strict' on mjs files as the directive is not necessary for modules. r=arai,pip-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D158115
2022-09-26 21:47:50 +00:00
Marian-Vasile Laza
b7f6194b8d Backed out changeset 0679274d6ed5 (bug 1792398) for causing bc failures on browser_sendQuery.js. CLOSED TREE 2022-09-26 22:53:00 +03:00
Mark Banner
5dcae1ed44 Bug 1792398 - Enable ESLint rule 'strict' on mjs files as the directive is not necessary for modules. r=arai,pip-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D158115
2022-09-26 18:51:57 +00:00
Narcis Beleuzu
95ae6b7d0f Backed out changeset 849faf753208 (bug 1792398) for bc failures on browser_sendQuery.js . CLOSED TREE 2022-09-26 20:44:40 +03:00
Mark Banner
ff212fab8b Bug 1792398 - Enable ESLint rule 'strict' on mjs files as the directive is not necessary for modules. r=arai,pip-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D158115
2022-09-26 16:51:10 +00:00
Shane Hughes
14ba76c156 Bug 1789644 - Add a pref toggle for QuickActions, separate from the pref for suggestions. r=mak,daleharvey
Change the behavior of the QuickActions provider, so that setting the
pref `quickactions.enabled` to false will prevent showing quick action
results in all contexts, while setting `suggest.quickactions` to false
will only prevent showing quick action results in the default search
mode (i.e., quick action results will still appear in the Quick Actions
search mode enabled by typing `> ` in the urlbar).

Differential Revision: https://phabricator.services.mozilla.com/D157702
2022-09-24 00:00:46 +00:00
Dale Harvey
d3477e331b Bug 1783762 - Dont wrap QuickActions unless in search mode. r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D157258
2022-09-14 10:20:02 +00:00
Daisuke Akatsuka
84d29dce54 Bug 1789631: Add title attribute to help button for QuickActions. r=daleharvey,fluent-reviewers,flod
Differential Revision: https://phabricator.services.mozilla.com/D157060
2022-09-13 20:02:49 +00:00
Daisuke Akatsuka
f5865ea133 Bug 1789593: Avoid showing all quick actions when inputing whitespace. r=daleharvey
Depends on D156769

Differential Revision: https://phabricator.services.mozilla.com/D156770
2022-09-13 20:01:11 +00:00
Daisuke Akatsuka
035f1275c3 Bug 1789635: Hide QuickActions by pref when in zero-prefix. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D156769
2022-09-11 22:58:54 +00:00
Dale Harvey
f474d83ef8 Bug 1783155 - Add Scalar to inform which QuickActions are picked. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D155800
2022-09-11 22:22:24 +00:00
Daisuke Akatsuka
cc368efee6 Bug 1786976: Hide Inspect action button if DevTools is fully disabled. r=daleharvey
Differential Revision: https://phabricator.services.mozilla.com/D156247
2022-09-04 22:41:13 +00:00
Daisuke Akatsuka
b1c1e016b9 Bug 1784455: UrlbarProviderQuickActions.removeAction() removes from prefixes as well. r=daleharvey
Even if we called UrlbarProviderQuickActions.removeAction(), it did not remove
corresponding prefix from #prefixies. In this revision, make it work.

Differential Revision: https://phabricator.services.mozilla.com/D156047
2022-09-01 09:06:45 +00:00
Sandor Molnar
9c9afad24f Backed out changeset f1ccb5f067e4 (bug 1784455) for causing browser-chrome failures in browser/components/urlbar/tests/browser/browser_restoreEmptyInput.js CLOSED TREE 2022-09-01 10:25:35 +03:00
Daisuke Akatsuka
eea079ace2 Bug 1784455: UrlbarProviderQuickActions.removeAction() removes from prefixes as well. r=daleharvey
Even if we called UrlbarProviderQuickActions.removeAction(), it did not remove
corresponding prefix from #prefixies. In this revision, make it work.

Differential Revision: https://phabricator.services.mozilla.com/D156047
2022-09-01 06:26:50 +00:00
Marian-Vasile Laza
394e9a4eaf Backed out changeset 654379382e64 (bug 1783154) for causing bc failures on browser_restoreEmptyInput.js. CLOSED TREE 2022-08-30 18:59:43 +03:00
Dale Harvey
61a27ea08e Bug 1783154 - Add QuickAction to urlbar.picked Scalar. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D155514
2022-08-30 14:36:54 +00:00
Dale Harvey
93cc2e883c Bug 1784465 - Dont show duplicate QuickActions. r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D155261
2022-08-23 12:30:42 +00:00
Dale Harvey
5b3b730caa Bug 1779219 - Add onboarding link to QuickActions. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D154676
2022-08-18 12:53:56 +00:00
Dale Harvey
a599b2e8c6 Bug 1783452 - Add section in preferences to enable/disable QuickActions. r=adw,fluent-reviewers,preferences-reviewers,flod,mstriemer
Differential Revision: https://phabricator.services.mozilla.com/D154795
2022-08-17 22:47:54 +00:00
Marian-Vasile Laza
90505c45a8 Backed out changeset 629fc32c6f5e (bug 1779219) for causing xpcshell failures on test_quickactions.js. CLOSED TREE 2022-08-18 01:47:00 +03:00
Dale Harvey
9d202554f0 Bug 1779219 - Add onboarding link to QuickActions. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D154676
2022-08-17 21:03:59 +00:00
Csoregi Natalia
2492031a14 Backed out changeset 8043340f122d (bug 1779219) for causing failures on browser_quickactions.js. CLOSED TREE 2022-08-17 00:29:04 +03:00
Dale Harvey
e0534980fc Bug 1779219 - Add onboarding link to QuickActions. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D154676
2022-08-16 20:43:52 +00:00
Dale Harvey
f5542c62ae Bug 1783644 - Dont show QuickActions in other search modes. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D154702
2022-08-16 09:01:37 +00:00
Dale Harvey
ca56d8b0fc Bug 1778132 - Rename quickactions pref and fix tests. r=Standard8,extension-reviewers,willdurand
Differential Revision: https://phabricator.services.mozilla.com/D153281
2022-08-03 00:26:29 +00:00
Dale Harvey
796458a4bb Bug 1781049 - Focus on content once QuickAction has been selected. r=mak
Differential Revision: https://phabricator.services.mozilla.com/D152705
2022-08-01 22:16:59 +00:00
Dale Harvey
c7a5819bd5 Bug 1781112 - Enable matching full quickaction anywhere in user input. r=Standard8
Differential Revision: https://phabricator.services.mozilla.com/D152678
2022-07-28 22:43:42 +00:00
Dale Harvey
05b79d352b Bug 1779215 - Show inactive quickactions as disabled buttons. r=daisuke
Differential Revision: https://phabricator.services.mozilla.com/D152223
2022-07-28 10:21:33 +00:00
Mark Banner
cd9bed2e7a Bug 1780017 - Migrate urlbar consumers to use ESM imports directly. r=adw,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152057
2022-07-26 15:11:30 +00:00
Mark Banner
52a7ce13c9 Bug 1780017 - Migrate browser/components/urlbar to ESM. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D152056
2022-07-26 15:11:29 +00:00
smolnar
4cb3dcaaa2 Backed out 5 changesets (bug 1780017, bug 1780347) for causing bc failures in browser/base/content/test/performance/browser_preferences_usage.js CLOSED TREE
Backed out changeset 86c3a9142535 (bug 1780347)
Backed out changeset 35abe35417a0 (bug 1780017)
Backed out changeset f448f044f028 (bug 1780017)
Backed out changeset a400cbe83084 (bug 1780017)
Backed out changeset 0a23c9e27f01 (bug 1780017)
2022-07-25 21:00:07 +03:00
Mark Banner
bf597b1f3a Bug 1780017 - Migrate urlbar consumers to use ESM imports directly. r=adw,preferences-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D152057
2022-07-25 12:46:48 +00:00
Mark Banner
373fefff8f Bug 1780017 - Migrate browser/components/urlbar to ESM. r=adw
Differential Revision: https://phabricator.services.mozilla.com/D152056
2022-07-25 12:46:47 +00:00
smolnar
ee079d37e2 Backed out 8 changesets (bug 1779982, bug 1780017, bug 1780347) for causing doc generate failures. CLOSED TREE
Backed out changeset 3f22c0f99cf1 (bug 1780347)
Backed out changeset 6f20b7e4b21b (bug 1780017)
Backed out changeset ae6062c69aeb (bug 1780017)
Backed out changeset e668d7778d97 (bug 1780017)
Backed out changeset e158fc41594b (bug 1780017)
Backed out changeset d4c69c956271 (bug 1779982)
Backed out changeset 145212fd826d (bug 1779982)
Backed out changeset 54079aaa1857 (bug 1779982)
2022-07-20 22:43:53 +03:00